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
8b6a2195
Commit
8b6a2195
authored
Jan 23, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create an X input context for each top-level window.
parent
d0372b4e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
8 deletions
+43
-8
window.c
dlls/x11drv/window.c
+35
-0
x11drv_main.c
dlls/x11drv/x11drv_main.c
+5
-8
x11drv.h
include/x11drv.h
+3
-0
No files found.
dlls/x11drv/window.c
View file @
8b6a2195
...
...
@@ -688,6 +688,15 @@ static Window create_whole_window( Display *display, WND *win )
return
0
;
}
if
(
is_top_level
)
{
XIM
xim
=
x11drv_thread_data
()
->
xim
;
if
(
xim
)
data
->
xic
=
XCreateIC
(
xim
,
XNInputStyle
,
XIMPreeditNothing
|
XIMStatusNothing
,
XNClientWindow
,
data
->
whole_window
,
0
);
}
/* non-maximized child must be at bottom of Z order */
if
((
win
->
dwStyle
&
(
WS_CHILD
|
WS_MAXIMIZE
))
==
WS_CHILD
)
{
...
...
@@ -829,6 +838,11 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
XDeleteContext
(
display
,
data
->
whole_window
,
winContext
);
XDeleteContext
(
display
,
data
->
client_window
,
winContext
);
XDestroyWindow
(
display
,
data
->
whole_window
);
/* this destroys client too */
if
(
data
->
xic
)
{
XUnsetICFocus
(
data
->
xic
);
XDestroyIC
(
data
->
xic
);
}
destroy_icon_window
(
display
,
wndPtr
);
wine_tsx11_unlock
();
}
...
...
@@ -871,6 +885,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
data
->
whole_window
=
0
;
data
->
client_window
=
0
;
data
->
icon_window
=
0
;
data
->
xic
=
0
;
data
->
hWMIconBitmap
=
0
;
data
->
hWMIconMask
=
0
;
...
...
@@ -1080,6 +1095,26 @@ Window X11DRV_get_whole_window( HWND hwnd )
}
/***********************************************************************
* X11DRV_get_ic
*
* Return the X input context associated with a window
*/
XIC
X11DRV_get_ic
(
HWND
hwnd
)
{
XIC
ret
=
0
;
WND
*
win
=
WIN_GetPtr
(
hwnd
);
if
(
win
&&
win
!=
WND_OTHER_PROCESS
)
{
struct
x11drv_win_data
*
data
=
win
->
pDriverData
;
ret
=
data
->
xic
;
WIN_ReleasePtr
(
win
);
}
return
ret
;
}
/*****************************************************************
* SetParent (X11DRV.@)
*/
...
...
dlls/x11drv/x11drv_main.c
View file @
8b6a2195
...
...
@@ -328,14 +328,6 @@ static void process_attach(void)
screen_depth
=
desktop_vi
->
depth
;
}
/* tell the libX11 that we will do input method handling ourselves
* that keep libX11 from doing anything whith dead keys, allowing Wine
* to have total control over dead keys, that is this line allows
* them to work in Wine, even whith a libX11 including the dead key
* patches from Th.Quinot (http://Web.FdN.FR/~tquinot/dead-keys.en.html)
*/
TSXOpenIM
(
display
,
NULL
,
NULL
,
NULL
);
if
(
synchronous
)
XSynchronize
(
display
,
True
);
screen_width
=
WidthOfScreen
(
screen
);
...
...
@@ -377,6 +369,7 @@ static void thread_detach(void)
CloseHandle
(
data
->
display_fd
);
wine_tsx11_lock
();
XCloseDisplay
(
data
->
display
);
if
(
data
->
xim
)
XCloseIM
(
data
->
xim
);
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
data
);
}
...
...
@@ -429,6 +422,10 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
ExitProcess
(
1
);
}
fcntl
(
ConnectionNumber
(
data
->
display
),
F_SETFD
,
1
);
/* set close on exec flag */
if
(
!
(
data
->
xim
=
XOpenIM
(
data
->
display
,
NULL
,
NULL
,
NULL
)))
WARN
(
"Can't open input method
\n
"
);
if
(
synchronous
)
XSynchronize
(
data
->
display
,
True
);
wine_tsx11_unlock
();
if
(
wine_server_fd_to_handle
(
ConnectionNumber
(
data
->
display
),
GENERIC_READ
|
SYNCHRONIZE
,
...
...
include/x11drv.h
View file @
8b6a2195
...
...
@@ -337,6 +337,7 @@ struct x11drv_thread_data
Cursor
cursor
;
/* current cursor */
Window
cursor_window
;
/* current window that contains the cursor */
HWND
last_focus
;
/* last window that had focus */
XIM
xim
;
/* input method */
};
extern
struct
x11drv_thread_data
*
x11drv_init_thread_data
(
void
);
...
...
@@ -400,6 +401,7 @@ struct x11drv_win_data
Window
icon_window
;
/* X window for the icon */
RECT
whole_rect
;
/* X window rectangle for the whole window relative to parent */
RECT
client_rect
;
/* client area relative to whole window */
XIC
xic
;
/* X input context */
HBITMAP
hWMIconBitmap
;
HBITMAP
hWMIconMask
;
};
...
...
@@ -408,6 +410,7 @@ typedef struct x11drv_win_data X11DRV_WND_DATA;
extern
Window
X11DRV_get_client_window
(
HWND
hwnd
);
extern
Window
X11DRV_get_whole_window
(
HWND
hwnd
);
extern
XIC
X11DRV_get_ic
(
HWND
hwnd
);
inline
static
Window
get_client_window
(
WND
*
wnd
)
{
...
...
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