clear window upon startup so cached data is not viewed on screen from up19-7-5
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@86 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
a2079a94c4
commit
d4c08f5a02
16
xwin.c
16
xwin.c
@ -270,6 +270,7 @@ ui_create_window(char *title)
|
||||
Screen *screen;
|
||||
uint16 test;
|
||||
int i;
|
||||
XEvent xevent;
|
||||
|
||||
x_socket = ConnectionNumber(display);
|
||||
screen = DefaultScreenOfDisplay(display);
|
||||
@ -354,7 +355,8 @@ ui_create_window(char *title)
|
||||
|
||||
xkeymap_init2();
|
||||
|
||||
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask;
|
||||
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
|
||||
VisibilityChangeMask;
|
||||
if (grab_keyboard)
|
||||
input_mask |= EnterWindowMask | LeaveWindowMask;
|
||||
if (sendmotion)
|
||||
@ -375,6 +377,18 @@ ui_create_window(char *title)
|
||||
|
||||
XMapWindow(display, wnd);
|
||||
|
||||
/* Wait for VisibilityNotify Event */
|
||||
for (;;) {
|
||||
XNextEvent(display, &xevent);
|
||||
if (xevent.type == VisibilityNotify)
|
||||
break;
|
||||
}
|
||||
|
||||
/* clear the window so that cached data is not viewed upon start... */
|
||||
XSetBackground(display, gc, 0);
|
||||
XSetForeground(display, gc, 0);
|
||||
FILL_RECTANGLE(0, 0, width, height);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user