1 |
/* |
/* |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
User interface services - X Window System |
User interface services - X Window System |
4 |
Copyright (C) Matthew Chapman 1999-2001 |
Copyright (C) Matthew Chapman 1999-2002 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
7 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
293 |
if (IM != NULL) |
if (IM != NULL) |
294 |
XCloseIM(IM); |
XCloseIM(IM); |
295 |
|
|
296 |
XFreeModifierMap(mod_map); |
XFreeModifiermap(mod_map); |
297 |
|
|
298 |
if (ownbackstore) |
if (ownbackstore) |
299 |
XFreePixmap(display, backstore); |
XFreePixmap(display, backstore); |
345 |
} |
} |
346 |
|
|
347 |
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | |
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | |
348 |
StructureNotifyMask | FocusChangeMask; |
VisibilityChangeMask | FocusChangeMask; |
349 |
|
|
350 |
if (sendmotion) |
if (sendmotion) |
351 |
input_mask |= PointerMotionMask; |
input_mask |= PointerMotionMask; |
365 |
XSelectInput(display, wnd, input_mask); |
XSelectInput(display, wnd, input_mask); |
366 |
XMapWindow(display, wnd); |
XMapWindow(display, wnd); |
367 |
|
|
368 |
/* wait for MapNotify */ |
/* wait for VisibilityNotify */ |
369 |
do |
do |
370 |
{ |
{ |
371 |
XMaskEvent(display, StructureNotifyMask, &xevent); |
XMaskEvent(display, VisibilityChangeMask, &xevent); |
372 |
} |
} |
373 |
while (xevent.type != MapNotify); |
while (xevent.type != VisibilityNotify); |
374 |
|
|
375 |
if (fullscreen) |
if (fullscreen) |
376 |
XSetInputFocus(display, wnd, RevertToPointerRoot, CurrentTime); |
XSetInputFocus(display, wnd, RevertToPointerRoot, CurrentTime); |
548 |
|
|
549 |
if (xevent.xmapping.request == MappingModifier) |
if (xevent.xmapping.request == MappingModifier) |
550 |
{ |
{ |
551 |
XFreeModifierMap(mod_map); |
XFreeModifiermap(mod_map); |
552 |
mod_map = XGetModifierMapping(display); |
mod_map = XGetModifierMapping(display); |
553 |
} |
} |
554 |
break; |
break; |