summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2007-10-19 11:29:46 +0000
committerBastien Nocera <hadess@src.gnome.org>2007-10-19 11:29:46 +0000
commit71ddeb28669dcf42810dcadac217ded0f2546ec4 (patch)
tree8b0945c05b63044568edda896da932347a46120d
parent20a48cf100cb6b5e6f129f4676a2a14a9fc4e2c1 (diff)
downloadtotem-71ddeb28669dcf42810dcadac217ded0f2546ec4.tar.gz
Put the fullscreen window on the screen where the video widget is, when
2007-10-19 Bastien Nocera <hadess@hadess.net> * browser-plugin/totem-plugin-viewer.c: (totem_embedded_toggle_fullscreen): Put the fullscreen window on the screen where the video widget is, when using Xinerama (Closes: #487932) svn path=/branches/gnome-2-20/; revision=4796
-rw-r--r--ChangeLog7
-rw-r--r--browser-plugin/totem-plugin-viewer.c11
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e91b04053..bb08a02d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-10-19 Bastien Nocera <hadess@hadess.net>
+ * browser-plugin/totem-plugin-viewer.c:
+ (totem_embedded_toggle_fullscreen):
+ Put the fullscreen window on the screen where the video
+ widget is, when using Xinerama (Closes: #487932)
+
+2007-10-19 Bastien Nocera <hadess@hadess.net>
+
* data/mime-type-list.txt: Patch from Stephane Loeuillet
<leroutier@gmail.com> to fix some warnings in the .desktop
file (Closes: #481700)
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 150359289..184e27dfb 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -1320,6 +1320,17 @@ totem_embedded_toggle_fullscreen (TotemEmbedded *emb)
gtk_action_set_sensitive (fs_action, TRUE);
} else {
+ GdkRectangle rect;
+ int monitor;
+
+ /* Move the fullscreen window to the screen where the
+ * video widget currently is */
+ monitor = gdk_screen_get_monitor_at_window (gtk_widget_get_screen (GTK_WIDGET (emb->bvw)),
+ GTK_WIDGET (emb->bvw)->window);
+ gdk_screen_get_monitor_geometry (gtk_widget_get_screen (GTK_WIDGET (emb->bvw)),
+ monitor, &rect);
+ gtk_window_move (GTK_WINDOW (emb->fs_window), rect.x, rect.y);
+
gtk_widget_reparent (GTK_WIDGET (emb->bvw), emb->fs_window);
bacon_video_widget_set_fullscreen (emb->bvw, TRUE);
gtk_window_fullscreen (GTK_WINDOW (emb->fs_window));