Hi Andrea,

Am Montag, den 27.09.2010, 09:55 +0200 schrieb Andrea Gasparini:
> Joachim Breitner spiffera, alle Saturday 25 September 2010 circa:
> > could you maybe test if the fullscreen code of geeqie (successor of
> > gqview) works correctly in your setup? It seems that this code is well
> > tested against various setups and it might just be easiest to use that.
> 
> It works great ;) 
> Jokes apart, it permits you to setup a lot of different "fullscreen type" in 
> the preferences dialog.
> 
> Its default behavior is "determined by window manager", that should behave 
> like sm with my single_screen patch.
> 
> Moreover, it recognize also how many monitors I have, and let me choos e 
> between "screen 0:0 - full size", "screen 0:0 - Monitor 0" and monitor 1.
> 
> The former option (full size) behave exatcly like my multi_screen patch 
> (probably there's not really a way to go fullscreen-fullsized), i.e.: you 
> still see the panels of gnome.
> 
> let me know if you'd need some other infos.

I now picked some of the code in geeqie. Fullscreen of sm still works as
expected for me. Can you test the attached patch if it also fulfills
your expectations?

Thanks,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
Sat Oct  2 16:22:27 CEST 2010  Joachim Breitner <m...@joachim-breitner.de>
  * Redo fullscreen code based on code in geeqie
diff -rN -u old-screen-message/sm.c new-screen-message/sm.c
--- old-screen-message/sm.c	2010-10-02 16:22:51.000000000 +0200
+++ new-screen-message/sm.c	2010-10-02 16:22:51.000000000 +0200
@@ -2,6 +2,11 @@
 #     vlshow.c
 #     Copyright (C) 2006 Joachim Breitner
 #
+#     The Code for making a window fullscreen was taken from src/fullscreen.c in
+#     the geeqie package:
+#     Copyright (C) 2004 John Ellis
+#                   2008 - 2010 The Geeqie Team
+#
 #     This program is free software; you can redistribute it and/or modify
 #     it under the terms of the GNU General Public License as published by
 #     the Free Software Foundation; either version 2 of the License, or
@@ -254,9 +259,27 @@
 	gtk_window_set_icon_name (GTK_WINDOW (window), "sm");
 
 	GdkScreen *screen = gtk_window_get_screen(GTK_WINDOW(window));
-	gtk_widget_set_size_request(window, gdk_screen_get_width(screen),
-					    gdk_screen_get_height(screen));
-	gtk_window_fullscreen(GTK_WINDOW(window));
+	int w = gdk_screen_get_width(screen);
+	int h = gdk_screen_get_height(screen);
+
+	GdkGeometry geometry;
+	geometry.min_width = w;
+	geometry.min_height = h;
+	geometry.max_width = w;
+	geometry.max_height = h;
+	geometry.base_width = w;
+	geometry.base_height = h;
+	geometry.win_gravity = GDK_GRAVITY_STATIC;
+	gtk_window_set_geometry_hints(GTK_WINDOW(window), window, &geometry,
+				      GDK_HINT_MIN_SIZE |
+				      GDK_HINT_MAX_SIZE |
+				      GDK_HINT_BASE_SIZE |
+				      GDK_HINT_WIN_GRAVITY |
+				      GDK_HINT_USER_POS);
+	gtk_window_set_default_size(GTK_WINDOW(window), w, h);
+	gtk_window_move(GTK_WINDOW(window), 0, 0);
+
+
 	g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
 
 	settings = gtk_settings_get_default();

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to