Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a28722f5
Commit
a28722f5
authored
May 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Reset the clipping when the desktop window loses focus.
parent
6a3255bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
13 deletions
+23
-13
desktop.c
dlls/winex11.drv/desktop.c
+1
-1
event.c
dlls/winex11.drv/event.c
+10
-12
mouse.c
dlls/winex11.drv/mouse.c
+11
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
No files found.
dlls/winex11.drv/desktop.c
View file @
a28722f5
...
...
@@ -143,7 +143,7 @@ Window CDECL X11DRV_create_desktop( UINT width, UINT height )
/* Create window */
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
EnterWindowMask
|
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
;
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
|
FocusChangeMask
;
win_attr
.
cursor
=
XCreateFontCursor
(
display
,
XC_top_left_arrow
);
if
(
visual
!=
DefaultVisual
(
display
,
DefaultScreen
(
display
)
))
...
...
dlls/winex11.drv/event.c
View file @
a28722f5
...
...
@@ -706,6 +706,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *xev )
TRACE
(
"win %p xwin %lx detail=%s
\n
"
,
hwnd
,
event
->
window
,
focus_details
[
event
->
detail
]
);
if
(
event
->
detail
==
NotifyPointer
)
return
;
if
(
hwnd
==
GetDesktopWindow
())
return
;
if
((
xic
=
X11DRV_get_ic
(
hwnd
)))
{
...
...
@@ -740,20 +741,13 @@ static void X11DRV_FocusOut( HWND hwnd, XEvent *xev )
int
revert
;
XIC
xic
;
if
(
!
hwnd
)
TRACE
(
"win %p xwin %lx detail=%s
\n
"
,
hwnd
,
event
->
window
,
focus_details
[
event
->
detail
]
);
if
(
event
->
detail
==
NotifyPointer
)
{
if
(
event
->
detail
==
NotifyPointer
&&
event
->
window
==
x11drv_thread_data
()
->
clip_window
)
{
TRACE
(
"clip window lost focus
\n
"
);
ungrab_clipping_window
();
ClipCursor
(
NULL
);
/* make sure the clip rectangle is reset too */
}
if
(
!
hwnd
&&
event
->
window
==
x11drv_thread_data
()
->
clip_window
)
reset_clipping_window
();
return
;
}
TRACE
(
"win %p xwin %lx detail=%s
\n
"
,
hwnd
,
event
->
window
,
focus_details
[
event
->
detail
]
);
if
(
event
->
detail
==
NotifyPointer
)
return
;
if
(
ximInComposeMode
)
return
;
x11drv_thread_data
()
->
last_focus
=
hwnd
;
...
...
@@ -763,8 +757,12 @@ static void X11DRV_FocusOut( HWND hwnd, XEvent *xev )
XUnsetICFocus
(
xic
);
wine_tsx11_unlock
();
}
if
(
root_window
!=
DefaultRootWindow
(
event
->
display
))
{
if
(
hwnd
==
GetDesktopWindow
())
reset_clipping_window
();
return
;
}
if
(
hwnd
!=
GetForegroundWindow
())
return
;
if
(
root_window
!=
DefaultRootWindow
(
event
->
display
))
return
;
SendMessageW
(
hwnd
,
WM_CANCELMODE
,
0
,
0
);
/* don't reset the foreground window, if the window which is
...
...
dlls/winex11.drv/mouse.c
View file @
a28722f5
...
...
@@ -449,6 +449,17 @@ void ungrab_clipping_window(void)
}
/***********************************************************************
* reset_clipping_window
*
* Forcibly reset the window clipping on external events.
*/
void
reset_clipping_window
(
void
)
{
ungrab_clipping_window
();
ClipCursor
(
NULL
);
/* make sure the clip rectangle is reset too */
}
/***********************************************************************
* clip_cursor_notify
*
* Notification function called upon receiving a WM_X11DRV_CLIP_CURSOR.
...
...
dlls/winex11.drv/x11drv.h
View file @
a28722f5
...
...
@@ -831,6 +831,7 @@ extern void set_window_cursor( Window window, HCURSOR handle );
extern
void
sync_window_cursor
(
Window
window
);
extern
LRESULT
clip_cursor_notify
(
HWND
hwnd
,
HWND
new_clip_hwnd
);
extern
void
ungrab_clipping_window
(
void
);
extern
void
reset_clipping_window
(
void
);
extern
void
X11DRV_InitKeyboard
(
Display
*
display
);
extern
DWORD
CDECL
X11DRV_MsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment