firewalld/firewalld-0.2.12-bz903475.patch

58 lines
2.2 KiB
Diff
Raw Normal View History

From e2ae60bf86335ea914574174a722f0ffdfb81e2f Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Tue, 26 Feb 2013 18:36:41 +0100
Subject: [PATCH] Fix interaction problem of changed event of gtk combobox with
polkit-kde by processing all remaining events.
The changed callback is signaled before the popup window has been
destroyed and before the focus (keyboard and mouse) has been reset.
This results in a deadlock in KDE and Qt, because the polkit KDE
agent can not get the focus and the user has no chance to enter the
desired password into the agent and is also not able to close the
agent with the mouse. The focus is still on the combobox popup.
Update: Use gdk, code by Ray Strode
Revert "Fix interaction problem of changed event of gtk combobox with polkit-kde"
This reverts commit f57e72ba526e3cd982c8fc072cefc9efd616b428.
---
src/firewall-config | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/firewall-config b/src/firewall-config
index 199f202..9f4566a 100755
--- a/src/firewall-config
+++ b/src/firewall-config
@@ -23,7 +23,7 @@
import sys
try:
- from gi.repository import Gtk
+ from gi.repository import Gtk, Gdk
except RuntimeError as e:
print ("firewall-config: %s" % e)
print ("This is a graphical application and requires DISPLAY to be set.")
@@ -810,6 +810,17 @@ class FirewallConfig(object):
self.fw.reload()
def onChangeView(self, *args):
+ # Fix interaction problem of changed event of gtk combobox with
+ # polkit-kde by processing all remaining events.
+ #
+ # The changed callback is signaled before the popup window has been
+ # destroyed and before the focus (keyboard and mouse) has been reset.
+ # This results in a deadlock in KDE and Qt, because the polkit KDE
+ # agent can not get the focus and the user has no chance to enter the
+ # desired password into the agent and is also not able to close the
+ # agent with the mouse. The focus is still on the combobox popup.
+ Gdk.DisplayManager.get().get_default_display().flush()
+
self.runtime_view = (self.currentViewCombobox.get_active_text() == \
_("Runtime Configuration"))
--
1.8.1.4