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
a29960e7
Commit
a29960e7
authored
Jan 21, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure to always set X focus on the top-level window, not on
child windows.
parent
97f6f600
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
event.c
dlls/x11drv/event.c
+3
-0
window.c
dlls/x11drv/window.c
+4
-3
No files found.
dlls/x11drv/event.c
View file @
a29960e7
...
...
@@ -399,6 +399,7 @@ static void set_focus( HWND hwnd, Time time )
SetForegroundWindow
(
hwnd
);
focus
=
GetFocus
();
if
(
focus
)
focus
=
GetAncestor
(
focus
,
GA_ROOT
);
win
=
X11DRV_get_whole_window
(
focus
);
if
(
win
)
...
...
@@ -451,6 +452,7 @@ static void handle_wm_protocols_message( HWND hwnd, XClientMessageEvent *event )
else
{
hwnd
=
GetFocus
();
if
(
hwnd
)
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
);
if
(
!
hwnd
)
hwnd
=
GetActiveWindow
();
if
(
!
hwnd
)
hwnd
=
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
hwnd
,
event_time
);
...
...
@@ -486,6 +488,7 @@ static void EVENT_FocusIn( HWND hwnd, XFocusChangeEvent *event )
if
(
!
can_activate_window
(
hwnd
))
{
HWND
hwnd
=
GetFocus
();
if
(
hwnd
)
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
);
if
(
!
hwnd
)
hwnd
=
GetActiveWindow
();
if
(
!
hwnd
)
hwnd
=
x11drv_thread_data
()
->
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
hwnd
,
CurrentTime
);
...
...
dlls/x11drv/window.c
View file @
a29960e7
...
...
@@ -116,11 +116,12 @@ static int get_window_attributes( Display *display, WND *win, XSetWindowAttribut
attr
->
colormap
=
X11DRV_PALETTE_PaletteXColormap
;
attr
->
save_under
=
((
win
->
clsStyle
&
CS_SAVEBITS
)
!=
0
);
attr
->
cursor
=
x11drv_thread_data
()
->
cursor
;
attr
->
event_mask
=
(
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
PointerMotionMask
|
attr
->
event_mask
=
(
ExposureMask
|
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
|
EnterWindowMask
);
if
(
is_window_top_level
(
win
))
attr
->
event_mask
|=
StructureNotifyMask
|
FocusChangeMask
|
KeymapStateMask
;
attr
->
event_mask
|=
(
KeyPressMask
|
KeyReleaseMask
|
StructureNotifyMask
|
FocusChangeMask
|
KeymapStateMask
);
return
(
CWOverrideRedirect
|
CWSaveUnder
|
CWEventMask
|
CWColormap
|
CWCursor
);
}
...
...
@@ -717,7 +718,7 @@ static Window create_client_window( Display *display, WND *win )
OffsetRect
(
&
rect
,
-
data
->
whole_rect
.
left
,
-
data
->
whole_rect
.
top
);
data
->
client_rect
=
rect
;
attr
.
event_mask
=
(
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
PointerMotionMask
|
attr
.
event_mask
=
(
ExposureMask
|
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
|
EnterWindowMask
);
attr
.
bit_gravity
=
(
win
->
clsStyle
&
(
CS_VREDRAW
|
CS_HREDRAW
))
?
ForgetGravity
:
NorthWestGravity
;
...
...
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