aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-09-16 16:11:13 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-09-16 16:11:13 +0800
commit841173079ae8a262f0ecbafabf0cdc4ae56dcbb6 (patch)
tree08d58e934b48392cb9dba26c450c38439bff6c61 /src
parent75cdac480b514938bd0ac4c138e9fd59beb5023b (diff)
downloadgsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar.gz
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar.bz2
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar.lz
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar.xz
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.tar.zst
gsoc2013-epiphany-841173079ae8a262f0ecbafabf0cdc4ae56dcbb6.zip
Keep popup position synced with his size requisition. Fix #143585
2004-09-16 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-window.c: (update_fullscreen_popup), (screen_size_changed_cb), (fullscreen_popup_size_request_cb), (ephy_window_fullscreen): Keep popup position synced with his size requisition. Fix #143585
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e802aa628..9157b19e2 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -412,15 +412,16 @@ ephy_window_get_type (void)
}
static void
-update_exit_fullscreen_popup_position (EphyWindow *window)
+update_fullscreen_popup (EphyWindow *window)
{
GtkWidget *popup = window->priv->exit_fullscreen_popup;
- GdkRectangle screen_rect;
int popup_width, popup_height;
+ GdkRectangle screen_rect;
g_return_if_fail (popup != NULL);
- gtk_window_get_size (GTK_WINDOW (popup), &popup_width, &popup_height);
+ popup_width = popup->requisition.width;
+ popup_height = popup->requisition.height;
/* FIXME multihead */
gdk_screen_get_monitor_geometry (gdk_screen_get_default (),
@@ -446,7 +447,7 @@ static void
screen_size_changed_cb (GdkScreen *screen,
EphyWindow *window)
{
- update_exit_fullscreen_popup_position (window);
+ update_fullscreen_popup (window);
}
static void
@@ -552,6 +553,12 @@ sync_chromes_visibility (EphyWindow *window)
}
static void
+fullscreen_popup_size_request_cb (GtkWidget *popup, GtkRequisition *req, EphyWindow *window)
+{
+ update_fullscreen_popup (window);
+}
+
+static void
ephy_window_fullscreen (EphyWindow *window)
{
GtkWidget *popup, *button, *icon, *label, *hbox;
@@ -593,8 +600,10 @@ ephy_window_fullscreen (EphyWindow *window)
/* FIXME multihead */
g_signal_connect (gdk_screen_get_default (), "size-changed",
G_CALLBACK (screen_size_changed_cb), window);
+ g_signal_connect (popup, "size_request",
+ G_CALLBACK (fullscreen_popup_size_request_cb), window);
- update_exit_fullscreen_popup_position (window);
+ update_fullscreen_popup (window);
gtk_widget_show (popup);