Changeset 197f54a2b9 in tspsg for src
- Timestamp:
- Sep 12, 2012, 6:55:57 PM (12 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- 545591d1a9
- Parents:
- 89e5214692
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/qtwin.cpp
r89e5214692 r197f54a2b9 15 15 #include <QPointer> 16 16 17 //! \todo TODO: Detect X11 in Qt 5 more reliably 18 // No Q_WS_X11 in Qt 5. Check if we're using X11 and define it. 19 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) && defined(Q_OS_UNIX) && !defined(Q_WS_X11) 20 # if !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN) && !defined(Q_WS_QPA) 21 # define Q_WS_X11 22 # endif 23 #endif 24 17 25 #ifdef Q_WS_X11 18 #include < QX11Info>26 #include <X11/Xlib.h> 19 27 #endif // Q_WS_X11 20 28 … … 109 117 return false; 110 118 #elif defined(Q_WS_X11) 111 return QX11Info::isCompositingManagerRunning(); 119 Display *d = XOpenDisplay(NULL); 120 Atom _NET_WM_CM_S0 = XInternAtom(d, "_NET_WM_CM_S0", true); 121 bool result = (_NET_WM_CM_S0 != None); 122 if (result) 123 result = (XGetSelectionOwner(d, _NET_WM_CM_S0) != None); 124 XCloseDisplay(d); 125 return result; 112 126 #else 113 127 //! \todo TODO: Check for trsnsparency support in other OSes.
Note: See TracChangeset
for help on using the changeset viewer.