Fixed a warning and prevent crashes
This commit is contained in:
parent
2f1ff90aa2
commit
c85fff1262
|
@ -27,7 +27,7 @@
|
||||||
static GtkWidget * _desktop_init(PanelApplet * applet);
|
static GtkWidget * _desktop_init(PanelApplet * applet);
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
static void _on_clicked(GtkWidget * widget, gpointer data);
|
static void _on_clicked(GtkWidget * widget);
|
||||||
|
|
||||||
|
|
||||||
/* public */
|
/* public */
|
||||||
|
@ -68,7 +68,7 @@ static GtkWidget * _desktop_init(PanelApplet * applet)
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
/* on_clicked */
|
/* on_clicked */
|
||||||
static void _on_clicked(GtkWidget * widget, gpointer data)
|
static void _on_clicked(GtkWidget * widget)
|
||||||
{
|
{
|
||||||
GdkScreen * screen;
|
GdkScreen * screen;
|
||||||
GdkDisplay * display;
|
GdkDisplay * display;
|
||||||
|
@ -85,8 +85,10 @@ static void _on_clicked(GtkWidget * widget, gpointer data)
|
||||||
xev.xclient.format = 32;
|
xev.xclient.format = 32;
|
||||||
memset(&xev.xclient.data, sizeof(xev.xclient.data), 0);
|
memset(&xev.xclient.data, sizeof(xev.xclient.data), 0);
|
||||||
xev.xclient.data.l[0] = 1;
|
xev.xclient.data.l[0] = 1;
|
||||||
|
gdk_error_trap_push();
|
||||||
XSendEvent(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XWINDOW(root),
|
XSendEvent(GDK_DISPLAY_XDISPLAY(display), GDK_WINDOW_XWINDOW(root),
|
||||||
False,
|
False,
|
||||||
SubstructureNotifyMask | SubstructureRedirectMask,
|
SubstructureNotifyMask | SubstructureRedirectMask,
|
||||||
&xev);
|
&xev);
|
||||||
|
gdk_error_trap_pop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user