Commit 29062759 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Use build_hwnd_list for X11DRV_DisplayDevices_Update implementation.

parent 2425488e
......@@ -174,35 +174,13 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void)
handler->register_event_handlers();
}
static BOOL CALLBACK update_windows_on_display_change(HWND hwnd, LPARAM lparam)
{
struct x11drv_win_data *data;
UINT mask = (UINT)lparam;
if (!(data = get_win_data(hwnd)))
return TRUE;
/* update the full screen state */
update_net_wm_states(data);
if (mask && data->whole_window)
{
POINT pos = virtual_screen_to_root(data->whole_rect.left, data->whole_rect.top);
XWindowChanges changes;
changes.x = pos.x;
changes.y = pos.y;
XReconfigureWMWindow(data->display, data->whole_window, data->vis.screen, mask, &changes);
}
release_win_data(data);
return TRUE;
}
void X11DRV_DisplayDevices_Update(BOOL send_display_change)
{
RECT old_virtual_rect, new_virtual_rect;
DWORD tid, pid;
HWND foreground;
UINT mask = 0;
UINT mask = 0, i;
HWND *list;
old_virtual_rect = NtUserGetVirtualScreenRect();
X11DRV_DisplayDevices_Init(TRUE);
......@@ -215,7 +193,29 @@ void X11DRV_DisplayDevices_Update(BOOL send_display_change)
mask |= CWY;
X11DRV_resize_desktop(send_display_change);
EnumWindows(update_windows_on_display_change, (LPARAM)mask);
list = build_hwnd_list();
for (i = 0; list && list[i] != HWND_BOTTOM; i++)
{
struct x11drv_win_data *data;
if (!(data = get_win_data( list[i] ))) continue;
/* update the full screen state */
update_net_wm_states(data);
if (mask && data->whole_window)
{
POINT pos = virtual_screen_to_root(data->whole_rect.left, data->whole_rect.top);
XWindowChanges changes;
changes.x = pos.x;
changes.y = pos.y;
XReconfigureWMWindow(data->display, data->whole_window, data->vis.screen, mask, &changes);
}
release_win_data(data);
}
free( list );
/* forward clip_fullscreen_window request to the foreground window */
if ((foreground = NtUserGetForegroundWindow()) &&
......
......@@ -171,7 +171,7 @@ static BOOL is_managed( HWND hwnd )
return ret;
}
static HWND *build_hwnd_list(void)
HWND *build_hwnd_list(void)
{
NTSTATUS status;
HWND *list;
......
......@@ -28,6 +28,7 @@
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#include <pthread.h>
#include <X11/Xlib.h>
#include <X11/Xresource.h>
......@@ -690,6 +691,7 @@ extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
extern DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
extern HWND *build_hwnd_list(void) DECLSPEC_HIDDEN;
typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void *arg );
......
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