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
2c9ce496
Commit
2c9ce496
authored
Sep 18, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add window data locking to the focus event handlers.
parent
b8edf184
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
event.c
dlls/winex11.drv/event.c
+7
-6
No files found.
dlls/winex11.drv/event.c
View file @
2c9ce496
...
...
@@ -516,15 +516,15 @@ DWORD EVENT_x11_time_to_win32_time(Time time)
*/
static
inline
BOOL
can_activate_window
(
HWND
hwnd
)
{
struct
x11drv_win_data
*
data
=
X11DRV_get_win_data
(
hwnd
);
LONG
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
RECT
rect
;
if
(
!
(
style
&
WS_VISIBLE
))
return
FALSE
;
if
((
style
&
(
WS_POPUP
|
WS_CHILD
))
==
WS_CHILD
)
return
FALSE
;
if
(
style
&
WS_MINIMIZE
)
return
FALSE
;
if
(
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_NOACTIVATE
)
return
FALSE
;
if
(
hwnd
==
GetDesktopWindow
())
return
FALSE
;
if
(
data
&&
IsRectEmpty
(
&
data
->
window_
rect
))
return
FALSE
;
if
(
GetWindowRect
(
hwnd
,
&
rect
)
&&
IsRectEmpty
(
&
rect
))
return
FALSE
;
return
!
(
style
&
WS_DISABLED
);
}
...
...
@@ -874,15 +874,15 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
clipping_cursor
=
1
;
return
;
}
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
embedded
)
return
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
managed
)
if
(
!
data
->
managed
&&
!
data
->
embedded
&&
data
->
mapped
)
{
HWND
hwndFocus
=
GetFocus
();
if
(
hwndFocus
&&
IsChild
(
hwnd
,
hwndFocus
))
set_input_focus
(
thread_display
(),
data
->
whole_window
);
}
release_win_data
(
data
);
}
...
...
@@ -1277,8 +1277,9 @@ void CDECL X11DRV_SetFocus( HWND hwnd )
struct
x11drv_win_data
*
data
;
if
(
!
(
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
)))
return
;
if
(
!
(
data
=
X11DRV_
get_win_data
(
hwnd
)))
return
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
managed
)
set_input_focus
(
display
,
data
->
whole_window
);
release_win_data
(
data
);
}
...
...
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