mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix/window: Use ConfigureWindow instead of MoveWindow
The screensaver can regularly move its window to random offsets. It should use the ConfigureWindow function instead of calling the Screen's MoveWindow directly. Some MoveWindow implementations, such as compMoveWindow, rely on Screen's ConfigNotify being called first as it happens in ConfigureWindow. Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
14
dix/window.c
14
dix/window.c
@@ -3094,6 +3094,7 @@ int
|
||||
dixSaveScreens(ClientPtr client, int on, int mode)
|
||||
{
|
||||
int rc, i, what, type;
|
||||
XID vlist[2];
|
||||
|
||||
if (on == SCREEN_SAVER_FORCER) {
|
||||
if (mode == ScreenSaverReset)
|
||||
@@ -3146,14 +3147,11 @@ dixSaveScreens(ClientPtr client, int on, int mode)
|
||||
* for the root window, so PaintWindow works
|
||||
*/
|
||||
screenIsSaved = SCREEN_SAVER_OFF;
|
||||
(*pWin->drawable.pScreen->MoveWindow) (pWin,
|
||||
(short) (-
|
||||
(rand() %
|
||||
RANDOM_WIDTH)),
|
||||
(short) (-
|
||||
(rand() %
|
||||
RANDOM_WIDTH)),
|
||||
pWin->nextSib, VTMove);
|
||||
|
||||
vlist[0] = -(rand() % RANDOM_WIDTH);
|
||||
vlist[1] = -(rand() % RANDOM_WIDTH);
|
||||
ConfigureWindow(pWin, CWX | CWY, vlist, client);
|
||||
|
||||
screenIsSaved = SCREEN_SAVER_ON;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user