summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index bf956841ff..b71ae73a46 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -79,7 +79,7 @@
#include <private/qcolor_p.h>
#include <private/qcursor_p.h>
#include <private/qiconloader_p.h>
-#include <private/gtksymbols_p.h>
+#include <qgtkstyle.h>
#include "qstyle.h"
#include "qmetaobject.h"
#include "qtimer.h"
@@ -1625,6 +1625,7 @@ void qt_init(QApplicationPrivate *priv, int,
// MIT-SHM
X11->use_mitshm = false;
+ X11->use_mitshm_pixmaps = false;
X11->mitshm_major = 0;
X11->sip_serial = 0;
@@ -1918,12 +1919,13 @@ void qt_init(QApplicationPrivate *priv, int,
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
- X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000
- || defaultVisual->red_mask == 0xf800)
- && (defaultVisual->green_mask == 0xff00
- || defaultVisual->green_mask == 0x7e0)
- && (defaultVisual->blue_mask == 0xff
- || defaultVisual->blue_mask == 0x1f));
+ X11->use_mitshm = ((defaultVisual->red_mask == 0xff0000
+ || defaultVisual->red_mask == 0xf800)
+ && (defaultVisual->green_mask == 0xff00
+ || defaultVisual->green_mask == 0x7e0)
+ && (defaultVisual->blue_mask == 0xff
+ || defaultVisual->blue_mask == 0x1f));
+ X11->use_mitshm_pixmaps = X11->use_mitshm && mitshm_pixmaps;
}
}
#endif // QT_NO_MITSHM
@@ -2297,7 +2299,7 @@ void qt_init(QApplicationPrivate *priv, int,
#if !defined(QT_NO_STYLE_GTK)
if (X11->desktopEnvironment == DE_GNOME) {
- static bool menusHaveIcons = QGtk::getGConfBool(QLatin1String("/desktop/gnome/interface/menus_have_icons"), true);
+ static bool menusHaveIcons = QGtkStyle::getGConfBool(QLatin1String("/desktop/gnome/interface/menus_have_icons"), true);
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus, !menusHaveIcons);
}
#endif
@@ -3750,6 +3752,12 @@ int QApplication::x11ProcessEvent(XEvent* event)
qt_get_net_virtual_roots();
} else if (event->xproperty.atom == ATOM(_NET_WORKAREA)) {
qt_desktopwidget_update_workarea();
+
+ // emit the workAreaResized() signal
+ QDesktopWidget *desktop = QApplication::desktop();
+ int numScreens = desktop->numScreens();
+ for (int i = 0; i < numScreens; ++i)
+ emit desktop->workAreaResized(i);
}
} else if (widget) {
widget->translatePropertyEvent(event);