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
ecd8c931
Commit
ecd8c931
authored
May 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Set or clear XIC focus using a xim_set_focus helper.
parent
4e92c572
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
event.c
dlls/winex11.drv/event.c
+3
-4
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
xim.c
dlls/winex11.drv/xim.c
+10
-0
No files found.
dlls/winex11.drv/event.c
View file @
ecd8c931
...
...
@@ -752,7 +752,6 @@ static const char * const focus_modes[] =
static
BOOL
X11DRV_FocusIn
(
HWND
hwnd
,
XEvent
*
xev
)
{
XFocusChangeEvent
*
event
=
&
xev
->
xfocus
;
XIC
xic
;
if
(
!
hwnd
)
return
FALSE
;
...
...
@@ -779,7 +778,8 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
return
TRUE
;
/* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
if
((
xic
=
X11DRV_get_ic
(
hwnd
)))
XSetICFocus
(
xic
);
xim_set_focus
(
hwnd
,
TRUE
);
if
(
use_take_focus
)
{
if
(
hwnd
==
NtUserGetForegroundWindow
())
clip_fullscreen_window
(
hwnd
,
FALSE
);
...
...
@@ -806,12 +806,11 @@ static void focus_out( Display *display , HWND hwnd )
HWND
hwnd_tmp
;
Window
focus_win
;
int
revert
;
XIC
xic
;
if
(
xim_in_compose_mode
())
return
;
x11drv_thread_data
()
->
last_focus
=
hwnd
;
if
((
xic
=
X11DRV_get_ic
(
hwnd
)))
XUnsetICFocus
(
xic
);
xim_set_focus
(
hwnd
,
FALSE
);
if
(
is_virtual_desktop
())
{
...
...
dlls/winex11.drv/x11drv.h
View file @
ecd8c931
...
...
@@ -826,6 +826,7 @@ extern void xim_thread_attach( struct x11drv_thread_data *data ) DECLSPEC_HIDDEN
extern
BOOL
xim_in_compose_mode
(
void
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_XIMLookupChars
(
const
char
*
str
,
UINT
count
)
DECLSPEC_HIDDEN
;
extern
XIC
X11DRV_get_ic
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
xim_set_focus
(
HWND
hwnd
,
BOOL
focus
)
DECLSPEC_HIDDEN
;
#define XEMBED_MAPPED (1 << 0)
...
...
dlls/winex11.drv/xim.c
View file @
ecd8c931
...
...
@@ -471,3 +471,13 @@ XIC X11DRV_get_ic( HWND hwnd )
return
ret
;
}
void
xim_set_focus
(
HWND
hwnd
,
BOOL
focus
)
{
XIC
xic
;
if
(
!
(
xic
=
X11DRV_get_ic
(
hwnd
)))
return
;
if
(
focus
)
XSetICFocus
(
xic
);
else
XUnsetICFocus
(
xic
);
}
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