Sending a timestamp to the window manager when switching desktops
This commit is contained in:
parent
c87eff89a2
commit
ac0903553c
|
@ -301,6 +301,7 @@ static void _on_clicked(GtkWidget * widget, gpointer data)
|
||||||
xev.xclient.format = 32;
|
xev.xclient.format = 32;
|
||||||
memset(&xev.xclient.data, 0, sizeof(xev.xclient.data));
|
memset(&xev.xclient.data, 0, sizeof(xev.xclient.data));
|
||||||
xev.xclient.data.l[0] = i;
|
xev.xclient.data.l[0] = i;
|
||||||
|
xev.xclient.data.l[1] = gdk_x11_display_get_user_time(display);
|
||||||
XSendEvent(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XWINDOW(root),
|
XSendEvent(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XWINDOW(root),
|
||||||
False,
|
False,
|
||||||
SubstructureNotifyMask | SubstructureRedirectMask,
|
SubstructureNotifyMask | SubstructureRedirectMask,
|
||||||
|
@ -324,7 +325,7 @@ static GdkFilterReturn _on_filter(GdkXEvent * xevent, GdkEvent * event,
|
||||||
if((cur = _pager_get_current_desktop(pager)) < 0)
|
if((cur = _pager_get_current_desktop(pager)) < 0)
|
||||||
return GDK_FILTER_CONTINUE;
|
return GDK_FILTER_CONTINUE;
|
||||||
for(i = 0; i < pager->widgets_cnt; i++)
|
for(i = 0; i < pager->widgets_cnt; i++)
|
||||||
gtk_widget_set_sensitive(pager->widgets[i], i == cur
|
gtk_widget_set_sensitive(pager->widgets[i], (i == cur)
|
||||||
? FALSE : TRUE);
|
? FALSE : TRUE);
|
||||||
return GDK_FILTER_CONTINUE;
|
return GDK_FILTER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user