mcbride, you should revisit the synergy stuff now ;-)
+drain_enter_notify(void)
+{
+ int i = 0;
+ XEvent cne;
+
+ while (XCheckMaskEvent(display, EnterWindowMask, &cne))
+ i++;
+
+ DNPRINTF(SWM_D_MISC, "drain_enter_notify: drained %d\n", i);
+}
+
+void
set_win_state(struct ws_win *win, long state)
{
long data[] = {state, None};
set_win_state(struct ws_win *win, long state)
{
long data[] = {state, None};
stack();
a.id = SWM_ARG_ID_FOCUSCUR;
focus(new_ws->r, &a);
stack();
a.id = SWM_ARG_ID_FOCUSCUR;
focus(new_ws->r, &a);
bar_update();
/* unmap old windows */
if (unmap_old)
TAILQ_FOREACH(win, &old_ws->winlist, entry)
unmap_window(win);
bar_update();
/* unmap old windows */
if (unmap_old)
TAILQ_FOREACH(win, &old_ws->winlist, entry)
unmap_window(win);
+
+ if (focus_mode == SWM_FOCUS_DEFAULT)
+ drain_enter_notify();
}
if (font_adjusted)
font_adjusted--;
}
if (font_adjusted)
font_adjusted--;
+
+ if (focus_mode == SWM_FOCUS_DEFAULT)
+ drain_enter_notify();
XUngrabPointer(display, CurrentTime);
/* drain events */
XUngrabPointer(display, CurrentTime);
/* drain events */
- while (XCheckMaskEvent(display, EnterWindowMask, &ev));
XUngrabPointer(display, CurrentTime);
/* drain events */
XUngrabPointer(display, CurrentTime);
/* drain events */
- while (XCheckMaskEvent(display, EnterWindowMask, &ev));
}
/* user/key callable function IDs */
}
/* user/key callable function IDs */
switch (focus_mode) {
case SWM_FOCUS_DEFAULT:
switch (focus_mode) {
case SWM_FOCUS_DEFAULT:
- if (QLength(display)) {
- DNPRINTF(SWM_D_EVENT, "ignore enternotify %d\n",
- QLength(display));
- return;
- }
break;
case SWM_FOCUS_FOLLOW:
break;
break;
case SWM_FOCUS_FOLLOW:
break;