[gnome-initial-setup] driver: Don't allow the main window to be minimized
- From: Michael Wood <mwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] driver: Don't allow the main window to be minimized
- Date: Mon, 22 Apr 2013 15:32:51 +0000 (UTC)
commit 0d7573a49c0439c6fa53cc736bf588542d53ab3f
Author: Michael Wood <michael g wood intel com>
Date: Thu Apr 18 17:53:11 2013 +0100
driver: Don't allow the main window to be minimized
This is especially important when running in a gnome-shell initial-setup
mode.
https://bugzilla.gnome.org/show_bug.cgi?id=698231
gnome-initial-setup/gis-driver.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c
index 2802399..c0b69b6 100644
--- a/gnome-initial-setup/gis-driver.c
+++ b/gnome-initial-setup/gis-driver.c
@@ -232,6 +232,16 @@ gis_driver_activate (GApplication *app)
}
static void
+window_realize_cb (GtkWidget *widget, gpointer user_data)
+{
+ GisDriverPrivate *priv = GIS_DRIVER (user_data)->priv;
+ GdkWindow *window;
+ window = gtk_widget_get_window (GTK_WIDGET (priv->main_window));
+ /* disable minimize */
+ gdk_window_set_functions (window, GDK_FUNC_ALL | GDK_FUNC_MINIMIZE);
+}
+
+static void
gis_driver_startup (GApplication *app)
{
GisDriver *driver = GIS_DRIVER (app);
@@ -249,6 +259,11 @@ gis_driver_startup (GApplication *app)
"window-position", GTK_WIN_POS_CENTER_ALWAYS,
NULL);
+ g_signal_connect (priv->main_window,
+ "realize",
+ G_CALLBACK (window_realize_cb),
+ (gpointer)app);
+
priv->assistant = g_object_new (get_assistant_type (), NULL);
gtk_container_add (GTK_CONTAINER (priv->main_window), GTK_WIDGET (priv->assistant));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]