]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - qt/patches/0002-This-patch-makes-override-redirect-windows-popup-men.patch
Move all packages to root.
[people/arne_f/ipfire-3.x.git] / qt / patches / 0002-This-patch-makes-override-redirect-windows-popup-men.patch
1 From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001
2 From: Lubos Lunak <l.lunak@kde.org>
3 Date: Tue, 2 Oct 2007 16:08:32 +0200
4 Subject: [PATCH 02/13] This patch makes override-redirect windows (popup menu, dropdown menu,
5 tooltip, combobox, etc.) also have more window properties like WM_CLASS,
6 so they can be used when compositing.
7
8 qt-bugs@ issue : none
9 bugs.kde.org number : none
10 ---
11 src/gui/kernel/qwidget_x11.cpp | 21 +++++++++++++++------
12 1 files changed, 15 insertions(+), 6 deletions(-)
13
14 diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
15 index 79ee8c9..a74a849 100644
16 --- a/src/gui/kernel/qwidget_x11.cpp
17 +++ b/src/gui/kernel/qwidget_x11.cpp
18 @@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
19 Q_ASSERT(id);
20 XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
21 &wsa);
22 + XClassHint class_hint;
23 + QByteArray appName = qAppName().toLatin1();
24 + class_hint.res_name = appName.data(); // application name
25 + class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class
26 + XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
27 } else if (topLevel && !desktop) { // top-level widget
28 if (!X11->wm_client_leader)
29 create_wm_client_leader();
30 @@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
31 // set EWMH window types
32 setNetWmWindowTypes();
33
34 + // when we create a toplevel widget, the frame strut should be dirty
35 + data.fstrut_dirty = 1;
36 +
37 + } else {
38 + // non-toplevel widgets don't have a frame, so no need to
39 + // update the strut
40 + data.fstrut_dirty = 0;
41 + }
42 +
43 + if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
44 // set _NET_WM_PID
45 long curr_pid = getpid();
46 XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
47 (unsigned char *) &curr_pid, 1);
48
49 - // when we create a toplevel widget, the frame strut should be dirty
50 - data.fstrut_dirty = 1;
51
52 // declare the widget's window role
53 if (QTLWExtra *topData = maybeTopData()) {
54 @@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
55 XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
56 XA_WINDOW, 32, PropModeReplace,
57 (unsigned char *)&X11->wm_client_leader, 1);
58 - } else {
59 - // non-toplevel widgets don't have a frame, so no need to
60 - // update the strut
61 - data.fstrut_dirty = 0;
62 }
63
64 if (initializeWindow && q->internalWinId()) {
65 --
66 1.6.5.1
67