diff options
author | David Tardon <dtardon@redhat.com> | 2012-04-25 15:08:53 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-05-11 12:12:05 +0200 |
commit | b1c3f00d9b0ef6c91b0209c13531bd1f9d63c1e0 (patch) | |
tree | e8ca616878ffcc9d50214952bb759a638ae696bd /vcl/inc | |
parent | bcbf4b061b2e923c2ff3b222458c286c8fa27a3a (diff) |
rhbz#809019 count mirrored monitors as one
Change-Id: I I I184541e99ab4e04b8534dd0341bc2f3630094e9c
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/unx/gtk/gtkdata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtksys.hxx | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 63b8ae315f80..033bf1a14f4c 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -151,6 +151,8 @@ public: GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; } bool IsX11Display() const { return m_bX11Display; } + GtkSalSystem* getSystem() const { return m_pSys; } + virtual void deregisterFrame( SalFrame* pFrame ); GdkCursor *getCursor( PointerStyle ePointerStyle ); virtual int CaptureMouse( SalFrame* pFrame ); diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx index df9e79e1dcb2..582d4b9ca134 100644 --- a/vcl/inc/unx/gtk/gtksys.hxx +++ b/vcl/inc/unx/gtk/gtksys.hxx @@ -36,7 +36,11 @@ class GtkSalSystem : public SalGenericSystem { + typedef std::deque<std::pair<GdkScreen*, int> > ScreenMonitors_t; + GdkDisplay *mpDisplay; + // Number of monitors for every active screen. + ScreenMonitors_t maScreenMonitors; public: GtkSalSystem(); virtual ~GtkSalSystem(); @@ -56,10 +60,11 @@ public: { return getXScreenFromDisplayScreen( GetDisplayDefaultScreen() ); } int GetDisplayXScreenCount(); SalX11Screen getXScreenFromDisplayScreen(unsigned int nDisplayScreen); + void countScreenMonitors(); // We have a 'screen' number that is combined from screen-idx + monitor-idx - static int getScreenIdxFromPtr (GdkDisplay *pDisplay, GdkScreen *pScreen); - static int getScreenMonitorIdx (GdkDisplay *pDisplay, GdkScreen *pScreen, int nX, int nY); - static GdkScreen *getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMonitor); + int getScreenIdxFromPtr (GdkScreen *pScreen); + int getScreenMonitorIdx (GdkScreen *pScreen, int nX, int nY); + GdkScreen *getScreenMonitorFromIdx (int nIdx, gint &nMonitor); }; #endif // _VCL_GTKSYS_HXX_ |