static BOOL xf_event_suppress_events(xfContext* xfc, xfAppWindow* appWindow, XEvent* event) { if (!xfc->remote_app) return FALSE; switch (appWindow->local_move.state) { case LMS_NOT_ACTIVE: /* No local move in progress, nothing to do */ /* Prevent Configure from happening during indeterminant state of Horz or Vert Max only */ if ((event->type == ConfigureNotify) && appWindow->rail_ignore_configure) { appWindow->rail_ignore_configure = FALSE; return TRUE; } break; case LMS_STARTING: /* Local move initiated by RDP server, but we have not yet seen any updates from the X server */ switch (event->type) { case ConfigureNotify: /* Starting to see move events from the X server. Local move is now in progress. */ appWindow->local_move.state = LMS_ACTIVE; /* Allow these events to be processed during move to keep our state up to date. */ break; case ButtonPress: case ButtonRelease: case KeyPress: case KeyRelease: case UnmapNotify: /* * A button release event means the X window server did not grab the * mouse before the user released it. In this case we must cancel the * local move. The event will be processed below as normal, below. */ break; case VisibilityNotify: case PropertyNotify: case Expose: /* Allow these events to pass */ break; default: /* Eat any other events */ return TRUE; } break; case LMS_ACTIVE: /* Local move is in progress */ switch (event->type) { case ConfigureNotify: case VisibilityNotify: case PropertyNotify: case Expose: case GravityNotify: /* Keep us up to date on position */ break; default: /* Any other event terminates move */ xf_rail_end_local_move(xfc, appWindow); break; } break; case LMS_TERMINATING: /* Already sent RDP end move to server. Allow events to pass. */ break; } return FALSE; }
boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event) { if (! xfi->remote_app) return false; switch (xfi->window->local_move.state) { case LMS_NOT_ACTIVE: // No local move in progress, nothing to do break; case LMS_STARTING: // Local move initiated by RDP server, but we // have not yet seen any updates from the X server switch(event->type) { case ConfigureNotify: // Starting to see move events // from the X server. Local // move is now in progress. xfi->window->local_move.state = LMS_ACTIVE; // Allow these events to be processed during move to keep // our state up to date. break; case ButtonPress: case ButtonRelease: case KeyPress: case KeyRelease: case UnmapNotify: // A button release event means the X // window server did not grab the // mouse before the user released it. // In this case we must cancel the // local move. The event will be // processed below as normal, below. break; case VisibilityNotify: case PropertyNotify: case Expose: // Allow these events to pass break; default: // Eat any other events return true; } break; case LMS_ACTIVE: // Local move is in progress switch(event->type) { case ConfigureNotify: case VisibilityNotify: case PropertyNotify: case Expose: // Keep us up to date on position break; default: // Any other event terminates move xf_rail_end_local_move(xfi, window); break; } break; case LMS_TERMINATING: // Already sent RDP end move to sever // Allow events to pass. break; } return false; }