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
b081ee45
Commit
b081ee45
authored
May 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Only update the fullscreen pointer grab when something has changed.
parent
16d13f24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
desktop.c
dlls/winex11.drv/desktop.c
+1
-1
event.c
dlls/winex11.drv/event.c
+1
-1
mouse.c
dlls/winex11.drv/mouse.c
+12
-5
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
No files found.
dlls/winex11.drv/desktop.c
View file @
b081ee45
...
...
@@ -200,7 +200,7 @@ static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam
DefaultScreen
(
display
),
mask
,
&
changes
);
wine_tsx11_unlock
();
}
if
(
hwnd
==
GetForegroundWindow
())
clip_fullscreen_window
(
hwnd
);
if
(
hwnd
==
GetForegroundWindow
())
clip_fullscreen_window
(
hwnd
,
TRUE
);
return
TRUE
;
}
...
...
dlls/winex11.drv/event.c
View file @
b081ee45
...
...
@@ -716,7 +716,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *xev )
}
if
(
use_take_focus
)
{
if
(
hwnd
==
GetForegroundWindow
())
clip_fullscreen_window
(
hwnd
);
if
(
hwnd
==
GetForegroundWindow
())
clip_fullscreen_window
(
hwnd
,
FALSE
);
return
;
}
...
...
dlls/winex11.drv/mouse.c
View file @
b081ee45
...
...
@@ -419,11 +419,11 @@ static BOOL grab_clipping_window( const RECT *clip, BOOL only_with_xinput )
if
(
msg_hwnd
)
DestroyWindow
(
msg_hwnd
);
return
FALSE
;
}
clip_rect
=
*
clip
;
if
(
msg_hwnd
)
{
data
->
clip_hwnd
=
msg_hwnd
;
sync_window_cursor
(
clip_window
);
clip_rect
=
*
clip
;
SendMessageW
(
GetDesktopWindow
(),
WM_X11DRV_CLIP_CURSOR
,
0
,
(
LPARAM
)
msg_hwnd
);
}
return
TRUE
;
...
...
@@ -502,9 +502,10 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd )
*
* Turn on clipping if the active window is fullscreen.
*/
BOOL
clip_fullscreen_window
(
HWND
hwnd
)
BOOL
clip_fullscreen_window
(
HWND
hwnd
,
BOOL
reset
)
{
struct
x11drv_win_data
*
data
;
struct
x11drv_thread_data
*
thread_data
;
RECT
rect
;
DWORD
style
;
...
...
@@ -516,7 +517,9 @@ BOOL clip_fullscreen_window( HWND hwnd )
/* maximized windows don't count as full screen */
if
((
style
&
WS_MAXIMIZE
)
&&
(
style
&
WS_CAPTION
)
==
WS_CAPTION
)
return
FALSE
;
if
(
!
is_window_rect_fullscreen
(
&
data
->
whole_rect
))
return
FALSE
;
if
(
GetTickCount
()
-
x11drv_thread_data
()
->
clip_reset
<
1000
)
return
FALSE
;
if
(
!
(
thread_data
=
x11drv_thread_data
()))
return
FALSE
;
if
(
GetTickCount
()
-
thread_data
->
clip_reset
<
1000
)
return
FALSE
;
if
(
!
reset
&&
thread_data
->
clip_hwnd
)
return
FALSE
;
/* already clipping */
SetRect
(
&
rect
,
0
,
0
,
screen_width
,
screen_height
);
if
(
!
grab_fullscreen
)
{
...
...
@@ -576,7 +579,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
{
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
);
if
((
input
->
u
.
mi
.
dwFlags
&
(
MOUSEEVENTF_LEFTDOWN
|
MOUSEEVENTF_RIGHTDOWN
))
&&
hwnd
==
GetForegroundWindow
())
clip_fullscreen_window
(
hwnd
);
clip_fullscreen_window
(
hwnd
,
FALSE
);
}
/* update the wine server Z-order */
...
...
@@ -1280,7 +1283,11 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
else
/* if currently clipping, check if we should switch to fullscreen clipping */
{
struct
x11drv_thread_data
*
data
=
x11drv_thread_data
();
if
(
data
&&
data
->
clip_hwnd
&&
clip_fullscreen_window
(
foreground
))
return
TRUE
;
if
(
data
&&
data
->
clip_hwnd
)
{
if
(
EqualRect
(
clip
,
&
clip_rect
)
||
clip_fullscreen_window
(
foreground
,
TRUE
))
return
TRUE
;
}
}
}
ungrab_clipping_window
();
...
...
dlls/winex11.drv/x11drv.h
View file @
b081ee45
...
...
@@ -846,7 +846,7 @@ 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
BOOL
clip_fullscreen_window
(
HWND
hwnd
);
extern
BOOL
clip_fullscreen_window
(
HWND
hwnd
,
BOOL
reset
);
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