--- sourceforge.net/trunk/rdesktop/xwin.c 2002/09/24 07:33:17 190 +++ sourceforge.net/trunk/rdesktop/xwin.c 2002/09/24 12:25:21 194 @@ -217,7 +217,7 @@ } BOOL -ui_init() +ui_init(void) { XPixmapFormatValues *pfm; uint16 test; @@ -293,7 +293,7 @@ } void -ui_deinit() +ui_deinit(void) { if (IM != NULL) XCloseIM(IM); @@ -307,7 +307,7 @@ } BOOL -ui_create_window() +ui_create_window(void) { XSetWindowAttributes attribs; XClassHint *classhints; @@ -350,8 +350,6 @@ input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | StructureNotifyMask | FocusChangeMask; - if (grab_keyboard) - input_mask |= EnterWindowMask | LeaveWindowMask; if (sendmotion) input_mask |= PointerMotionMask; if (ownbackstore) @@ -381,7 +379,7 @@ } void -ui_destroy_window() +ui_destroy_window(void) { if (IC != NULL) XDestroyIC(IC); @@ -390,7 +388,7 @@ } void -xwin_toggle_fullscreen() +xwin_toggle_fullscreen(void) { Pixmap contents = 0; @@ -416,7 +414,7 @@ /* Process all events in Xlib queue */ static void -xwin_process_events() +xwin_process_events(void) { XEvent xevent; KeySym keysym; @@ -518,21 +516,18 @@ MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y); break; - case EnterNotify: + case FocusIn: + reset_modifier_keys(); if (grab_keyboard) XGrabKeyboard(display, wnd, True, GrabModeAsync, GrabModeAsync, CurrentTime); break; - case LeaveNotify: + case FocusOut: if (grab_keyboard) XUngrabKeyboard(display, CurrentTime); break; - case FocusIn: - reset_modifier_keys(); - break; - case Expose: XCopyArea(display, backstore, wnd, gc, xevent.xexpose.x, xevent.xexpose.y, @@ -852,7 +847,7 @@ } void -ui_reset_clip() +ui_reset_clip(void) { XRectangle rect; @@ -864,7 +859,7 @@ } void -ui_bell() +ui_bell(void) { XBell(display, 0); }