summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx17
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx6
2 files changed, 16 insertions, 7 deletions
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 2690513ce742..3de060bdc843 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -50,18 +50,25 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
gtk_widget_set_app_paintable( m_pSocket, TRUE );
// system data
- SalDisplay* pDisp = vcl_sal::getSalDisplay(GetGenericData());
m_aSystemData.nSize = sizeof( SystemEnvData );
+#if !GTK_CHECK_VERSION(3,0,0)
+ SalDisplay* pDisp = vcl_sal::getSalDisplay(GetGenericData());
m_aSystemData.pDisplay = pDisp->GetDisplay();
+ m_aSystemData.pVisual = pDisp->GetVisual(pParent->getXScreenNumber()).GetVisual();
+ m_aSystemData.nDepth = pDisp->GetVisual(pParent->getXScreenNumber()).GetDepth();
+ m_aSystemData.aColormap = pDisp->GetColormap(pParent->getXScreenNumber()).GetXColormap();
m_aSystemData.aWindow = GDK_WINDOW_XWINDOW(widget_get_window(m_pSocket));
+ m_aSystemData.aShellWindow = GDK_WINDOW_XWINDOW(widget_get_window(GTK_WIDGET(pParent->getWindow())));
+#else
+ static int nWindow = 0;
+ m_aSystemData.aWindow = nWindow;
+ m_aSystemData.aShellWindow = pParent->GetSystemData()->aWindow;
+ ++nWindow;
+#endif
m_aSystemData.pSalFrame = NULL;
m_aSystemData.pWidget = m_pSocket;
- m_aSystemData.pVisual = pDisp->GetVisual(pParent->getXScreenNumber()).GetVisual();
m_aSystemData.nScreen = pParent->getXScreenNumber().getXScreen();
- m_aSystemData.nDepth = pDisp->GetVisual(pParent->getXScreenNumber()).GetDepth();
- m_aSystemData.aColormap = pDisp->GetColormap(pParent->getXScreenNumber()).GetXColormap();
m_aSystemData.pAppContext = NULL;
- m_aSystemData.aShellWindow = GDK_WINDOW_XWINDOW(widget_get_window(GTK_WIDGET(pParent->getWindow())));
m_aSystemData.pShellWidget = GTK_WIDGET(pParent->getWindow());
g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index f56bbade1247..9ca17bdb9deb 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1075,15 +1075,17 @@ void GtkSalFrame::InitCommon()
m_aSystemData.nDepth = pDisp->GetVisual( m_nXScreen ).GetDepth();
m_aSystemData.aColormap = pDisp->GetColormap( m_nXScreen ).GetXColormap();
m_aSystemData.aWindow = widget_get_xid(m_pWindow);
+ m_aSystemData.aShellWindow = m_aSystemData.aWindow;
#else
static int nWindow = 0;
- m_aSystemData.aWindow = nWindow++;
+ m_aSystemData.aWindow = nWindow;
+ m_aSystemData.aShellWindow = nWindow;
+ ++nWindow;
#endif
m_aSystemData.pSalFrame = this;
m_aSystemData.pWidget = m_pWindow;
m_aSystemData.nScreen = m_nXScreen.getXScreen();
m_aSystemData.pAppContext = NULL;
- m_aSystemData.aShellWindow = m_aSystemData.aWindow;
m_aSystemData.pShellWidget = m_aSystemData.pWidget;
// fake an initial geometry, gets updated via configure event or SetPosSize