summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2011-04-13 18:08:13 +0200
committerKurt Zenker <kz@openoffice.org>2011-04-13 18:08:13 +0200
commit3790a43443ab652f17dd20d5fb7eb10a52ec9e8c (patch)
tree44551dc8ef768362091b5327da8fb92addac98a5 /vcl/unx/gtk
parentadb0b56e22c794b7f63ee19f4503cb38032e82d7 (diff)
parenta5f4a3b00662d684b9d22045fae21e54a9adb442 (diff)
CWS-TOOLING: integrate CWS impress211_OOO340
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx24
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx2
2 files changed, 26 insertions, 0 deletions
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index ffa61bc52c10..d468eef57d2a 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -208,6 +208,25 @@ void GtkSalDisplay::screenSizeChanged( GdkScreen* pScreen )
void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
{
+ /* Caution: since we support the _NET_WM_FULLSCREEN_MONITORS property now and
+ the EWMH spec says, the index used for that needs to be that of the
+ Xinerama extension, we need to ensure that the order of m_aXineramaScreens is actually intact.
+
+ gdk_screen_get_monitor_geometry however has a different sort order that has a default monitor number
+ Xinerama returns the default monitor as 0.
+ That means if we fill in the multiple montors vector from gdk, we'll get the wrong order unless
+ the default monitor is incidentally the same (number 0).
+
+ Given that XRandR (which is what gdk_screen_get_monitor_geometry is based on) is
+ supposed to replace Xinerama, this is bound to get a problem at some time again,
+ unfortunately there does not currently seem to be a way to map the returns of xinerama to
+ that of randr. Currently getting Xinerama values again works with updated values, given
+ a new enough Xserver.
+ */
+ InitXinerama();
+ (void)pScreen;
+
+ #if 0
if( pScreen )
{
if( gdk_display_get_n_screens(m_pGdkDisplay) == 1 )
@@ -234,6 +253,7 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
}
}
}
+ #endif
}
extern "C"
@@ -244,6 +264,9 @@ extern "C"
int GtkSalDisplay::GetDefaultMonitorNumber() const
{
int n = 0;
+
+ // currently disabled, see remarks in monitorsChanged
+#if 0
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
#if GTK_CHECK_VERSION(2,20,0)
n = gdk_screen_get_primary_monitor(pScreen);
@@ -255,6 +278,7 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const
#endif
if( n >= 0 && size_t(n) < m_aXineramaScreenIndexMap.size() )
n = m_aXineramaScreenIndexMap[n];
+#endif
return n;
}
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 5f4a2bda25f8..d9bca2d2e9ea 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1814,6 +1814,7 @@ void GtkSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
aNewPosSize = Rectangle( Point( 0, 0 ), pDisp->GetScreenSize(m_nScreen) );
else
aNewPosSize = pDisp->GetXineramaScreens()[ nScreen ];
+
gtk_window_resize( GTK_WINDOW(m_pWindow),
maGeometry.nWidth = aNewPosSize.GetWidth(),
maGeometry.nHeight = aNewPosSize.GetHeight() );
@@ -1828,6 +1829,7 @@ void GtkSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
// _NET_WM_STATE_FULLSCREEN (Metacity <-> KWin)
if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
{
+ pDisp->getWMAdaptor()->setFullScreenMonitors( GDK_WINDOW_XWINDOW( GTK_WIDGET(m_pWindow)->window ), nScreen );
if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
gtk_window_set_resizable( GTK_WINDOW(m_pWindow), sal_True );
gtk_window_fullscreen( GTK_WINDOW( m_pWindow ) );