summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2012-09-19 11:55:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-24 00:26:07 +0200
commit1a31561178d9cb9e5a6f3f986075df24ea5705ff (patch)
tree0953a9e349b258e00dc86e759338b2a012ee28a8 /src/plugins/platforms/xcb/qxcbconnection.h
parent06c89ae026d5a3579636d8a090cf546b23273bed (diff)
xcb: dynamic QScreens; primary first; corrected logical DPI
A new QScreen is created when an output is activated (monitor or projector is added, for example), and destroyed when the output is turned off. Ensures that screens and siblings are always in the right order: primary comes first. Logical DPI is derived from virtual geom / virtual size, which will be different than output geom / physical size if X was started with --dpi override. This is a good thing: when X gets wrong EDID info for physical size and you need to override it to get reasonable font sizes, Qt will heed the logical DPI for font sizing. Change-Id: I5e3de34013c1b6b21067243de56f3f1eb72787fa Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index df91ad6e2f..08dd304b3d 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -66,6 +66,7 @@ struct XInput2MaemoData;
#endif
struct XInput2DeviceData;
#endif
+struct xcb_randr_get_output_info_reply_t;
//#define Q_XCB_DEBUG
@@ -398,7 +399,9 @@ private:
void handleGenericEventMaemo(xcb_ge_event_t *event);
#endif
void handleClientMessageEvent(const xcb_client_message_event_t *event);
- QXcbScreen* createScreenWithFabricatedName(int screenNumber, xcb_screen_t* xcbScreen);
+ QXcbScreen* findOrCreateScreen(QList<QXcbScreen *>& newScreens, int screenNumber,
+ xcb_screen_t* xcbScreen, xcb_randr_get_output_info_reply_t *output = NULL);
+ void updateScreens();
bool m_xi2Enabled;
int m_xi2Minor;
@@ -443,7 +446,6 @@ private:
QList<QXcbScreen *> m_screens;
int m_primaryScreen;
- int m_primaryOutput;
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];