aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog9
-rw-r--r--src/ephy-window.c19
2 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9333af770..549aa8166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
+
2004-09-16 Christian Persch <chpe@cvs.gnome.org>
* src/window-commands.c: (window_cmd_help_about):
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);