aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2011-04-17 03:11:08 +0800
committerGustavo Noronha Silva <gns@gnome.org>2011-04-18 01:54:16 +0800
commitd436a108f1c30a5f937df2b05a5e5cbdf12b4d0a (patch)
tree8bfd3b3bdfc251f1c8cb6739961bcd1b51b2856e
parent0ec186343a500d2662a118ad5eb0fc67275a4f9f (diff)
downloadgsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar.gz
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar.bz2
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar.lz
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar.xz
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.tar.zst
gsoc2013-epiphany-d436a108f1c30a5f937df2b05a5e5cbdf12b4d0a.zip
Mark windows with modified chrome as popups and only allow resizing for them
A window with non-modified chrome will potentially be used as a normal window for browsing - there's no reason why it should be different from existing windows when it comes to resize policy. With this change we consider windows with modified chrome as popups and only set a default size on creation for popup windows. Bug #612155
-rw-r--r--src/ephy-window.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 75ee24a99..2d10dbedb 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2424,18 +2424,23 @@ web_view_ready_cb (WebKitWebView *web_view,
"menubar-visible", &menubar_visible,
NULL);
- gtk_window_set_default_size (GTK_WINDOW (window), width, height);
-
if (!toolbar_visible)
chrome_mask &= ~EPHY_WEB_VIEW_CHROME_TOOLBAR;
if (!menubar_visible)
chrome_mask &= ~EPHY_WEB_VIEW_CHROME_MENUBAR;
- window->priv->chrome = chrome_mask;
- update_chromes_actions (window);
- sync_chromes_visibility (window);
+ /* We will consider windows with different chrome settings popups. */
+ if (chrome_mask != window->priv->chrome) {
+ gtk_window_set_default_size (GTK_WINDOW (window), width, height);
+
+ window->priv->is_popup = TRUE;
+ window->priv->chrome = chrome_mask;
+
+ update_chromes_actions (window);
+ sync_chromes_visibility (window);
+ }
g_signal_emit_by_name (parent_web_view, "new-window", web_view);
}