Commit a52d0919 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Run a single clipboard manager thread per window station, inside the explorer process.

parent a46d7360
......@@ -1794,6 +1794,7 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
CWOverrideRedirect | CWEventMask, &attr );
XFlush( data->display );
SetPropA( hwnd, clip_window_prop, (HANDLE)data->clip_window );
X11DRV_InitClipboard();
}
return TRUE;
}
......@@ -2660,9 +2661,8 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
switch(msg)
{
case WM_X11DRV_ACQUIRE_SELECTION:
X11DRV_AcquireClipboard( hwnd );
return 0;
case WM_X11DRV_UPDATE_CLIPBOARD:
return update_clipboard( hwnd );
case WM_X11DRV_SET_WIN_REGION:
if ((data = get_win_data( hwnd )))
{
......
......@@ -521,7 +521,7 @@ extern DWORD EVENT_x11_time_to_win32_time(Time time) DECLSPEC_HIDDEN;
/* X11 driver private messages, must be in the range 0x80001000..0x80001fff */
enum x11drv_window_messages
{
WM_X11DRV_ACQUIRE_SELECTION = 0x80001000,
WM_X11DRV_UPDATE_CLIPBOARD = 0x80001000,
WM_X11DRV_SET_WIN_REGION,
WM_X11DRV_RESIZE_DESKTOP,
WM_X11DRV_SET_CURSOR,
......@@ -589,6 +589,7 @@ extern void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *
extern void change_systray_owner( Display *display, Window systray_window ) DECLSPEC_HIDDEN;
extern void update_systray_balloon_position(void) DECLSPEC_HIDDEN;
extern HWND create_foreign_window( Display *display, Window window ) DECLSPEC_HIDDEN;
extern BOOL update_clipboard( HWND hwnd ) DECLSPEC_HIDDEN;
static inline void mirror_rect( const RECT *window_rect, RECT *rect )
{
......@@ -606,8 +607,6 @@ extern XContext win_data_context DECLSPEC_HIDDEN;
extern XContext cursor_context DECLSPEC_HIDDEN;
extern void X11DRV_InitClipboard(void) DECLSPEC_HIDDEN;
extern void X11DRV_AcquireClipboard(HWND hWndClipWindow) DECLSPEC_HIDDEN;
extern void X11DRV_ResetSelectionOwner(void) DECLSPEC_HIDDEN;
extern void CDECL X11DRV_SetFocus( HWND hwnd ) DECLSPEC_HIDDEN;
extern void set_window_cursor( Window window, HCURSOR handle ) DECLSPEC_HIDDEN;
extern void sync_window_cursor( Window window ) DECLSPEC_HIDDEN;
......
......@@ -588,7 +588,6 @@ static BOOL process_attach(void)
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
#endif
X11DRV_InitKeyboard( gdi_display );
X11DRV_InitClipboard();
if (use_xim) use_xim = X11DRV_InitXIM( input_style );
return TRUE;
......@@ -604,7 +603,6 @@ void CDECL X11DRV_ThreadDetach(void)
if (data)
{
X11DRV_ResetSelectionOwner();
if (data->xim) XCloseIM( data->xim );
if (data->font_set) XFreeFontSet( data->display, data->font_set );
XCloseDisplay( data->display );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment