wmshutdown: Fix 'mixed declarations and code' compiler warnings.
This commit is contained in:
parent
2644a1e8f5
commit
89c7d43b85
|
@ -58,6 +58,10 @@ GtkWidget *cria_dock(GtkWidget *mw, unsigned int s)
|
||||||
{
|
{
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GtkWidget *foobox;
|
GtkWidget *foobox;
|
||||||
|
Display *d;
|
||||||
|
Window mainwin, iw, w, p, dummy1, *dummy2;
|
||||||
|
unsigned int dummy3;
|
||||||
|
XWMHints *wmHints;
|
||||||
|
|
||||||
(void) s;
|
(void) s;
|
||||||
display = gdk_display_get_default();
|
display = gdk_display_get_default();
|
||||||
|
@ -69,19 +73,17 @@ GtkWidget *cria_dock(GtkWidget *mw, unsigned int s)
|
||||||
gtk_widget_realize(mw);
|
gtk_widget_realize(mw);
|
||||||
gtk_widget_realize(foobox);
|
gtk_widget_realize(foobox);
|
||||||
|
|
||||||
Display *d = GDK_DISPLAY_XDISPLAY(display);
|
d = GDK_DISPLAY_XDISPLAY(display);
|
||||||
Window mainwin = GDK_WINDOW_XID(gtk_widget_get_window(mw));
|
mainwin = GDK_WINDOW_XID(gtk_widget_get_window(mw));
|
||||||
Window iw = GDK_WINDOW_XID(gtk_widget_get_window(foobox));
|
iw = GDK_WINDOW_XID(gtk_widget_get_window(foobox));
|
||||||
Window p, dummy1, *dummy2;
|
|
||||||
unsigned int dummy3;
|
|
||||||
XQueryTree(d, mainwin, &dummy1, &p, &dummy2, &dummy3);
|
XQueryTree(d, mainwin, &dummy1, &p, &dummy2, &dummy3);
|
||||||
if (dummy2)
|
if (dummy2)
|
||||||
XFree(dummy2);
|
XFree(dummy2);
|
||||||
Window w = XCreateSimpleWindow(d, p, 0, 0, 1, 1, 0, 0, 0);
|
w = XCreateSimpleWindow(d, p, 0, 0, 1, 1, 0, 0, 0);
|
||||||
XReparentWindow(d, mainwin, w, 0, 0);
|
XReparentWindow(d, mainwin, w, 0, 0);
|
||||||
gtk_widget_show(mw);
|
gtk_widget_show(mw);
|
||||||
gtk_widget_show(foobox);
|
gtk_widget_show(foobox);
|
||||||
XWMHints *wmHints = XGetWMHints(d, mainwin);
|
wmHints = XGetWMHints(d, mainwin);
|
||||||
if (!wmHints)
|
if (!wmHints)
|
||||||
wmHints = XAllocWMHints();
|
wmHints = XAllocWMHints();
|
||||||
wmHints->flags |= IconWindowHint;
|
wmHints->flags |= IconWindowHint;
|
||||||
|
@ -149,10 +151,11 @@ void button_press(GtkWidget *widget, GdkEvent *event)
|
||||||
GtkWidget *halt_button;
|
GtkWidget *halt_button;
|
||||||
GtkWidget *reboot_button;
|
GtkWidget *reboot_button;
|
||||||
GtkWidget *cancel_button;
|
GtkWidget *cancel_button;
|
||||||
|
GdkEventButton *bevent;
|
||||||
|
|
||||||
(void) widget;
|
(void) widget;
|
||||||
|
|
||||||
GdkEventButton *bevent = (GdkEventButton *)event;
|
bevent = (GdkEventButton *)event;
|
||||||
switch (bevent->button) {
|
switch (bevent->button) {
|
||||||
case 1:
|
case 1:
|
||||||
if (dialog != NULL)
|
if (dialog != NULL)
|
||||||
|
|
Loading…
Reference in a new issue