Skip to content

Commit c6b6935

Browse files
Zebediah Figurajulliard
authored andcommitted
winex11.drv: Wake up the display on user input.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
1 parent fc14753 commit c6b6935

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

dlls/winex11.drv/window.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,22 @@ BOOL CDECL X11DRV_CreateDesktopWindow( HWND hwnd )
18041804
}
18051805

18061806

1807+
static WNDPROC desktop_orig_wndproc;
1808+
1809+
#define WM_WINE_NOTIFY_ACTIVITY WM_USER
1810+
1811+
static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
1812+
{
1813+
switch (msg)
1814+
{
1815+
case WM_WINE_NOTIFY_ACTIVITY:
1816+
XResetScreenSaver( gdi_display );
1817+
XFlush( gdi_display );
1818+
break;
1819+
}
1820+
return desktop_orig_wndproc( hwnd, msg, wp, lp );
1821+
}
1822+
18071823
/**********************************************************************
18081824
* CreateWindow (X11DRV.@)
18091825
*/
@@ -1814,6 +1830,9 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
18141830
struct x11drv_thread_data *data = x11drv_init_thread_data();
18151831
XSetWindowAttributes attr;
18161832

1833+
desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC,
1834+
(LONG_PTR)desktop_wndproc_wrapper );
1835+
18171836
/* create the cursor clipping window */
18181837
attr.override_redirect = TRUE;
18191838
attr.event_mask = StructureNotifyMask | FocusChangeMask;

0 commit comments

Comments
 (0)