Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||
8 | QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t *screen, int number) | - | ||||||||||||||||||||||||
9 | : QXcbObject(connection) | - | ||||||||||||||||||||||||
10 | , m_screen(screen) | - | ||||||||||||||||||||||||
11 | , m_number(number) | - | ||||||||||||||||||||||||
12 | , m_xSettings(nullptr) | - | ||||||||||||||||||||||||
13 | { | - | ||||||||||||||||||||||||
14 | QByteArray cmAtomName("_NET_WM_CM_S"); | - | ||||||||||||||||||||||||
15 | cmAtomName += QByteArray::number(m_number); | - | ||||||||||||||||||||||||
16 | m_net_wm_cm_atom = connection->internAtom(cmAtomName.constData()); | - | ||||||||||||||||||||||||
17 | m_compositingActive = connection->getSelectionOwner(m_net_wm_cm_atom); | - | ||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||
19 | m_workArea = getWorkArea(); | - | ||||||||||||||||||||||||
20 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
21 | - | |||||||||||||||||||||||||
22 | QXcbVirtualDesktop::~QXcbVirtualDesktop() | - | ||||||||||||||||||||||||
23 | { | - | ||||||||||||||||||||||||
24 | delete m_xSettings; | - | ||||||||||||||||||||||||
25 | } executed 341 times by 220 tests: end of block Executed by:
| 341 | ||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||
27 | QXcbScreen *QXcbVirtualDesktop::screenAt(const QPoint &pos) const | - | ||||||||||||||||||||||||
28 | { | - | ||||||||||||||||||||||||
29 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(connection()->screens())>::type> _container_((connection()->screens())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QXcbScreen *screen = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||
30 | if (screen->virtualDesktop() == this
| 0 | ||||||||||||||||||||||||
31 | return never executed: screen;return screen; never executed: return screen; | 0 | ||||||||||||||||||||||||
32 | } never executed: end of block | 0 | ||||||||||||||||||||||||
33 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||||||||||||||||||||
34 | } | - | ||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||
36 | void QXcbVirtualDesktop::addScreen(QPlatformScreen *s) | - | ||||||||||||||||||||||||
37 | { | - | ||||||||||||||||||||||||
38 | ((QXcbScreen *) s)->isPrimary() ? m_screens.prepend(s) : m_screens.append(s); | - | ||||||||||||||||||||||||
39 | } never executed: end of block | 0 | ||||||||||||||||||||||||
40 | - | |||||||||||||||||||||||||
41 | void QXcbVirtualDesktop::setPrimaryScreen(QPlatformScreen *s) | - | ||||||||||||||||||||||||
42 | { | - | ||||||||||||||||||||||||
43 | const int idx = m_screens.indexOf(s); | - | ||||||||||||||||||||||||
44 | ((!(idx > -1)) ? qt_assert("idx > -1",__FILE__,87) : qt_noop()); | - | ||||||||||||||||||||||||
45 | m_screens.swap(0, idx); | - | ||||||||||||||||||||||||
46 | } never executed: end of block | 0 | ||||||||||||||||||||||||
47 | - | |||||||||||||||||||||||||
48 | QXcbXSettings *QXcbVirtualDesktop::xSettings() const | - | ||||||||||||||||||||||||
49 | { | - | ||||||||||||||||||||||||
50 | if (!m_xSettings
| 19-57 | ||||||||||||||||||||||||
51 | QXcbVirtualDesktop *self = const_cast<QXcbVirtualDesktop *>(this); | - | ||||||||||||||||||||||||
52 | self->m_xSettings = new QXcbXSettings(self); | - | ||||||||||||||||||||||||
53 | } executed 19 times by 19 tests: end of block Executed by:
| 19 | ||||||||||||||||||||||||
54 | return executed 76 times by 38 tests: m_xSettings;return m_xSettings; Executed by:
executed 76 times by 38 tests: return m_xSettings; Executed by:
| 76 | ||||||||||||||||||||||||
55 | } | - | ||||||||||||||||||||||||
56 | - | |||||||||||||||||||||||||
57 | bool QXcbVirtualDesktop::compositingActive() const | - | ||||||||||||||||||||||||
58 | { | - | ||||||||||||||||||||||||
59 | if (connection()->hasXFixes()
| 0 | ||||||||||||||||||||||||
60 | return never executed: m_compositingActive;return m_compositingActive; never executed: return m_compositingActive; | 0 | ||||||||||||||||||||||||
61 | else | - | ||||||||||||||||||||||||
62 | return never executed: connection()->getSelectionOwner(m_net_wm_cm_atom);return connection()->getSelectionOwner(m_net_wm_cm_atom); never executed: return connection()->getSelectionOwner(m_net_wm_cm_atom); | 0 | ||||||||||||||||||||||||
63 | } | - | ||||||||||||||||||||||||
64 | - | |||||||||||||||||||||||||
65 | void QXcbVirtualDesktop::handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event) | - | ||||||||||||||||||||||||
66 | { | - | ||||||||||||||||||||||||
67 | if (notify_event->selection == m_net_wm_cm_atom
| 0-67 | ||||||||||||||||||||||||
68 | m_compositingActive = notify_event->owner; never executed: m_compositingActive = notify_event->owner; | 0 | ||||||||||||||||||||||||
69 | } executed 67 times by 6 tests: end of block Executed by:
| 67 | ||||||||||||||||||||||||
70 | - | |||||||||||||||||||||||||
71 | void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify() | - | ||||||||||||||||||||||||
72 | { | - | ||||||||||||||||||||||||
73 | if (connection()->hasXFixes()
| 0-129 | ||||||||||||||||||||||||
74 | const uint32_t mask = XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER | | - | ||||||||||||||||||||||||
75 | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY | | - | ||||||||||||||||||||||||
76 | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE; | - | ||||||||||||||||||||||||
77 | xcb_xfixes_select_selection_input_checked(xcb_connection(), connection()->getQtSelectionOwner(), m_net_wm_cm_atom, mask); | - | ||||||||||||||||||||||||
78 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
79 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
80 | - | |||||||||||||||||||||||||
81 | QRect QXcbVirtualDesktop::getWorkArea() const | - | ||||||||||||||||||||||||
82 | { | - | ||||||||||||||||||||||||
83 | QRect r; | - | ||||||||||||||||||||||||
84 | xcb_get_property_reply_t * workArea = | - | ||||||||||||||||||||||||
85 | xcb_get_property_reply(xcb_connection(), | - | ||||||||||||||||||||||||
86 | xcb_get_property_unchecked(xcb_connection(), false, screen()->root, | - | ||||||||||||||||||||||||
87 | atom(QXcbAtom::_NET_WORKAREA), | - | ||||||||||||||||||||||||
88 | XCB_ATOM_CARDINAL, 0, 1024), __null); | - | ||||||||||||||||||||||||
89 | if (workArea
| 0-129 | ||||||||||||||||||||||||
90 | - | |||||||||||||||||||||||||
91 | - | |||||||||||||||||||||||||
92 | - | |||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||
94 | - | |||||||||||||||||||||||||
95 | - | |||||||||||||||||||||||||
96 | uint32_t *geom = (uint32_t*)xcb_get_property_value(workArea); | - | ||||||||||||||||||||||||
97 | r = QRect(geom[0], geom[1], geom[2], geom[3]); | - | ||||||||||||||||||||||||
98 | } executed 129 times by 5 tests: else {end of block Executed by:
| 129 | ||||||||||||||||||||||||
99 | r = QRect(QPoint(), size()); | - | ||||||||||||||||||||||||
100 | } never executed: end of block | 0 | ||||||||||||||||||||||||
101 | free(workArea); | - | ||||||||||||||||||||||||
102 | return executed 129 times by 5 tests: r;return r; Executed by:
executed 129 times by 5 tests: return r; Executed by:
| 129 | ||||||||||||||||||||||||
103 | } | - | ||||||||||||||||||||||||
104 | - | |||||||||||||||||||||||||
105 | void QXcbVirtualDesktop::updateWorkArea() | - | ||||||||||||||||||||||||
106 | { | - | ||||||||||||||||||||||||
107 | QRect workArea = getWorkArea(); | - | ||||||||||||||||||||||||
108 | if (m_workArea != workArea
| 0 | ||||||||||||||||||||||||
109 | m_workArea = workArea; | - | ||||||||||||||||||||||||
110 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(m_screens)>::type> _container_((m_screens)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QPlatformScreen *screen = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||
111 | (( never executed: QXcbScreen *)screen)->updateAvailableGeometry();((QXcbScreen *)screen)->updateAvailableGeometry(); never executed: ((QXcbScreen *)screen)->updateAvailableGeometry(); | 0 | ||||||||||||||||||||||||
112 | } never executed: end of block | 0 | ||||||||||||||||||||||||
113 | } never executed: end of block | 0 | ||||||||||||||||||||||||
114 | - | |||||||||||||||||||||||||
115 | static inline QSizeF sizeInMillimeters(const QSize &size, const QDpi &dpi) | - | ||||||||||||||||||||||||
116 | { | - | ||||||||||||||||||||||||
117 | return executed 129 times by 5 tests: QSizeF(Q_MM_PER_INCH * size.width() / dpi.first,return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second); Executed by:
executed 129 times by 5 tests: return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second); Executed by:
| 129 | ||||||||||||||||||||||||
118 | Q_MM_PER_INCH * size.height() / dpi.second); executed 129 times by 5 tests: return QSizeF(Q_MM_PER_INCH * size.width() / dpi.first, Q_MM_PER_INCH * size.height() / dpi.second); Executed by:
| 129 | ||||||||||||||||||||||||
119 | } | - | ||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||
121 | QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, | - | ||||||||||||||||||||||||
122 | xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output, | - | ||||||||||||||||||||||||
123 | const xcb_xinerama_screen_info_t *xineramaScreenInfo, int xineramaScreenIdx) | - | ||||||||||||||||||||||||
124 | : QXcbObject(connection) | - | ||||||||||||||||||||||||
125 | , m_virtualDesktop(virtualDesktop) | - | ||||||||||||||||||||||||
126 | , m_output(outputId) | - | ||||||||||||||||||||||||
127 | , m_crtc(output ? output->crtc : 0L) | - | ||||||||||||||||||||||||
128 | , m_mode(0L) | - | ||||||||||||||||||||||||
129 | , m_primary(false) | - | ||||||||||||||||||||||||
130 | , m_rotation(XCB_RANDR_ROTATION_ROTATE_0) | - | ||||||||||||||||||||||||
131 | , m_outputName(getOutputName(output)) | - | ||||||||||||||||||||||||
132 | , m_outputSizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize()) | - | ||||||||||||||||||||||||
133 | , m_virtualSize(virtualDesktop->size()) | - | ||||||||||||||||||||||||
134 | , m_virtualSizeMillimeters(virtualDesktop->physicalSize()) | - | ||||||||||||||||||||||||
135 | , m_orientation(Qt::PrimaryOrientation) | - | ||||||||||||||||||||||||
136 | , m_refreshRate(60) | - | ||||||||||||||||||||||||
137 | , m_forcedDpi(-1) | - | ||||||||||||||||||||||||
138 | , m_pixelDensity(1) | - | ||||||||||||||||||||||||
139 | , m_hintStyle(QFontEngine::HintStyle(-1)) | - | ||||||||||||||||||||||||
140 | , m_noFontHinting(false) | - | ||||||||||||||||||||||||
141 | , m_subpixelType(QFontEngine::SubpixelAntialiasingType(-1)) | - | ||||||||||||||||||||||||
142 | , m_antialiasingEnabled(-1) | - | ||||||||||||||||||||||||
143 | { | - | ||||||||||||||||||||||||
144 | if (connection->hasXRandr()
| 0-129 | ||||||||||||||||||||||||
145 | xcb_randr_select_input(xcb_connection(), screen()->root, true); | - | ||||||||||||||||||||||||
146 | xcb_randr_get_crtc_info_cookie_t crtcCookie = | - | ||||||||||||||||||||||||
147 | xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, output ? output->timestamp : 0); | - | ||||||||||||||||||||||||
148 | xcb_randr_get_crtc_info_reply_t *crtc = | - | ||||||||||||||||||||||||
149 | xcb_randr_get_crtc_info_reply(xcb_connection(), crtcCookie, __null); | - | ||||||||||||||||||||||||
150 | if (crtc
| 0-129 | ||||||||||||||||||||||||
151 | updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation); | - | ||||||||||||||||||||||||
152 | updateRefreshRate(crtc->mode); | - | ||||||||||||||||||||||||
153 | free(crtc); | - | ||||||||||||||||||||||||
154 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
155 | } executed 129 times by 5 tests: else if (xineramaScreenInfoend of block Executed by:
| 0-129 | ||||||||||||||||||||||||
156 | m_geometry = QRect(xineramaScreenInfo->x_org, xineramaScreenInfo->y_org, | - | ||||||||||||||||||||||||
157 | xineramaScreenInfo->width, xineramaScreenInfo->height); | - | ||||||||||||||||||||||||
158 | m_availableGeometry = m_geometry & m_virtualDesktop->workArea(); | - | ||||||||||||||||||||||||
159 | m_sizeMillimeters = sizeInMillimeters(m_geometry.size(), virtualDpi()); | - | ||||||||||||||||||||||||
160 | if (xineramaScreenIdx > -1
| 0 | ||||||||||||||||||||||||
161 | m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx); never executed: m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx); | 0 | ||||||||||||||||||||||||
162 | } never executed: end of block | 0 | ||||||||||||||||||||||||
163 | - | |||||||||||||||||||||||||
164 | if (m_geometry.isEmpty()
| 0-129 | ||||||||||||||||||||||||
165 | m_geometry = QRect(QPoint(), m_virtualSize); never executed: m_geometry = QRect(QPoint(), m_virtualSize); | 0 | ||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||
167 | if (m_availableGeometry.isEmpty()
| 0-129 | ||||||||||||||||||||||||
168 | m_availableGeometry = m_geometry & m_virtualDesktop->workArea(); never executed: m_availableGeometry = m_geometry & m_virtualDesktop->workArea(); | 0 | ||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||
170 | if (m_sizeMillimeters.isEmpty()
| 0-129 | ||||||||||||||||||||||||
171 | m_sizeMillimeters = m_virtualSizeMillimeters; never executed: m_sizeMillimeters = m_virtualSizeMillimeters; | 0 | ||||||||||||||||||||||||
172 | - | |||||||||||||||||||||||||
173 | readXResources(); | - | ||||||||||||||||||||||||
174 | - | |||||||||||||||||||||||||
175 | QScopedPointer<xcb_get_window_attributes_reply_t, QScopedPointerPodDeleter> rootAttribs( | - | ||||||||||||||||||||||||
176 | xcb_get_window_attributes_reply(xcb_connection(), | - | ||||||||||||||||||||||||
177 | xcb_get_window_attributes_unchecked(xcb_connection(), screen()->root), __null)); | - | ||||||||||||||||||||||||
178 | const quint32 existingEventMask = rootAttribs.isNull()
| 0-129 | ||||||||||||||||||||||||
179 | - | |||||||||||||||||||||||||
180 | const quint32 mask = XCB_CW_EVENT_MASK; | - | ||||||||||||||||||||||||
181 | const quint32 values[] = { | - | ||||||||||||||||||||||||
182 | - | |||||||||||||||||||||||||
183 | XCB_EVENT_MASK_ENTER_WINDOW | - | ||||||||||||||||||||||||
184 | | XCB_EVENT_MASK_LEAVE_WINDOW | - | ||||||||||||||||||||||||
185 | | XCB_EVENT_MASK_PROPERTY_CHANGE | - | ||||||||||||||||||||||||
186 | | XCB_EVENT_MASK_STRUCTURE_NOTIFY | - | ||||||||||||||||||||||||
187 | | existingEventMask | - | ||||||||||||||||||||||||
188 | }; | - | ||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||
190 | xcb_change_window_attributes(xcb_connection(), screen()->root, mask, values); | - | ||||||||||||||||||||||||
191 | - | |||||||||||||||||||||||||
192 | xcb_get_property_reply_t *reply = | - | ||||||||||||||||||||||||
193 | xcb_get_property_reply(xcb_connection(), | - | ||||||||||||||||||||||||
194 | xcb_get_property_unchecked(xcb_connection(), false, screen()->root, | - | ||||||||||||||||||||||||
195 | atom(QXcbAtom::_NET_SUPPORTING_WM_CHECK), | - | ||||||||||||||||||||||||
196 | XCB_ATOM_WINDOW, 0, 1024), __null); | - | ||||||||||||||||||||||||
197 | - | |||||||||||||||||||||||||
198 | if (reply
| 0-129 | ||||||||||||||||||||||||
199 | xcb_window_t windowManager = *((xcb_window_t *)xcb_get_property_value(reply)); | - | ||||||||||||||||||||||||
200 | - | |||||||||||||||||||||||||
201 | if (windowManager != XCB_WINDOW_NONE
| 0-129 | ||||||||||||||||||||||||
202 | xcb_get_property_reply_t *windowManagerReply = | - | ||||||||||||||||||||||||
203 | xcb_get_property_reply(xcb_connection(), | - | ||||||||||||||||||||||||
204 | xcb_get_property_unchecked(xcb_connection(), false, windowManager, | - | ||||||||||||||||||||||||
205 | atom(QXcbAtom::_NET_WM_NAME), | - | ||||||||||||||||||||||||
206 | atom(QXcbAtom::UTF8_STRING), 0, 1024), __null); | - | ||||||||||||||||||||||||
207 | if (windowManagerReply
| 0-129 | ||||||||||||||||||||||||
208 | m_windowManagerName = QString::fromUtf8((const char *)xcb_get_property_value(windowManagerReply), xcb_get_property_value_length(windowManagerReply)); | - | ||||||||||||||||||||||||
209 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
210 | - | |||||||||||||||||||||||||
211 | free(windowManagerReply); | - | ||||||||||||||||||||||||
212 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
213 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
214 | free(reply); | - | ||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||
216 | const xcb_query_extension_reply_t *sync_reply = xcb_get_extension_data(xcb_connection(), &xcb_sync_id); | - | ||||||||||||||||||||||||
217 | if (!sync_reply
| 0-129 | ||||||||||||||||||||||||
218 | m_syncRequestSupported = false; never executed: m_syncRequestSupported = false; | 0 | ||||||||||||||||||||||||
219 | else | - | ||||||||||||||||||||||||
220 | m_syncRequestSupported = true; executed 129 times by 5 tests: m_syncRequestSupported = true; Executed by:
| 129 | ||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||
222 | xcb_depth_iterator_t depth_iterator = | - | ||||||||||||||||||||||||
223 | xcb_screen_allowed_depths_iterator(screen()); | - | ||||||||||||||||||||||||
224 | - | |||||||||||||||||||||||||
225 | while (depth_iterator.rem
| 129-903 | ||||||||||||||||||||||||
226 | xcb_depth_t *depth = depth_iterator.data; | - | ||||||||||||||||||||||||
227 | xcb_visualtype_iterator_t visualtype_iterator = | - | ||||||||||||||||||||||||
228 | xcb_depth_visuals_iterator(depth); | - | ||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||
230 | while (visualtype_iterator.rem
| 903-15480 | ||||||||||||||||||||||||
231 | xcb_visualtype_t *visualtype = visualtype_iterator.data; | - | ||||||||||||||||||||||||
232 | m_visuals.insert(visualtype->visual_id, *visualtype); | - | ||||||||||||||||||||||||
233 | m_visualDepths.insert(visualtype->visual_id, depth->depth); | - | ||||||||||||||||||||||||
234 | xcb_visualtype_next(&visualtype_iterator); | - | ||||||||||||||||||||||||
235 | } executed 15480 times by 5 tests: end of block Executed by:
| 15480 | ||||||||||||||||||||||||
236 | - | |||||||||||||||||||||||||
237 | xcb_depth_next(&depth_iterator); | - | ||||||||||||||||||||||||
238 | } executed 903 times by 5 tests: end of block Executed by:
| 903 | ||||||||||||||||||||||||
239 | - | |||||||||||||||||||||||||
240 | m_cursor = new QXcbCursor(connection, this); | - | ||||||||||||||||||||||||
241 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
242 | - | |||||||||||||||||||||||||
243 | QXcbScreen::~QXcbScreen() | - | ||||||||||||||||||||||||
244 | { | - | ||||||||||||||||||||||||
245 | delete m_cursor; | - | ||||||||||||||||||||||||
246 | } executed 341 times by 220 tests: end of block Executed by:
| 341 | ||||||||||||||||||||||||
247 | - | |||||||||||||||||||||||||
248 | QString QXcbScreen::getOutputName(xcb_randr_get_output_info_reply_t *outputInfo) | - | ||||||||||||||||||||||||
249 | { | - | ||||||||||||||||||||||||
250 | QString name; | - | ||||||||||||||||||||||||
251 | if (outputInfo
| 0-129 | ||||||||||||||||||||||||
252 | name = QString::fromUtf8((const char*)xcb_randr_get_output_info_name(outputInfo), | - | ||||||||||||||||||||||||
253 | xcb_randr_get_output_info_name_length(outputInfo)); | - | ||||||||||||||||||||||||
254 | } executed 129 times by 5 tests: else {end of block Executed by:
| 129 | ||||||||||||||||||||||||
255 | QByteArray displayName = connection()->displayName(); | - | ||||||||||||||||||||||||
256 | int dotPos = displayName.lastIndexOf('.'); | - | ||||||||||||||||||||||||
257 | if (dotPos != -1
| 0 | ||||||||||||||||||||||||
258 | displayName.truncate(dotPos); never executed: displayName.truncate(dotPos); | 0 | ||||||||||||||||||||||||
259 | name = QString::fromLocal8Bit(displayName) + QLatin1Char('.') | - | ||||||||||||||||||||||||
260 | + QString::number(m_virtualDesktop->number()); | - | ||||||||||||||||||||||||
261 | } never executed: end of block | 0 | ||||||||||||||||||||||||
262 | return executed 129 times by 5 tests: name;return name; Executed by:
executed 129 times by 5 tests: return name; Executed by:
| 129 | ||||||||||||||||||||||||
263 | } | - | ||||||||||||||||||||||||
264 | - | |||||||||||||||||||||||||
265 | QWindow *QXcbScreen::topLevelAt(const QPoint &p) const | - | ||||||||||||||||||||||||
266 | { | - | ||||||||||||||||||||||||
267 | xcb_window_t root = screen()->root; | - | ||||||||||||||||||||||||
268 | - | |||||||||||||||||||||||||
269 | int x = p.x(); | - | ||||||||||||||||||||||||
270 | int y = p.y(); | - | ||||||||||||||||||||||||
271 | - | |||||||||||||||||||||||||
272 | xcb_window_t parent = root; | - | ||||||||||||||||||||||||
273 | xcb_window_t child = root; | - | ||||||||||||||||||||||||
274 | - | |||||||||||||||||||||||||
275 | do { | - | ||||||||||||||||||||||||
276 | xcb_translate_coordinates_cookie_t translate_cookie = | - | ||||||||||||||||||||||||
277 | xcb_translate_coordinates_unchecked(xcb_connection(), parent, child, x, y); | - | ||||||||||||||||||||||||
278 | - | |||||||||||||||||||||||||
279 | xcb_translate_coordinates_reply_t *translate_reply = | - | ||||||||||||||||||||||||
280 | xcb_translate_coordinates_reply(xcb_connection(), translate_cookie, __null); | - | ||||||||||||||||||||||||
281 | - | |||||||||||||||||||||||||
282 | if (!translate_reply
| 0-583 | ||||||||||||||||||||||||
283 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
284 | } | - | ||||||||||||||||||||||||
285 | - | |||||||||||||||||||||||||
286 | parent = child; | - | ||||||||||||||||||||||||
287 | child = translate_reply->child; | - | ||||||||||||||||||||||||
288 | x = translate_reply->dst_x; | - | ||||||||||||||||||||||||
289 | y = translate_reply->dst_y; | - | ||||||||||||||||||||||||
290 | - | |||||||||||||||||||||||||
291 | free(translate_reply); | - | ||||||||||||||||||||||||
292 | - | |||||||||||||||||||||||||
293 | if (!child
| 0-373 | ||||||||||||||||||||||||
294 | return executed 210 times by 17 tests: 0;return 0; Executed by:
executed 210 times by 17 tests: return 0; Executed by:
| 210 | ||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||
296 | QPlatformWindow *platformWindow = connection()->platformWindowFromId(child); | - | ||||||||||||||||||||||||
297 | if (platformWindow
| 69-304 | ||||||||||||||||||||||||
298 | return executed 69 times by 6 tests: platformWindow->window();return platformWindow->window(); Executed by:
executed 69 times by 6 tests: return platformWindow->window(); Executed by:
| 69 | ||||||||||||||||||||||||
299 | } executed 304 times by 19 tests: while (parent != childend of block Executed by:
| 0-304 | ||||||||||||||||||||||||
300 | - | |||||||||||||||||||||||||
301 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
302 | } | - | ||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||
304 | void QXcbScreen::windowShown(QXcbWindow *window) | - | ||||||||||||||||||||||||
305 | { | - | ||||||||||||||||||||||||
306 | - | |||||||||||||||||||||||||
307 | if (!connection()->startupId().isEmpty()
| 0-4054 | ||||||||||||||||||||||||
308 | sendStartupMessage(([]() -> QByteArray { enum { Size = sizeof("remove: ID=") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "remove: ID=" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return never executed: ba;return ba; never executed: }()) + connection()->startupId());return ba; | 0 | ||||||||||||||||||||||||
309 | connection()->clearStartupId(); | - | ||||||||||||||||||||||||
310 | } never executed: end of block | 0 | ||||||||||||||||||||||||
311 | } executed 4054 times by 122 tests: end of block Executed by:
| 4054 | ||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||
313 | void QXcbScreen::sendStartupMessage(const QByteArray &message) const | - | ||||||||||||||||||||||||
314 | { | - | ||||||||||||||||||||||||
315 | xcb_window_t rootWindow = root(); | - | ||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||
317 | xcb_client_message_event_t ev; | - | ||||||||||||||||||||||||
318 | ev.response_type = 33; | - | ||||||||||||||||||||||||
319 | ev.format = 8; | - | ||||||||||||||||||||||||
320 | ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO_BEGIN); | - | ||||||||||||||||||||||||
321 | ev.sequence = 0; | - | ||||||||||||||||||||||||
322 | ev.window = rootWindow; | - | ||||||||||||||||||||||||
323 | int sent = 0; | - | ||||||||||||||||||||||||
324 | int length = message.length() + 1; | - | ||||||||||||||||||||||||
325 | const char *data = message.constData(); | - | ||||||||||||||||||||||||
326 | do { | - | ||||||||||||||||||||||||
327 | if (sent == 20
| 0 | ||||||||||||||||||||||||
328 | ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO); never executed: ev.type = connection()->atom(QXcbAtom::_NET_STARTUP_INFO); | 0 | ||||||||||||||||||||||||
329 | - | |||||||||||||||||||||||||
330 | const int start = sent; | - | ||||||||||||||||||||||||
331 | const int numBytes = qMin(length - start, 20); | - | ||||||||||||||||||||||||
332 | memcpy(ev.data.data8, data + start, numBytes); | - | ||||||||||||||||||||||||
333 | xcb_send_event(connection()->xcb_connection(), false, rootWindow, XCB_EVENT_MASK_PROPERTY_CHANGE, (const char *) &ev); | - | ||||||||||||||||||||||||
334 | - | |||||||||||||||||||||||||
335 | sent += numBytes; | - | ||||||||||||||||||||||||
336 | } never executed: while (sent < lengthend of block
| 0 | ||||||||||||||||||||||||
337 | } never executed: end of block | 0 | ||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||
339 | const xcb_visualtype_t *QXcbScreen::visualForId(xcb_visualid_t visualid) const | - | ||||||||||||||||||||||||
340 | { | - | ||||||||||||||||||||||||
341 | QMap<xcb_visualid_t, xcb_visualtype_t>::const_iterator it = m_visuals.find(visualid); | - | ||||||||||||||||||||||||
342 | if (it == m_visuals.constEnd()
| 0-423 | ||||||||||||||||||||||||
343 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
344 | return executed 423 times by 124 tests: &*it;return &*it; Executed by:
executed 423 times by 124 tests: return &*it; Executed by:
| 423 | ||||||||||||||||||||||||
345 | } | - | ||||||||||||||||||||||||
346 | - | |||||||||||||||||||||||||
347 | quint8 QXcbScreen::depthOfVisual(xcb_visualid_t visualid) const | - | ||||||||||||||||||||||||
348 | { | - | ||||||||||||||||||||||||
349 | QMap<xcb_visualid_t, quint8>::const_iterator it = m_visualDepths.find(visualid); | - | ||||||||||||||||||||||||
350 | if (it == m_visualDepths.constEnd()
| 0-3 | ||||||||||||||||||||||||
351 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
352 | return executed 3 times by 1 test: *it;return *it; Executed by:
executed 3 times by 1 test: return *it; Executed by:
| 3 | ||||||||||||||||||||||||
353 | } | - | ||||||||||||||||||||||||
354 | - | |||||||||||||||||||||||||
355 | QImage::Format QXcbScreen::format() const | - | ||||||||||||||||||||||||
356 | { | - | ||||||||||||||||||||||||
357 | return executed 72855 times by 105 tests: QImage::Format_RGB32;return QImage::Format_RGB32; Executed by:
executed 72855 times by 105 tests: return QImage::Format_RGB32; Executed by:
| 72855 | ||||||||||||||||||||||||
358 | } | - | ||||||||||||||||||||||||
359 | - | |||||||||||||||||||||||||
360 | QDpi QXcbScreen::virtualDpi() const | - | ||||||||||||||||||||||||
361 | { | - | ||||||||||||||||||||||||
362 | return executed 129 times by 5 tests: QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(),return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height()); Executed by:
executed 129 times by 5 tests: return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height()); Executed by:
| 129 | ||||||||||||||||||||||||
363 | Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height()); executed 129 times by 5 tests: return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(), Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height()); Executed by:
| 129 | ||||||||||||||||||||||||
364 | } | - | ||||||||||||||||||||||||
365 | - | |||||||||||||||||||||||||
366 | - | |||||||||||||||||||||||||
367 | QDpi QXcbScreen::logicalDpi() const | - | ||||||||||||||||||||||||
368 | { | - | ||||||||||||||||||||||||
369 | static const int overrideDpi = qEnvironmentVariableIntValue("QT_FONT_DPI"); | - | ||||||||||||||||||||||||
370 | if (overrideDpi
| 0-404 | ||||||||||||||||||||||||
371 | return never executed: QDpi(overrideDpi, overrideDpi);return QDpi(overrideDpi, overrideDpi); never executed: return QDpi(overrideDpi, overrideDpi); | 0 | ||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||
373 | if (m_forcedDpi > 0
| 0-404 | ||||||||||||||||||||||||
374 | return executed 404 times by 8 tests: QDpi(m_forcedDpi, m_forcedDpi);return QDpi(m_forcedDpi, m_forcedDpi); Executed by:
executed 404 times by 8 tests: return QDpi(m_forcedDpi, m_forcedDpi); Executed by:
| 404 | ||||||||||||||||||||||||
375 | } | - | ||||||||||||||||||||||||
376 | return never executed: virtualDpi();return virtualDpi(); never executed: return virtualDpi(); | 0 | ||||||||||||||||||||||||
377 | } | - | ||||||||||||||||||||||||
378 | - | |||||||||||||||||||||||||
379 | qreal QXcbScreen::pixelDensity() const | - | ||||||||||||||||||||||||
380 | { | - | ||||||||||||||||||||||||
381 | return never executed: m_pixelDensity;return m_pixelDensity; never executed: return m_pixelDensity; | 0 | ||||||||||||||||||||||||
382 | } | - | ||||||||||||||||||||||||
383 | - | |||||||||||||||||||||||||
384 | QPlatformCursor *QXcbScreen::cursor() const | - | ||||||||||||||||||||||||
385 | { | - | ||||||||||||||||||||||||
386 | return executed 24058 times by 119 tests: m_cursor;return m_cursor; Executed by:
executed 24058 times by 119 tests: return m_cursor; Executed by:
| 24058 | ||||||||||||||||||||||||
387 | } | - | ||||||||||||||||||||||||
388 | - | |||||||||||||||||||||||||
389 | void QXcbScreen::setOutput(xcb_randr_output_t outputId, | - | ||||||||||||||||||||||||
390 | xcb_randr_get_output_info_reply_t *outputInfo) | - | ||||||||||||||||||||||||
391 | { | - | ||||||||||||||||||||||||
392 | m_output = outputId; | - | ||||||||||||||||||||||||
393 | m_crtc = outputInfo
| 0 | ||||||||||||||||||||||||
394 | m_mode = 0L; | - | ||||||||||||||||||||||||
395 | m_outputName = getOutputName(outputInfo); | - | ||||||||||||||||||||||||
396 | - | |||||||||||||||||||||||||
397 | } never executed: end of block | 0 | ||||||||||||||||||||||||
398 | - | |||||||||||||||||||||||||
399 | int QXcbScreen::virtualDesktopNumberStatic(const QScreen *screen) | - | ||||||||||||||||||||||||
400 | { | - | ||||||||||||||||||||||||
401 | if (screen
| 0 | ||||||||||||||||||||||||
402 | return never executed: static_cast<const QXcbScreen *>(screen->handle())->screenNumber();return static_cast<const QXcbScreen *>(screen->handle())->screenNumber(); never executed: return static_cast<const QXcbScreen *>(screen->handle())->screenNumber(); | 0 | ||||||||||||||||||||||||
403 | - | |||||||||||||||||||||||||
404 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
405 | } | - | ||||||||||||||||||||||||
406 | void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event) | - | ||||||||||||||||||||||||
407 | { | - | ||||||||||||||||||||||||
408 | - | |||||||||||||||||||||||||
409 | - | |||||||||||||||||||||||||
410 | - | |||||||||||||||||||||||||
411 | if (change_event->rotation == m_rotation
| 0 | ||||||||||||||||||||||||
412 | return; never executed: return; | 0 | ||||||||||||||||||||||||
413 | - | |||||||||||||||||||||||||
414 | m_rotation = change_event->rotation; | - | ||||||||||||||||||||||||
415 | switch (m_rotation) { | - | ||||||||||||||||||||||||
416 | case never executed: XCB_RANDR_ROTATION_ROTATE_0:case XCB_RANDR_ROTATION_ROTATE_0: never executed: case XCB_RANDR_ROTATION_ROTATE_0: | 0 | ||||||||||||||||||||||||
417 | m_orientation = Qt::LandscapeOrientation; | - | ||||||||||||||||||||||||
418 | m_virtualSize.setWidth(change_event->width); | - | ||||||||||||||||||||||||
419 | m_virtualSize.setHeight(change_event->height); | - | ||||||||||||||||||||||||
420 | m_virtualSizeMillimeters.setWidth(change_event->mwidth); | - | ||||||||||||||||||||||||
421 | m_virtualSizeMillimeters.setHeight(change_event->mheight); | - | ||||||||||||||||||||||||
422 | break; never executed: break; | 0 | ||||||||||||||||||||||||
423 | case never executed: XCB_RANDR_ROTATION_ROTATE_90:case XCB_RANDR_ROTATION_ROTATE_90: never executed: case XCB_RANDR_ROTATION_ROTATE_90: | 0 | ||||||||||||||||||||||||
424 | m_orientation = Qt::PortraitOrientation; | - | ||||||||||||||||||||||||
425 | m_virtualSize.setWidth(change_event->height); | - | ||||||||||||||||||||||||
426 | m_virtualSize.setHeight(change_event->width); | - | ||||||||||||||||||||||||
427 | m_virtualSizeMillimeters.setWidth(change_event->mheight); | - | ||||||||||||||||||||||||
428 | m_virtualSizeMillimeters.setHeight(change_event->mwidth); | - | ||||||||||||||||||||||||
429 | break; never executed: break; | 0 | ||||||||||||||||||||||||
430 | case never executed: XCB_RANDR_ROTATION_ROTATE_180:case XCB_RANDR_ROTATION_ROTATE_180: never executed: case XCB_RANDR_ROTATION_ROTATE_180: | 0 | ||||||||||||||||||||||||
431 | m_orientation = Qt::InvertedLandscapeOrientation; | - | ||||||||||||||||||||||||
432 | m_virtualSize.setWidth(change_event->width); | - | ||||||||||||||||||||||||
433 | m_virtualSize.setHeight(change_event->height); | - | ||||||||||||||||||||||||
434 | m_virtualSizeMillimeters.setWidth(change_event->mwidth); | - | ||||||||||||||||||||||||
435 | m_virtualSizeMillimeters.setHeight(change_event->mheight); | - | ||||||||||||||||||||||||
436 | break; never executed: break; | 0 | ||||||||||||||||||||||||
437 | case never executed: XCB_RANDR_ROTATION_ROTATE_270:case XCB_RANDR_ROTATION_ROTATE_270: never executed: case XCB_RANDR_ROTATION_ROTATE_270: | 0 | ||||||||||||||||||||||||
438 | m_orientation = Qt::InvertedPortraitOrientation; | - | ||||||||||||||||||||||||
439 | m_virtualSize.setWidth(change_event->height); | - | ||||||||||||||||||||||||
440 | m_virtualSize.setHeight(change_event->width); | - | ||||||||||||||||||||||||
441 | m_virtualSizeMillimeters.setWidth(change_event->mheight); | - | ||||||||||||||||||||||||
442 | m_virtualSizeMillimeters.setHeight(change_event->mwidth); | - | ||||||||||||||||||||||||
443 | break; never executed: break; | 0 | ||||||||||||||||||||||||
444 | - | |||||||||||||||||||||||||
445 | - | |||||||||||||||||||||||||
446 | case never executed: XCB_RANDR_ROTATION_REFLECT_X:case XCB_RANDR_ROTATION_REFLECT_X: never executed: break;case XCB_RANDR_ROTATION_REFLECT_X: never executed: break; | 0 | ||||||||||||||||||||||||
447 | case never executed: XCB_RANDR_ROTATION_REFLECT_Y:case XCB_RANDR_ROTATION_REFLECT_Y: never executed: break;case XCB_RANDR_ROTATION_REFLECT_Y: never executed: break; | 0 | ||||||||||||||||||||||||
448 | } | - | ||||||||||||||||||||||||
449 | - | |||||||||||||||||||||||||
450 | updateGeometry(change_event->timestamp); | - | ||||||||||||||||||||||||
451 | - | |||||||||||||||||||||||||
452 | QWindowSystemInterface::handleScreenOrientationChange(QPlatformScreen::screen(), m_orientation); | - | ||||||||||||||||||||||||
453 | - | |||||||||||||||||||||||||
454 | QDpi ldpi = logicalDpi(); | - | ||||||||||||||||||||||||
455 | QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(), ldpi.first, ldpi.second); | - | ||||||||||||||||||||||||
456 | } never executed: end of block | 0 | ||||||||||||||||||||||||
457 | - | |||||||||||||||||||||||||
458 | void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp) | - | ||||||||||||||||||||||||
459 | { | - | ||||||||||||||||||||||||
460 | if (!connection()->hasXRandr()
| 0 | ||||||||||||||||||||||||
461 | return; never executed: return; | 0 | ||||||||||||||||||||||||
462 | - | |||||||||||||||||||||||||
463 | xcb_randr_get_crtc_info_cookie_t crtcCookie = | - | ||||||||||||||||||||||||
464 | xcb_randr_get_crtc_info_unchecked(xcb_connection(), m_crtc, timestamp); | - | ||||||||||||||||||||||||
465 | xcb_randr_get_crtc_info_reply_t *crtc = | - | ||||||||||||||||||||||||
466 | xcb_randr_get_crtc_info_reply(xcb_connection(), crtcCookie, __null); | - | ||||||||||||||||||||||||
467 | if (crtc
| 0 | ||||||||||||||||||||||||
468 | updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation); | - | ||||||||||||||||||||||||
469 | free(crtc); | - | ||||||||||||||||||||||||
470 | } never executed: end of block | 0 | ||||||||||||||||||||||||
471 | } never executed: end of block | 0 | ||||||||||||||||||||||||
472 | - | |||||||||||||||||||||||||
473 | void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation) | - | ||||||||||||||||||||||||
474 | { | - | ||||||||||||||||||||||||
475 | QRect xGeometry = geom; | - | ||||||||||||||||||||||||
476 | switch (rotation) { | - | ||||||||||||||||||||||||
477 | case executed 129 times by 5 tests: XCB_RANDR_ROTATION_ROTATE_0:case XCB_RANDR_ROTATION_ROTATE_0: Executed by:
executed 129 times by 5 tests: case XCB_RANDR_ROTATION_ROTATE_0: Executed by:
| 129 | ||||||||||||||||||||||||
478 | m_orientation = Qt::LandscapeOrientation; | - | ||||||||||||||||||||||||
479 | m_sizeMillimeters = m_outputSizeMillimeters; | - | ||||||||||||||||||||||||
480 | break; executed 129 times by 5 tests: break; Executed by:
| 129 | ||||||||||||||||||||||||
481 | case never executed: XCB_RANDR_ROTATION_ROTATE_90:case XCB_RANDR_ROTATION_ROTATE_90: never executed: case XCB_RANDR_ROTATION_ROTATE_90: | 0 | ||||||||||||||||||||||||
482 | m_orientation = Qt::PortraitOrientation; | - | ||||||||||||||||||||||||
483 | m_sizeMillimeters = m_outputSizeMillimeters.transposed(); | - | ||||||||||||||||||||||||
484 | break; never executed: break; | 0 | ||||||||||||||||||||||||
485 | case never executed: XCB_RANDR_ROTATION_ROTATE_180:case XCB_RANDR_ROTATION_ROTATE_180: never executed: case XCB_RANDR_ROTATION_ROTATE_180: | 0 | ||||||||||||||||||||||||
486 | m_orientation = Qt::InvertedLandscapeOrientation; | - | ||||||||||||||||||||||||
487 | m_sizeMillimeters = m_outputSizeMillimeters; | - | ||||||||||||||||||||||||
488 | break; never executed: break; | 0 | ||||||||||||||||||||||||
489 | case never executed: XCB_RANDR_ROTATION_ROTATE_270:case XCB_RANDR_ROTATION_ROTATE_270: never executed: case XCB_RANDR_ROTATION_ROTATE_270: | 0 | ||||||||||||||||||||||||
490 | m_orientation = Qt::InvertedPortraitOrientation; | - | ||||||||||||||||||||||||
491 | m_sizeMillimeters = m_outputSizeMillimeters.transposed(); | - | ||||||||||||||||||||||||
492 | break; never executed: break; | 0 | ||||||||||||||||||||||||
493 | } | - | ||||||||||||||||||||||||
494 | - | |||||||||||||||||||||||||
495 | - | |||||||||||||||||||||||||
496 | - | |||||||||||||||||||||||||
497 | - | |||||||||||||||||||||||||
498 | if (m_sizeMillimeters.isEmpty()
| 0-129 | ||||||||||||||||||||||||
499 | m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi()); executed 129 times by 5 tests: m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi()); Executed by:
| 129 | ||||||||||||||||||||||||
500 | - | |||||||||||||||||||||||||
501 | qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4); | - | ||||||||||||||||||||||||
502 | m_pixelDensity = qRound(dpi/96); | - | ||||||||||||||||||||||||
503 | m_geometry = QRect(xGeometry.topLeft(), xGeometry.size()); | - | ||||||||||||||||||||||||
504 | m_availableGeometry = xGeometry & m_virtualDesktop->workArea(); | - | ||||||||||||||||||||||||
505 | QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); | - | ||||||||||||||||||||||||
506 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
507 | - | |||||||||||||||||||||||||
508 | void QXcbScreen::updateAvailableGeometry() | - | ||||||||||||||||||||||||
509 | { | - | ||||||||||||||||||||||||
510 | QRect availableGeometry = m_geometry & m_virtualDesktop->workArea(); | - | ||||||||||||||||||||||||
511 | if (m_availableGeometry != availableGeometry
| 0 | ||||||||||||||||||||||||
512 | m_availableGeometry = availableGeometry; | - | ||||||||||||||||||||||||
513 | QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); | - | ||||||||||||||||||||||||
514 | } never executed: end of block | 0 | ||||||||||||||||||||||||
515 | } never executed: end of block | 0 | ||||||||||||||||||||||||
516 | - | |||||||||||||||||||||||||
517 | void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode) | - | ||||||||||||||||||||||||
518 | { | - | ||||||||||||||||||||||||
519 | if (!connection()->hasXRandr()
| 0-129 | ||||||||||||||||||||||||
520 | return; never executed: return; | 0 | ||||||||||||||||||||||||
521 | - | |||||||||||||||||||||||||
522 | if (m_mode == mode
| 0-129 | ||||||||||||||||||||||||
523 | return; never executed: return; | 0 | ||||||||||||||||||||||||
524 | - | |||||||||||||||||||||||||
525 | - | |||||||||||||||||||||||||
526 | - | |||||||||||||||||||||||||
527 | xcb_randr_get_screen_resources_current_cookie_t resourcesCookie = | - | ||||||||||||||||||||||||
528 | xcb_randr_get_screen_resources_current_unchecked(xcb_connection(), screen()->root); | - | ||||||||||||||||||||||||
529 | xcb_randr_get_screen_resources_current_reply_t *resources = | - | ||||||||||||||||||||||||
530 | xcb_randr_get_screen_resources_current_reply(xcb_connection(), resourcesCookie, __null); | - | ||||||||||||||||||||||||
531 | if (resources
| 0-129 | ||||||||||||||||||||||||
532 | xcb_randr_mode_info_iterator_t modesIter = | - | ||||||||||||||||||||||||
533 | xcb_randr_get_screen_resources_current_modes_iterator(resources); | - | ||||||||||||||||||||||||
534 | for (; modesIter.rem
| 0-129 | ||||||||||||||||||||||||
535 | xcb_randr_mode_info_t *modeInfo = modesIter.data; | - | ||||||||||||||||||||||||
536 | if (modeInfo->id == mode
| 0-129 | ||||||||||||||||||||||||
537 | const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal; | - | ||||||||||||||||||||||||
538 | m_refreshRate = (
| 0-129 | ||||||||||||||||||||||||
539 | m_mode = mode; | - | ||||||||||||||||||||||||
540 | break; executed 129 times by 5 tests: break; Executed by:
| 129 | ||||||||||||||||||||||||
541 | } | - | ||||||||||||||||||||||||
542 | } never executed: end of block | 0 | ||||||||||||||||||||||||
543 | - | |||||||||||||||||||||||||
544 | free(resources); | - | ||||||||||||||||||||||||
545 | QWindowSystemInterface::handleScreenRefreshRateChange(QPlatformScreen::screen(), m_refreshRate); | - | ||||||||||||||||||||||||
546 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
547 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||
549 | QPixmap QXcbScreen::grabWindow(WId window, int x, int y, int width, int height) const | - | ||||||||||||||||||||||||
550 | { | - | ||||||||||||||||||||||||
551 | if (width == 0
| 0-22 | ||||||||||||||||||||||||
552 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
553 | - | |||||||||||||||||||||||||
554 | - | |||||||||||||||||||||||||
555 | QXcbScreen *screen = const_cast<QXcbScreen *>(this); | - | ||||||||||||||||||||||||
556 | xcb_window_t root = screen->root(); | - | ||||||||||||||||||||||||
557 | - | |||||||||||||||||||||||||
558 | if (window == 0
| 0-22 | ||||||||||||||||||||||||
559 | window = root; never executed: window = root; | 0 | ||||||||||||||||||||||||
560 | - | |||||||||||||||||||||||||
561 | xcb_get_geometry_cookie_t geometry_cookie = xcb_get_geometry_unchecked(xcb_connection(), window); | - | ||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||
563 | xcb_get_geometry_reply_t *reply = | - | ||||||||||||||||||||||||
564 | xcb_get_geometry_reply(xcb_connection(), geometry_cookie, __null); | - | ||||||||||||||||||||||||
565 | - | |||||||||||||||||||||||||
566 | if (!reply
| 0-22 | ||||||||||||||||||||||||
567 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
568 | } | - | ||||||||||||||||||||||||
569 | - | |||||||||||||||||||||||||
570 | if (width < 0
| 0-22 | ||||||||||||||||||||||||
571 | width = reply->width - x; never executed: width = reply->width - x; | 0 | ||||||||||||||||||||||||
572 | if (height < 0
| 0-22 | ||||||||||||||||||||||||
573 | height = reply->height - y; never executed: height = reply->height - y; | 0 | ||||||||||||||||||||||||
574 | - | |||||||||||||||||||||||||
575 | geometry_cookie = xcb_get_geometry_unchecked(xcb_connection(), root); | - | ||||||||||||||||||||||||
576 | xcb_get_geometry_reply_t *root_reply = | - | ||||||||||||||||||||||||
577 | xcb_get_geometry_reply(xcb_connection(), geometry_cookie, __null); | - | ||||||||||||||||||||||||
578 | - | |||||||||||||||||||||||||
579 | if (!root_reply
| 0-22 | ||||||||||||||||||||||||
580 | free(reply); | - | ||||||||||||||||||||||||
581 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
582 | } | - | ||||||||||||||||||||||||
583 | - | |||||||||||||||||||||||||
584 | if (reply->depth == root_reply->depth
| 0-22 | ||||||||||||||||||||||||
585 | - | |||||||||||||||||||||||||
586 | - | |||||||||||||||||||||||||
587 | - | |||||||||||||||||||||||||
588 | - | |||||||||||||||||||||||||
589 | - | |||||||||||||||||||||||||
590 | xcb_translate_coordinates_cookie_t translate_cookie = | - | ||||||||||||||||||||||||
591 | xcb_translate_coordinates_unchecked(xcb_connection(), window, root, x, y); | - | ||||||||||||||||||||||||
592 | - | |||||||||||||||||||||||||
593 | xcb_translate_coordinates_reply_t *translate_reply = | - | ||||||||||||||||||||||||
594 | xcb_translate_coordinates_reply(xcb_connection(), translate_cookie, __null); | - | ||||||||||||||||||||||||
595 | - | |||||||||||||||||||||||||
596 | if (!translate_reply
| 0-22 | ||||||||||||||||||||||||
597 | free(reply); | - | ||||||||||||||||||||||||
598 | free(root_reply); | - | ||||||||||||||||||||||||
599 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
600 | } | - | ||||||||||||||||||||||||
601 | - | |||||||||||||||||||||||||
602 | x = translate_reply->dst_x; | - | ||||||||||||||||||||||||
603 | y = translate_reply->dst_y; | - | ||||||||||||||||||||||||
604 | - | |||||||||||||||||||||||||
605 | window = root; | - | ||||||||||||||||||||||||
606 | - | |||||||||||||||||||||||||
607 | free(translate_reply); | - | ||||||||||||||||||||||||
608 | free(reply); | - | ||||||||||||||||||||||||
609 | reply = root_reply; | - | ||||||||||||||||||||||||
610 | } executed 22 times by 3 tests: else {end of block Executed by:
| 22 | ||||||||||||||||||||||||
611 | free(root_reply); | - | ||||||||||||||||||||||||
612 | root_reply = 0; | - | ||||||||||||||||||||||||
613 | } never executed: end of block | 0 | ||||||||||||||||||||||||
614 | - | |||||||||||||||||||||||||
615 | xcb_get_window_attributes_reply_t *attributes_reply = | - | ||||||||||||||||||||||||
616 | xcb_get_window_attributes_reply(xcb_connection(), xcb_get_window_attributes_unchecked(xcb_connection(), window), __null); | - | ||||||||||||||||||||||||
617 | - | |||||||||||||||||||||||||
618 | if (!attributes_reply
| 0-22 | ||||||||||||||||||||||||
619 | free(reply); | - | ||||||||||||||||||||||||
620 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
621 | } | - | ||||||||||||||||||||||||
622 | - | |||||||||||||||||||||||||
623 | const xcb_visualtype_t *visual = screen->visualForId(attributes_reply->visual); | - | ||||||||||||||||||||||||
624 | free(attributes_reply); | - | ||||||||||||||||||||||||
625 | - | |||||||||||||||||||||||||
626 | xcb_pixmap_t pixmap = xcb_generate_id(xcb_connection()); | - | ||||||||||||||||||||||||
627 | xcb_create_pixmap(xcb_connection(), reply->depth, pixmap, window, width, height); | - | ||||||||||||||||||||||||
628 | - | |||||||||||||||||||||||||
629 | uint32_t gc_value_mask = XCB_GC_SUBWINDOW_MODE; | - | ||||||||||||||||||||||||
630 | uint32_t gc_value_list[] = { XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS }; | - | ||||||||||||||||||||||||
631 | - | |||||||||||||||||||||||||
632 | xcb_gcontext_t gc = xcb_generate_id(xcb_connection()); | - | ||||||||||||||||||||||||
633 | xcb_create_gc(xcb_connection(), gc, pixmap, gc_value_mask, gc_value_list); | - | ||||||||||||||||||||||||
634 | - | |||||||||||||||||||||||||
635 | xcb_copy_area(xcb_connection(), window, pixmap, gc, x, y, 0, 0, width, height); | - | ||||||||||||||||||||||||
636 | - | |||||||||||||||||||||||||
637 | QPixmap result = qt_xcb_pixmapFromXPixmap(connection(), pixmap, width, height, reply->depth, visual); | - | ||||||||||||||||||||||||
638 | - | |||||||||||||||||||||||||
639 | free(reply); | - | ||||||||||||||||||||||||
640 | xcb_free_gc(xcb_connection(), gc); | - | ||||||||||||||||||||||||
641 | xcb_free_pixmap(xcb_connection(), pixmap); | - | ||||||||||||||||||||||||
642 | - | |||||||||||||||||||||||||
643 | return executed 22 times by 3 tests: result;return result; Executed by:
executed 22 times by 3 tests: return result; Executed by:
| 22 | ||||||||||||||||||||||||
644 | } | - | ||||||||||||||||||||||||
645 | - | |||||||||||||||||||||||||
646 | static bool parseXftInt(const QByteArray& stringValue, int *value) | - | ||||||||||||||||||||||||
647 | { | - | ||||||||||||||||||||||||
648 | ((!(value != 0)) ? qt_assert("value != 0",__FILE__,714) : qt_noop()); | - | ||||||||||||||||||||||||
649 | bool ok; | - | ||||||||||||||||||||||||
650 | *value = stringValue.toInt(&ok); | - | ||||||||||||||||||||||||
651 | return executed 258 times by 5 tests: ok;return ok; Executed by:
executed 258 times by 5 tests: return ok; Executed by:
| 258 | ||||||||||||||||||||||||
652 | } | - | ||||||||||||||||||||||||
653 | - | |||||||||||||||||||||||||
654 | static QFontEngine::HintStyle parseXftHintStyle(const QByteArray& stringValue) | - | ||||||||||||||||||||||||
655 | { | - | ||||||||||||||||||||||||
656 | if (stringValue == "hintfull"
| 0-129 | ||||||||||||||||||||||||
657 | return never executed: QFontEngine::HintFull;return QFontEngine::HintFull; never executed: return QFontEngine::HintFull; | 0 | ||||||||||||||||||||||||
658 | else if (stringValue == "hintnone"
| 0-129 | ||||||||||||||||||||||||
659 | return never executed: QFontEngine::HintNone;return QFontEngine::HintNone; never executed: return QFontEngine::HintNone; | 0 | ||||||||||||||||||||||||
660 | else if (stringValue == "hintmedium"
| 0-129 | ||||||||||||||||||||||||
661 | return executed 129 times by 5 tests: QFontEngine::HintMedium;return QFontEngine::HintMedium; Executed by:
executed 129 times by 5 tests: return QFontEngine::HintMedium; Executed by:
| 129 | ||||||||||||||||||||||||
662 | else if (stringValue == "hintslight"
| 0 | ||||||||||||||||||||||||
663 | return never executed: QFontEngine::HintLight;return QFontEngine::HintLight; never executed: return QFontEngine::HintLight; | 0 | ||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||
665 | return never executed: QFontEngine::HintStyle(-1);return QFontEngine::HintStyle(-1); never executed: return QFontEngine::HintStyle(-1); | 0 | ||||||||||||||||||||||||
666 | } | - | ||||||||||||||||||||||||
667 | - | |||||||||||||||||||||||||
668 | static QFontEngine::SubpixelAntialiasingType parseXftRgba(const QByteArray& stringValue) | - | ||||||||||||||||||||||||
669 | { | - | ||||||||||||||||||||||||
670 | if (stringValue == "none"
| 0-129 | ||||||||||||||||||||||||
671 | return executed 129 times by 5 tests: QFontEngine::Subpixel_None;return QFontEngine::Subpixel_None; Executed by:
executed 129 times by 5 tests: return QFontEngine::Subpixel_None; Executed by:
| 129 | ||||||||||||||||||||||||
672 | else if (stringValue == "rgb"
| 0 | ||||||||||||||||||||||||
673 | return never executed: QFontEngine::Subpixel_RGB;return QFontEngine::Subpixel_RGB; never executed: return QFontEngine::Subpixel_RGB; | 0 | ||||||||||||||||||||||||
674 | else if (stringValue == "bgr"
| 0 | ||||||||||||||||||||||||
675 | return never executed: QFontEngine::Subpixel_BGR;return QFontEngine::Subpixel_BGR; never executed: return QFontEngine::Subpixel_BGR; | 0 | ||||||||||||||||||||||||
676 | else if (stringValue == "vrgb"
| 0 | ||||||||||||||||||||||||
677 | return never executed: QFontEngine::Subpixel_VRGB;return QFontEngine::Subpixel_VRGB; never executed: return QFontEngine::Subpixel_VRGB; | 0 | ||||||||||||||||||||||||
678 | else if (stringValue == "vbgr"
| 0 | ||||||||||||||||||||||||
679 | return never executed: QFontEngine::Subpixel_VBGR;return QFontEngine::Subpixel_VBGR; never executed: return QFontEngine::Subpixel_VBGR; | 0 | ||||||||||||||||||||||||
680 | - | |||||||||||||||||||||||||
681 | return never executed: QFontEngine::SubpixelAntialiasingType(-1);return QFontEngine::SubpixelAntialiasingType(-1); never executed: return QFontEngine::SubpixelAntialiasingType(-1); | 0 | ||||||||||||||||||||||||
682 | } | - | ||||||||||||||||||||||||
683 | - | |||||||||||||||||||||||||
684 | bool QXcbScreen::xResource(const QByteArray &identifier, | - | ||||||||||||||||||||||||
685 | const QByteArray &expectedIdentifier, | - | ||||||||||||||||||||||||
686 | QByteArray& stringValue) | - | ||||||||||||||||||||||||
687 | { | - | ||||||||||||||||||||||||
688 | if (identifier.startsWith(expectedIdentifier)
| 516-2322 | ||||||||||||||||||||||||
689 | stringValue = identifier.mid(expectedIdentifier.size()); | - | ||||||||||||||||||||||||
690 | return executed 516 times by 5 tests: true;return true; Executed by:
executed 516 times by 5 tests: return true; Executed by:
| 516 | ||||||||||||||||||||||||
691 | } | - | ||||||||||||||||||||||||
692 | return executed 2322 times by 5 tests: false;return false; Executed by:
executed 2322 times by 5 tests: return false; Executed by:
| 2322 | ||||||||||||||||||||||||
693 | } | - | ||||||||||||||||||||||||
694 | - | |||||||||||||||||||||||||
695 | void QXcbScreen::readXResources() | - | ||||||||||||||||||||||||
696 | { | - | ||||||||||||||||||||||||
697 | int offset = 0; | - | ||||||||||||||||||||||||
698 | QByteArray resources; | - | ||||||||||||||||||||||||
699 | while(1) { | - | ||||||||||||||||||||||||
700 | xcb_get_property_reply_t *reply = | - | ||||||||||||||||||||||||
701 | xcb_get_property_reply(xcb_connection(), | - | ||||||||||||||||||||||||
702 | xcb_get_property_unchecked(xcb_connection(), false, screen()->root, | - | ||||||||||||||||||||||||
703 | XCB_ATOM_RESOURCE_MANAGER, | - | ||||||||||||||||||||||||
704 | XCB_ATOM_STRING, offset/4, 8192), __null); | - | ||||||||||||||||||||||||
705 | bool more = false; | - | ||||||||||||||||||||||||
706 | if (reply
| 0-129 | ||||||||||||||||||||||||
707 | resources += QByteArray((const char *)xcb_get_property_value(reply), xcb_get_property_value_length(reply)); | - | ||||||||||||||||||||||||
708 | offset += xcb_get_property_value_length(reply); | - | ||||||||||||||||||||||||
709 | more = reply->bytes_after != 0; | - | ||||||||||||||||||||||||
710 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
711 | - | |||||||||||||||||||||||||
712 | if (reply
| 0-129 | ||||||||||||||||||||||||
713 | free(reply); executed 129 times by 5 tests: free(reply); Executed by:
| 129 | ||||||||||||||||||||||||
714 | - | |||||||||||||||||||||||||
715 | if (!more
| 0-129 | ||||||||||||||||||||||||
716 | break; executed 129 times by 5 tests: break; Executed by:
| 129 | ||||||||||||||||||||||||
717 | } never executed: end of block | 0 | ||||||||||||||||||||||||
718 | - | |||||||||||||||||||||||||
719 | QList<QByteArray> split = resources.split('\n'); | - | ||||||||||||||||||||||||
720 | for (int i = 0; i < split.size()
| 129-903 | ||||||||||||||||||||||||
721 | const QByteArray &r = split.at(i); | - | ||||||||||||||||||||||||
722 | int value; | - | ||||||||||||||||||||||||
723 | QByteArray stringValue; | - | ||||||||||||||||||||||||
724 | if (xResource(r, "Xft.dpi:\t", stringValue)
| 129-774 | ||||||||||||||||||||||||
725 | if (parseXftInt(stringValue, &value)
| 0-129 | ||||||||||||||||||||||||
726 | m_forcedDpi = value; executed 129 times by 5 tests: m_forcedDpi = value; Executed by:
| 129 | ||||||||||||||||||||||||
727 | } executed 129 times by 5 tests: else if (xResource(r, "Xft.hintstyle:\t", stringValue)end of block Executed by:
| 129-645 | ||||||||||||||||||||||||
728 | m_hintStyle = parseXftHintStyle(stringValue); | - | ||||||||||||||||||||||||
729 | } executed 129 times by 5 tests: else if (xResource(r, "Xft.antialias:\t", stringValue)end of block Executed by:
| 129-516 | ||||||||||||||||||||||||
730 | if (parseXftInt(stringValue, &value)
| 0-129 | ||||||||||||||||||||||||
731 | m_antialiasingEnabled = value; executed 129 times by 5 tests: m_antialiasingEnabled = value; Executed by:
| 129 | ||||||||||||||||||||||||
732 | } executed 129 times by 5 tests: else if (xResource(r, "Xft.rgba:\t", stringValue)end of block Executed by:
| 129-387 | ||||||||||||||||||||||||
733 | m_subpixelType = parseXftRgba(stringValue); | - | ||||||||||||||||||||||||
734 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
735 | } executed 903 times by 5 tests: end of block Executed by:
| 903 | ||||||||||||||||||||||||
736 | } executed 129 times by 5 tests: end of block Executed by:
| 129 | ||||||||||||||||||||||||
737 | - | |||||||||||||||||||||||||
738 | QXcbXSettings *QXcbScreen::xSettings() const | - | ||||||||||||||||||||||||
739 | { | - | ||||||||||||||||||||||||
740 | return executed 76 times by 38 tests: m_virtualDesktop->xSettings();return m_virtualDesktop->xSettings(); Executed by:
executed 76 times by 38 tests: return m_virtualDesktop->xSettings(); Executed by:
| 76 | ||||||||||||||||||||||||
741 | } | - | ||||||||||||||||||||||||
742 | - | |||||||||||||||||||||||||
743 | static inline void formatRect(QDebug &debug, const QRect r) | - | ||||||||||||||||||||||||
744 | { | - | ||||||||||||||||||||||||
745 | debug << r.width() << 'x' << r.height() | - | ||||||||||||||||||||||||
746 | << forcesign << r.x() << r.y() << noforcesign; | - | ||||||||||||||||||||||||
747 | } never executed: end of block | 0 | ||||||||||||||||||||||||
748 | - | |||||||||||||||||||||||||
749 | static inline void formatSizeF(QDebug &debug, const QSizeF s) | - | ||||||||||||||||||||||||
750 | { | - | ||||||||||||||||||||||||
751 | debug << s.width() << 'x' << s.height() << "mm"; | - | ||||||||||||||||||||||||
752 | } never executed: end of block | 0 | ||||||||||||||||||||||||
753 | - | |||||||||||||||||||||||||
754 | QDebug operator<<(QDebug debug, const QXcbScreen *screen) | - | ||||||||||||||||||||||||
755 | { | - | ||||||||||||||||||||||||
756 | const QDebugStateSaver saver(debug); | - | ||||||||||||||||||||||||
757 | debug.nospace(); | - | ||||||||||||||||||||||||
758 | debug << "QXcbScreen(" << (const void *)screen; | - | ||||||||||||||||||||||||
759 | if (screen
| 0 | ||||||||||||||||||||||||
760 | debug << fixed << qSetRealNumberPrecision(1); | - | ||||||||||||||||||||||||
761 | debug << ", name=" << screen->name(); | - | ||||||||||||||||||||||||
762 | debug << ", geometry="; | - | ||||||||||||||||||||||||
763 | formatRect(debug, screen->geometry()); | - | ||||||||||||||||||||||||
764 | debug << ", availableGeometry="; | - | ||||||||||||||||||||||||
765 | formatRect(debug, screen->availableGeometry()); | - | ||||||||||||||||||||||||
766 | debug << ", devicePixelRatio=" << screen->devicePixelRatio(); | - | ||||||||||||||||||||||||
767 | debug << ", logicalDpi=" << screen->logicalDpi(); | - | ||||||||||||||||||||||||
768 | debug << ", physicalSize="; | - | ||||||||||||||||||||||||
769 | formatSizeF(debug, screen->physicalSize()); | - | ||||||||||||||||||||||||
770 | - | |||||||||||||||||||||||||
771 | debug << ", screenNumber=" << screen->screenNumber(); | - | ||||||||||||||||||||||||
772 | debug << ", virtualSize=" << screen->virtualSize().width() << 'x' << screen->virtualSize().height() << " ("; | - | ||||||||||||||||||||||||
773 | formatSizeF(debug, screen->virtualSize()); | - | ||||||||||||||||||||||||
774 | debug << "), orientation=" << screen->orientation(); | - | ||||||||||||||||||||||||
775 | debug << ", depth=" << screen->depth(); | - | ||||||||||||||||||||||||
776 | debug << ", refreshRate=" << screen->refreshRate(); | - | ||||||||||||||||||||||||
777 | debug << ", root=" << hex << screen->root(); | - | ||||||||||||||||||||||||
778 | debug << ", windowManagerName=" << screen->windowManagerName(); | - | ||||||||||||||||||||||||
779 | } never executed: end of block | 0 | ||||||||||||||||||||||||
780 | debug << ')'; | - | ||||||||||||||||||||||||
781 | return never executed: debug;return debug; never executed: return debug; | 0 | ||||||||||||||||||||||||
782 | } | - | ||||||||||||||||||||||||
783 | - | |||||||||||||||||||||||||
784 | - | |||||||||||||||||||||||||
Switch to Source code | Preprocessed file |