Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37762307
en ru br
ALT Linux repos
S:4.8.7-alt25
5.0: 4.5.2-alt1.M50.1
4.1: 4.4.3-alt1.M41.1
4.0: 4.3.4-alt5.M40.1
3.0: 4.0.1-alt1
+updates:4.0.1-alt2
+backports:4.2.3-alt7.1.M30

Group :: System/Libraries
RPM: qt4

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0195-compositing-properties.diff
Download


qt-bugs@ issue : none
bugs.kde.org number : none
applied: no
author: Lubos Lunak <l.lunak@kde.org>
This patch makes override-redirect windows (popup menu, dropdown menu,
tooltip, combobox, etc.) also have more window properties like WM_CLASS,
so they can be used when compositing.
Index: src/gui/kernel/qwidget_x11.cpp
===================================================================
--- src/gui/kernel/qwidget_x11.cpp.orig
+++ src/gui/kernel/qwidget_x11.cpp
@@ -768,6 +768,11 @@ void QWidgetPrivate::create_sys(WId wind
         Q_ASSERT(id);
         XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
                                 &wsa);
+        XClassHint class_hint;
+        QByteArray appName = qAppName().toLatin1();
+        class_hint.res_name = appName.data(); // application name
+        class_hint.res_class = const_cast<char *>(QX11Info::appClass());   // application class
+        XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
     } else if (topLevel && !desktop) {        // top-level widget
         if (!X11->wm_client_leader)
             create_wm_client_leader();
@@ -821,13 +826,21 @@ void QWidgetPrivate::create_sys(WId wind
         // set EWMH window types
         setNetWmWindowTypes();
 
+        // when we create a toplevel widget, the frame strut should be dirty
+        data.fstrut_dirty = 1;
+
+    } else {
+        // non-toplevel widgets don't have a frame, so no need to
+        // update the strut
+        data.fstrut_dirty = 0;
+    }
+
+    if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
         // set _NET_WM_PID
         long curr_pid = getpid();
         XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
                         (unsigned char *) &curr_pid, 1);
 
-        // when we create a toplevel widget, the frame strut should be dirty
-        data.fstrut_dirty = 1;
 
         // declare the widget's window role
         if (QTLWExtra *topData = maybeTopData()) {
@@ -843,10 +856,6 @@ void QWidgetPrivate::create_sys(WId wind
         XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
                         XA_WINDOW, 32, PropModeReplace,
                         (unsigned char *)&X11->wm_client_leader, 1);
-    } else {
-        // non-toplevel widgets don't have a frame, so no need to
-        // update the strut
-        data.fstrut_dirty = 0;
     }
 
     if (initializeWindow && q->internalWinId()) {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin