diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-08-07 23:03:41 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-08-07 23:03:41 +0000 |
commit | 3d0b5b8d42100077deac760fcce08689d2d3b626 (patch) | |
tree | 805de4488f42f1528ead5316e383c25bf209bb06 /demos | |
parent | 5155f3ca66d6fe94428a9885e2e6f118b14ea518 (diff) | |
download | gtk+-3d0b5b8d42100077deac760fcce08689d2d3b626.tar.gz |
Hide the resize grip when maximized or fullscreen.
2003-08-08 Matthias Clasen <maclas@gmx.de>
* demos/gtk-demo/appwindow.c (do_appwindow): Hide the resize grip when maximized or fullscreen.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/appwindow.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c index c866a7755b..61254989f1 100644 --- a/demos/gtk-demo/appwindow.c +++ b/demos/gtk-demo/appwindow.c @@ -185,6 +185,16 @@ mark_set_callback (GtkTextBuffer *buffer, update_statusbar (buffer, GTK_STATUSBAR (data)); } +static void +update_resize_grip (GtkWidget *widget, + GdkEventWindowState *event, + GtkStatusbar *statusbar) +{ + if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) + gtk_statusbar_set_has_resize_grip (statusbar, !(event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))); +} + + GtkWidget * do_appwindow (void) { @@ -332,6 +342,12 @@ do_appwindow (void) G_CALLBACK (mark_set_callback), statusbar, 0); + + g_signal_connect_object (window, + "window_state_event", + G_CALLBACK (update_resize_grip), + statusbar, + 0); update_statusbar (buffer, GTK_STATUSBAR (statusbar)); } |