Title: [222032] trunk/Tools
Revision
222032
Author
clo...@igalia.com
Date
2017-09-14 10:53:18 -0700 (Thu, 14 Sep 2017)

Log Message

[GTK] Add a switch to start the mini-browser in full-screen mode
https://bugs.webkit.org/show_bug.cgi?id=176904

Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/main.c:
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222031 => 222032)


--- trunk/Tools/ChangeLog	2017-09-14 17:38:20 UTC (rev 222031)
+++ trunk/Tools/ChangeLog	2017-09-14 17:53:18 UTC (rev 222032)
@@ -1,3 +1,13 @@
+2017-09-14  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [GTK] Add a switch to start the mini-browser in full-screen mode
+        https://bugs.webkit.org/show_bug.cgi?id=176904
+
+        Reviewed by Carlos Garcia Campos.
+
+        * MiniBrowser/gtk/main.c:
+        (main):
+
 2017-09-14  Filip Pizlo  <fpi...@apple.com>
 
         Unreviewed, fix a typo that was preventing a test from running.

Modified: trunk/Tools/MiniBrowser/gtk/main.c (222031 => 222032)


--- trunk/Tools/MiniBrowser/gtk/main.c	2017-09-14 17:38:20 UTC (rev 222031)
+++ trunk/Tools/MiniBrowser/gtk/main.c	2017-09-14 17:53:18 UTC (rev 222032)
@@ -43,6 +43,7 @@
 static char *geometry;
 static gboolean privateMode;
 static gboolean automationMode;
+static gboolean fullScreen;
 
 typedef enum {
     MINI_BROWSER_ERROR_INVALID_ABOUT_PATH
@@ -96,6 +97,7 @@
     { "editor-mode", 'e', 0, G_OPTION_ARG_NONE, &editorMode, "Run in editor mode", NULL },
     { "session-file", 's', 0, G_OPTION_ARG_FILENAME, &sessionFile, "Session file", "FILE" },
     { "geometry", 'g', 0, G_OPTION_ARG_STRING, &geometry, "Set the size and position of the window (WIDTHxHEIGHT+X+Y)", "GEOMETRY" },
+    { "full-screen", 'f', 0, G_OPTION_ARG_NONE, &fullScreen, "Set the window to full-screen mode", NULL },
     { "private", 'p', 0, G_OPTION_ARG_NONE, &privateMode, "Run in private browsing mode", NULL },
     { "automation", 0, 0, G_OPTION_ARG_NONE, &automationMode, "Run in automation mode", NULL },
     { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },
@@ -513,7 +515,9 @@
     g_signal_connect(webContext, "automation-started", G_CALLBACK(automationStartedCallback), NULL);
 
     BrowserWindow *mainWindow = BROWSER_WINDOW(browser_window_new(NULL, webContext));
-    if (geometry)
+    if (fullScreen)
+        gtk_window_fullscreen(GTK_WINDOW(mainWindow));
+    else if (geometry)
         gtk_window_parse_geometry(GTK_WINDOW(mainWindow), geometry);
 
     GtkWidget *firstTab = NULL;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to