Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37647605
en ru br
Репозитории ALT
S:3.7.0-alt0.6
4.1: 2.2.9-alt1.1
4.0: 2.2.9-alt1.1
3.0: 1.0.4-alt1
www.altlinux.org/Changes

Группа :: Сети/Почта
Пакет: sylpheed

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: sylpheed-0.9.3cvs9-alt-wm_race.patch
Скачать


--- sylpheed/src/inputdialog.c.alt-wm_race	2003-07-13 17:08:04 +0400
+++ sylpheed/src/inputdialog.c	2003-07-13 17:38:10 +0400
@@ -243,6 +243,23 @@
 	manage_window_focus_out(dialog, NULL, NULL);
 	gtk_widget_hide(dialog);
 
+	/*
+	 * If input_dialog_open() is called two times in a row without any
+	 * delay, it triggers a bug in some window managers (observed in fvwm2,
+	 * kwin, waimea): the second time the dialog window is not displayed
+	 * but still grabs all input.  Apparently there is a race between
+	 * XWithdrawWindow() called by gtk_widget_hide() and XMapWindow()
+	 * called by gtk_widget_show().
+	 *
+	 * As a workaround we unrealize the toplevel dialog window - the next
+	 * time we show it, the window will be realized again, and hopefully
+	 * the WM won't confuse it with the old window.  However, we must be
+	 * careful to avoid triggering another GTK+ bug - this window contains
+	 * GtkEntry, which has problems with selection handling when
+	 * unrealized, so we must use the gtkut_widget_unrealize() wrapper.
+	 */
+	gtkut_widget_unrealize(dialog);
+
 	if (ack) {
 		GtkEditable *editable;
 
--- sylpheed/src/gtkutils.c.alt-wm_race	2003-04-11 20:06:42 +0400
+++ sylpheed/src/gtkutils.c	2003-07-13 17:38:10 +0400
@@ -382,6 +382,15 @@
 	gtk_container_remove(container, widget);
 }
 
+/*
+ * The same workaround for gtk_widget_unrealize.
+ */
+void gtkut_widget_unrealize(GtkWidget *widget)
+{
+	gtkut_check_before_remove(widget, NULL);
+	gtk_widget_unrealize(widget);
+}
+
 gboolean gtkut_stext_match_string(GtkSText *text, gint pos, wchar_t *wcs,
 				  gint len, gboolean case_sens)
 {
--- sylpheed/src/gtkutils.h.alt-wm_race	2003-04-11 20:06:42 +0400
+++ sylpheed/src/gtkutils.h	2003-07-13 17:38:10 +0400
@@ -115,6 +115,7 @@
 
 void gtkut_container_remove		(GtkContainer	*container,
 					 GtkWidget	*widget);
+void gtkut_widget_unrealize		(GtkWidget	*widget);
 
 gboolean gtkut_stext_match_string	(GtkSText	*text,
 					 gint		 pos,
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin