Commit 586f377b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Get virtual screen rect from win32u.

parent 67f6073b
...@@ -4534,6 +4534,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) ...@@ -4534,6 +4534,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
return HandleToUlong( get_sys_color_pen(arg) ); return HandleToUlong( get_sys_color_pen(arg) );
case NtUserGetSystemMetrics: case NtUserGetSystemMetrics:
return get_system_metrics( arg ); return get_system_metrics( arg );
case NtUserGetVirtualScreenRect:
*(RECT *)arg = get_virtual_screen_rect( 0 );
return 1;
case NtUserMessageBeep: case NtUserMessageBeep:
return message_beep( arg ); return message_beep( arg );
/* temporary exports */ /* temporary exports */
......
...@@ -54,7 +54,6 @@ struct x11drv_display_device_handler desktop_handler; ...@@ -54,7 +54,6 @@ struct x11drv_display_device_handler desktop_handler;
/* Cached screen information, protected by screen_section */ /* Cached screen information, protected by screen_section */
static HKEY video_key; static HKEY video_key;
static RECT virtual_screen_rect;
static RECT primary_monitor_rect; static RECT primary_monitor_rect;
static FILETIME last_query_screen_time; static FILETIME last_query_screen_time;
static CRITICAL_SECTION screen_section; static CRITICAL_SECTION screen_section;
...@@ -124,7 +123,6 @@ static BOOL update_screen_cache(void) ...@@ -124,7 +123,6 @@ static BOOL update_screen_cache(void)
} }
EnterCriticalSection(&screen_section); EnterCriticalSection(&screen_section);
virtual_screen_rect = virtual_rect;
primary_monitor_rect = primary_rect; primary_monitor_rect = primary_rect;
last_query_screen_time = filetime; last_query_screen_time = filetime;
LeaveCriticalSection(&screen_section); LeaveCriticalSection(&screen_section);
...@@ -160,11 +158,7 @@ POINT root_to_virtual_screen(INT x, INT y) ...@@ -160,11 +158,7 @@ POINT root_to_virtual_screen(INT x, INT y)
RECT get_virtual_screen_rect(void) RECT get_virtual_screen_rect(void)
{ {
RECT virtual; RECT virtual;
NtUserCallOneParam( (UINT_PTR)&virtual, NtUserGetVirtualScreenRect );
update_screen_cache();
EnterCriticalSection(&screen_section);
virtual = virtual_screen_rect;
LeaveCriticalSection(&screen_section);
return virtual; return virtual;
} }
......
...@@ -79,6 +79,7 @@ enum ...@@ -79,6 +79,7 @@ enum
NtUserGetSysColorBrush, NtUserGetSysColorBrush,
NtUserGetSysColorPen, NtUserGetSysColorPen,
NtUserGetSystemMetrics, NtUserGetSystemMetrics,
NtUserGetVirtualScreenRect,
NtUserMessageBeep, NtUserMessageBeep,
NtUserRealizePalette, NtUserRealizePalette,
/* temporary exports */ /* temporary exports */
......
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