[SCM] Qt 4 packaging branch, experimental, updated. debian/4.7.4-1-48-g361be8b

Fathi Boudra fabo at alioth.debian.org
Thu Dec 29 10:05:44 UTC 2011


The following commit has been merged in the experimental branch:
commit 441d8a28323bf6f22896b5c93c5a6412194502f9
Author: Fathi Boudra <fabo at debian.org>
Date:   Thu Dec 29 12:03:48 2011 +0200

    Add QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
---
 debian/changelog                                   |    2 +
 ..._not_clickable_when_run_under_gnome-shell.patch |   97 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 3 files changed, 100 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4e576e2..4365a74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ qt4-x11 (4:4.8.0-0multiarch1) UNRELEASED; urgency=low
       string literal and no format arguments.
     - fix_qvfb_build.patch - fix qvfb build on Qt 4.8.0
     - QTBUG-14724_close_orphaned_file_descriptors_after_printing.patch
+    - QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_
+      gnome-shell.patch
   * Update debian/compat: bump to 9 for multiarch.
   * Update debian/control:
     - mark Qt libraries as Multi-Arch.
diff --git a/debian/patches/QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch b/debian/patches/QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
new file mode 100644
index 0000000..2152dbb
--- /dev/null
+++ b/debian/patches/QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
@@ -0,0 +1,97 @@
+From a91e9dd202640598d8dec091c67ec94536390e7f Mon Sep 17 00:00:00 2001
+From: "Owen W. Taylor" <otaylor at fishsoup.net>
+Date: Mon, 17 Oct 2011 17:27:43 -0400
+Subject: [PATCH] Fix logic for figuring out what ConfigureNotify positions can be trusted
+
+When reading ahead in the queue for ConfigureNotify events, it's necessary
+to look for intermediate ReparentNotify events as well, since they will
+determine whether the position in the event can be trusted or not.
+
+Bug: https://bugreports.qt.nokia.com/browse/QTBUG-21900
+---
+ src/gui/kernel/qapplication_x11.cpp |   47 +++++++++++++++++++++++++++++++-----
+ 1 file changed, 41 insertions(+), 6 deletions(-)
+
+--- a/src/gui/kernel/qapplication_x11.cpp
++++ b/src/gui/kernel/qapplication_x11.cpp
+@@ -816,6 +816,27 @@ static Bool qt_sync_request_scanner(Disp
+ #endif
+ #endif // QT_NO_XSYNC
+ 
++struct qt_configure_event_data
++{
++    WId window;
++    WId parent;
++};
++
++static Bool qt_configure_event_scanner(Display*, XEvent *event, XPointer arg)
++{
++    qt_configure_event_data *data =
++        reinterpret_cast<qt_configure_event_data*>(arg);
++    if (event->type == ConfigureNotify &&
++        event->xconfigure.window == data->window) {
++        return true;
++    } else if (event->type == ReparentNotify &&
++               event->xreparent.window == data->window) {
++        data->parent = event->xreparent.parent;
++    }
++
++    return false;
++}
++
+ static void qt_x11_create_intern_atoms()
+ {
+     const char *names[QX11Data::NAtoms];
+@@ -5273,8 +5294,11 @@ bool QETWidget::translateConfigEvent(con
+         if (d->extra->compress_events) {
+             // ConfigureNotify compression for faster opaque resizing
+             XEvent otherEvent;
+-            while (XCheckTypedWindowEvent(X11->display, internalWinId(), ConfigureNotify,
+-                                          &otherEvent)) {
++            qt_configure_event_data configureData;
++            configureData.window = internalWinId();
++            configureData.parent = d->topData()->parentWinId;
++            while (XCheckIfEvent(X11->display, &otherEvent,
++                                 &qt_configure_event_scanner, (XPointer)&configureData)) {
+                 if (qt_x11EventFilter(&otherEvent))
+                     continue;
+ 
+@@ -5287,13 +5311,19 @@ bool QETWidget::translateConfigEvent(con
+                 newSize.setWidth(otherEvent.xconfigure.width);
+                 newSize.setHeight(otherEvent.xconfigure.height);
+ 
++                trust = isVisible()
++                        && (configureData.parent == XNone ||
++                            configureData.parent == QX11Info::appRootWindow());
++
+                 if (otherEvent.xconfigure.send_event || trust) {
+                     newCPos.rx() = otherEvent.xconfigure.x +
+                                    otherEvent.xconfigure.border_width;
+                     newCPos.ry() = otherEvent.xconfigure.y +
+                                    otherEvent.xconfigure.border_width;
+                     isCPos = true;
+-                }
++                } else {
++                    isCPos = false;
++               }
+             }
+ #ifndef QT_NO_XSYNC
+             qt_sync_request_event_data sync_event;
+@@ -5306,9 +5336,14 @@ bool QETWidget::translateConfigEvent(con
+         }
+ 
+         if (!isCPos) {
+-            // we didn't get an updated position of the toplevel.
+-            // either we haven't moved or there is a bug in the window manager.
+-            // anyway, let's query the position to be certain.
++            // If the last configure event didn't have a trustable position,
++            // it's necessary to query, see ICCCM 4.24:
++            //
++            // Any real ConfigureNotify event on a top-level window implies
++            // that the window position on the root may have changed, even
++            // though the event reports that the window position in its
++            // parent is unchanged because the window may have been reparented.
++
+             int x, y;
+             Window child;
+             XTranslateCoordinates(X11->display, internalWinId(),
diff --git a/debian/patches/series b/debian/patches/series
index 729494d..1b65d57 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,7 @@
 # upstream patches
 Add_support_for_QT_USE_DRAG_DISTANCE_env_var.patch
 QTBUG-14724_close_orphaned_file_descriptors_after_printing.patch
+QTBUG-21900_Buttons_in_Qt_applications_not_clickable_when_run_under_gnome-shell.patch
 
 # qt-copy patches
 0195-compositing-properties.diff

-- 
Qt 4 packaging



More information about the pkg-kde-commits mailing list