On Sat, May 03, 2008 at 08:28:46PM +0200, Enrico Tröger wrote:
> Hi 
> 
> today I noticed in uvena.de's mail queue there are some mails for you
> but they can't be delivered because of the following error:
> 
> connect to mail.damianv.com.ar[190.55.82.29]:25: No route to host
> 
> So, is this a temporary problem or is the server/network down?

        It was a temporary problem, fixed now, and for once I added a
secondary MX to my domain, so shouldn't happen any more.

> Btw, thanks for the Geany 0.14 package ;-).

        Sure, no problem.

        Btw, I've been looking into #428020 and have some stuff but I'm not
sure if the problem is reproducible with other windows managers (i.e.
the current gnome one, whatever that is, or xfce or other than fluxbox
fwiw)... Have you guys reproduced it? (feel free to move this to the
list if you want)

        I attach a patch that fix most of this problems, except for the fonts
dialog launched from the font buttons in the preference dialog, which I
don't know how can be fixed without rewriting the handler for the click
in that buttons.

        AFAIS the problem comes from two bugs in gtk/gdk, [1] and [2] which
basically ended in the addition of gdk_x11_window_move_to_current_desktop()
and after some fiddling NOT calling it in gtk_window_present(). So the
patch basically adds a gdk_x11_window_move_to_current_desktop() call
after those gtk_window_present() affected by this, and replaces some
gtk_widget_show for the present+move_to_current combo also.

        I'm still not too sure if adding the 
gdk_x11_window_move_to_current_desktop()
call manually is the best way to handle it, but since I was trying if
it worked I have the patch around :-)

        Hope it helps.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=166379 this is where all
this activation stuff first showed problems
[2] http://bugzilla.gnome.org/show_bug.cgi?id=311653 this is where
they remove the gdk_x11_window_move_to_current_desktop() call from
gtk_window_present()

Other references:
http://svn.gnome.org/viewvc/gtk%2B/trunk/gdk/x11/gdkwindow-x11.c?revision=19372&view=markup
search for gdk_x11_window_move_to_current_desktop to see the code for
that
http://svn.gnome.org/viewvc/gtk%2B/trunk/gtk/gtkfontbutton.c?revision=19708&view=markup
same for gtk_font_button_clicked which have two matches where the font
buttons get this as a callback for clicked and the code for it in which
the dialog is shown using gtk_window_present which is why is not coming
to the current desktop

PS: I decided to CC the bug since I haven't given any feedback to our
helpful reporter yet.

-- 
Damián Viano(Des)              ¯ ¯ - _           _ - ¯ ¯
GPG: 0x6EB95A6F                 Debian ¯-_GNU_-¯ Linux
Web: http://damianv.com.ar/               ¯-¯
Index: src/tools.c
===================================================================
--- src/tools.c	(revision 2550)
+++ src/tools.c	(working copy)
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <gdk/gdkx.h>
 
 #ifdef G_OS_UNIX
 # include <sys/types.h>
@@ -768,6 +769,7 @@
 
 	/* We make sure the dialog is visible. */
 	gtk_window_present(GTK_WINDOW(ui_widgets.open_colorsel));
+	gdk_x11_window_move_to_current_desktop(ui_widgets.open_colorsel->window);
 #endif
 }
 
Index: src/prefs.c
===================================================================
--- src/prefs.c	(revision 2550)
+++ src/prefs.c	(working copy)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <gdk/gdkkeysyms.h>
+#include <gdk/gdkx.h>
 
 #include "geany.h"
 
@@ -1477,7 +1478,9 @@
 	}
 
 	prefs_init_dialog();
-	gtk_widget_show(ui_widgets.prefs_dialog);
+	/* We make sure the dialog is visible. */
+	gtk_window_present(GTK_WINDOW(ui_widgets.prefs_dialog));
+	gdk_x11_window_move_to_current_desktop(ui_widgets.prefs_dialog->window);
 }
 
 
Index: src/dialogs.c
===================================================================
--- src/dialogs.c	(revision 2550)
+++ src/dialogs.c	(working copy)
@@ -28,6 +28,7 @@
 #include "geany.h"
 
 #include <gdk/gdkkeysyms.h>
+#include <gdk/gdkx.h>
 #include <string.h>
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
@@ -267,7 +268,9 @@
 	}
 
 	gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(ui_widgets.open_filesel));
-	gtk_widget_show(ui_widgets.open_filesel);
+	/* We make sure the dialog is visible. */
+	gtk_window_present(GTK_WINDOW(ui_widgets.open_filesel));
+	gdk_x11_window_move_to_current_desktop(ui_widgets.open_filesel->window);
 #endif
 	g_free(initdir);
 }
@@ -566,6 +569,9 @@
 	if (! folder_set && initdir != NULL && g_path_is_absolute(initdir))
 		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(ui_widgets.save_filesel), initdir);
 
+	/* We make sure the dialog is visible. */
+	gtk_window_present(GTK_WINDOW(ui_widgets.save_filesel));
+	gdk_x11_window_move_to_current_desktop(ui_widgets.save_filesel->window);
 	/* Run the dialog synchronously, pausing this function call */
 	resp = gtk_dialog_run(GTK_DIALOG(ui_widgets.save_filesel));
 	return (resp == GTK_RESPONSE_ACCEPT);
@@ -789,6 +795,7 @@
 	}
 	/* We make sure the dialog is visible. */
 	gtk_window_present(GTK_WINDOW(ui_widgets.open_fontsel));
+	gdk_x11_window_move_to_current_desktop(ui_widgets.open_fontsel->window);
 #endif
 }
 

Reply via email to