rpms/openoffice.org/devel openoffice.org.spec, 1.2262, 1.2263 workspace.gtk3.patch, 1.2, 1.3

Caolan McNamara caolanm at fedoraproject.org
Thu Jul 1 10:54:04 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2361

Modified Files:
	openoffice.org.spec workspace.gtk3.patch 
Log Message:
GSEAL screws us over wrt. gtk_paint_box and HAS_FOCUS etc.


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2262
retrieving revision 1.2263
diff -u -p -r1.2262 -r1.2263
--- openoffice.org.spec	30 Jun 2010 12:36:19 -0000	1.2262
+++ openoffice.org.spec	1 Jul 2010 10:54:03 -0000	1.2263
@@ -4374,9 +4374,10 @@ fi
 %endif
 
 %changelog
-* Wed Jun 30 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.19
+* Thu Jun 30 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.19
 - rebuild for dependencies
 - tweak defattr
+- GSEAL screws us over wrt. gtk_paint_box and HAS_FOCUS etc.
 
 * Thu Jun 24 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.18
 - Resolves: rhbz#566831 [abrt] crash in GetFrmSize (dtardon)

workspace.gtk3.patch:
 configure.in                          |    6 
 source/appl/makefile.mk               |    2 
 source/appl/shutdowniconunx.cxx       |    4 
 source/eggtrayicon-impl.h             |    2 
 source/eggtrayicon.c                  |   57 ++
 source/makefile.mk                    |    2 
 source/nsplugin/source/makefile.mk    |    2 
 source/ooo/makefile.mk                |    4 
 source/plugin/util/makefile.pmk       |    2 
 source/unx/gnome/SalGtkFilePicker.cxx |    2 
 source/unx/gnome/makefile.mk          |    6 
 unx/gtk/a11y/makefile.mk              |    2 
 unx/gtk/app/gtkdata.cxx               |   32 +
 unx/gtk/app/makefile.mk               |    2 
 unx/gtk/gdi/makefile.mk               |    2 
 unx/gtk/gdi/salnativewidgets-gtk.cxx  |  840 +++++++++++++++++++---------------
 unx/gtk/window/gtkframe.cxx           |  115 ++--
 unx/gtk/window/gtkobject.cxx          |    9 
 unx/gtk/window/makefile.mk            |    2 
 unx/inc/plugins/gtk/gtkdata.hxx       |    2 
 unx/inc/plugins/gtk/gtkgdi.hxx        |   39 +
 unx/inc/saldisp.hxx                   |    4 
 unx/source/app/saldisp.cxx            |   21 
 unx/source/app/salsys.cxx             |    2 
 util/makefile.mk                      |    4 
 25 files changed, 714 insertions(+), 451 deletions(-)

Index: workspace.gtk3.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/workspace.gtk3.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- workspace.gtk3.patch	21 Jun 2010 12:25:46 -0000	1.2
+++ workspace.gtk3.patch	1 Jul 2010 10:54:04 -0000	1.3
@@ -58,7 +58,74 @@
  using namespace com::sun::star;
  
  int GtkSalFrame::m_nFloats = 0;
-@@ -982,7 +1000,7 @@
+@@ -433,7 +451,7 @@
+     if( m_hBackgroundPixmap )
+     {
+         XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
+-                                    GDK_WINDOW_XWINDOW(m_pWindow->window),
++                                    GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                                     None );
+         XFreePixmap( getDisplay()->GetDisplay(), m_hBackgroundPixmap );
+     }
+@@ -591,7 +609,7 @@
+     SalDisplay* pDisp = GetX11SalData()->GetDisplay();
+     m_aSystemData.nSize 		= sizeof( SystemChildData );
+     m_aSystemData.pDisplay		= pDisp->GetDisplay();
+-    m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pWindow->window);
++    m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow));
+     m_aSystemData.pSalFrame		= this;
+     m_aSystemData.pWidget		= m_pWindow;
+     m_aSystemData.pVisual		= pDisp->GetVisual( m_nScreen ).GetVisual();
+@@ -643,7 +661,7 @@
+     *  some paint issues
+     */
+     XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
+-                                GDK_WINDOW_XWINDOW(m_pWindow->window),
++                                GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                                 m_hBackgroundPixmap );
+ }
+ 
+@@ -677,7 +695,7 @@
+     else if( ! bBeforeRealize )
+     {
+         Display* pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
+-        XLIB_Window aWindow = GDK_WINDOW_XWINDOW( GTK_WIDGET(pWindow)->window );
++        XLIB_Window aWindow = GDK_WINDOW_XWINDOW( widget_get_window(GTK_WIDGET(pWindow)) );
+         XWMHints* pHints = XGetWMHints( pDisplay, aWindow );
+         if( ! pHints )
+         {
+@@ -867,9 +885,9 @@
+         {
+             /* #i99360# ugly workaround an X11 library bug */
+             nUserTime= getDisplay()->GetLastUserEventTime( true );
+-            // nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
++            // nUserTime = gdk_x11_get_server_time(widget_get_window(GTK_WIDGET(m_pWindow)));
+         }
+-        lcl_set_user_time(GTK_WIDGET(m_pWindow)->window, nUserTime);
++        lcl_set_user_time(widget_get_window(GTK_WIDGET(m_pWindow)), nUserTime);
+     }
+ 
+     if( bDecoHandling )
+@@ -923,7 +941,8 @@
+     {
+         m_pWindow = gtk_plug_new( pSysData->aWindow );
+         m_bWindowIsGtkPlug  = true;
+-        GTK_WIDGET_SET_FLAGS( m_pWindow, GTK_CAN_FOCUS | GTK_SENSITIVE | GTK_CAN_DEFAULT );
++        widget_set_can_default( m_pWindow, true );
++        widget_set_can_focus( m_pWindow, true );
+         gtk_widget_set_sensitive( m_pWindow, true );
+     }
+     else
+@@ -948,7 +967,7 @@
+     if( ! m_bWindowIsGtkPlug )
+     {
+         XReparentWindow( getDisplay()->GetDisplay(),
+-                         GDK_WINDOW_XWINDOW(m_pWindow->window),
++                         GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                          (XLIB_Window)pSysData->aWindow,
+                          0, 0 );
+     }
+@@ -982,14 +1001,14 @@
      if( nStyle != m_nExtStyle && ! isChild() )
      {
          m_nExtStyle = nStyle;
@@ -67,7 +134,24 @@
          {
              XClassHint* pClass = XAllocClassHint();
              rtl::OString aResHint = X11SalData::getFrameResName( m_nExtStyle );
-@@ -1314,7 +1332,7 @@
+             pClass->res_name  = const_cast<char*>(aResHint.getStr());
+             pClass->res_class = const_cast<char*>(X11SalData::getFrameClassName());
+             XSetClassHint( getDisplay()->GetDisplay(),
+-                           GDK_WINDOW_XWINDOW(m_pWindow->window),
++                           GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                            pClass );
+             XFree( pClass );
+         }
+@@ -1013,7 +1032,7 @@
+                 if( ! m_aGraphics[i].pGraphics )
+                 {
+                     m_aGraphics[i].pGraphics = new GtkSalGraphics( m_pWindow );
+-                    m_aGraphics[i].pGraphics->Init( this, GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
++                    m_aGraphics[i].pGraphics->Init( this, GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
+                 }
+                 return m_aGraphics[i].pGraphics;
+             }
+@@ -1314,7 +1333,7 @@
              setMinMaxSize();
              
              // #i45160# switch to desktop where a dialog with parent will appear
@@ -76,7 +160,29 @@
                  getDisplay()->getWMAdaptor()->switchToWorkArea( m_pParent->m_nWorkArea );
              
              if( isFloatGrabWindow() &&
-@@ -1480,7 +1498,7 @@
+@@ -1336,7 +1355,7 @@
+             if( ! bNoActivate && (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
+                 /* #i99360# ugly workaround an X11 library bug */
+                 nUserTime= getDisplay()->GetLastUserEventTime( true );
+-                //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
++                //nUserTime = gdk_x11_get_server_time(widget_get_window(GTK_WIDGET(m_pWindow)));
+ 
+             //For these floating windows we don't want the main window to lose focus, and metacity has...
+             // metacity-2.24.0/src/core/window.c
+@@ -1371,10 +1390,10 @@
+             {
+                 /* #i99360# ugly workaround an X11 library bug */
+                 nUserTime= getDisplay()->GetLastUserEventTime( true );
+-                //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
++                //nUserTime = gdk_x11_get_server_time(widget_get_window(GTK_WIDGET(m_pWindow)));
+             }
+ 
+-            lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime );
++            lcl_set_user_time( widget_get_window(GTK_WIDGET(m_pWindow)), nUserTime );
+ 
+             gtk_widget_show( m_pWindow );
+ 
+@@ -1480,7 +1499,7 @@
      {
          m_aMaxSize = Size( nWidth, nHeight );
          // Show does a setMinMaxSize
@@ -85,7 +191,7 @@
              setMinMaxSize();
      }
  }
-@@ -1493,7 +1511,7 @@
+@@ -1493,7 +1512,7 @@
          {
              gtk_widget_set_size_request( m_pWindow, nWidth, nHeight );
              // Show does a setMinMaxSize
@@ -94,7 +200,25 @@
                  setMinMaxSize();
          }
      }
-@@ -1785,7 +1803,7 @@
+@@ -1745,7 +1764,7 @@
+         gtk_widget_realize( m_pWindow );
+         // update system data
+         GtkSalDisplay* pDisp = getDisplay();
+-        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pWindow->window);
++        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow));
+         m_aSystemData.pVisual		= pDisp->GetVisual( m_nScreen ).GetVisual();
+         m_aSystemData.nScreen		= nScreen;
+         m_aSystemData.nDepth		= pDisp->GetVisual( m_nScreen ).GetDepth();
+@@ -1756,7 +1775,7 @@
+         for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
+         {
+             if( m_aGraphics[i].bInUse )
+-                m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
++                m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
+         }
+         updateScreenNumber();
+     }
+@@ -1785,7 +1804,7 @@
              
              Rectangle aOldScreenRect( pDisp->GetXineramaScreens()[maGeometry.nScreenNumber] );
              Rectangle aNewScreenRect( pDisp->GetXineramaScreens()[nNewScreen] );
@@ -103,7 +227,7 @@
              if( bVisible )
                  Show( FALSE );
              maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
-@@ -1817,7 +1835,7 @@
+@@ -1817,7 +1836,7 @@
              {
                  m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
                                                 Size( maGeometry.nWidth, maGeometry.nHeight ) );
@@ -112,7 +236,7 @@
                  if( bVisible )
                      Show( FALSE );
                  m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
-@@ -1846,7 +1864,7 @@
+@@ -1846,7 +1865,7 @@
              }
              else
              {
@@ -121,7 +245,16 @@
                  if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
                      gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
                  if( bVisible )
-@@ -2086,7 +2104,7 @@
+@@ -2060,7 +2079,7 @@
+ 		}
+ #ifdef ENABLE_DBUS
+ 		m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation", 
+-                    GDK_WINDOW_XID(m_pWindow->window));
++                    GDK_WINDOW_XID(widget_get_window(m_pWindow)));
+ #endif
+ 	}
+ 	else
+@@ -2086,7 +2105,7 @@
      {
          if( isChild( false, true ) )
              gtk_widget_grab_focus( m_pWindow );
@@ -130,7 +263,70 @@
          {
              if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) )
                  gtk_window_present( GTK_WINDOW(m_pWindow) );
-@@ -2370,7 +2388,7 @@
+@@ -2095,7 +2114,7 @@
+                 // gdk_window_focus( m_pWindow->window, gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window) );
+                 /* #i99360# ugly workaround an X11 library bug */
+                 guint32 nUserTime= getDisplay()->GetLastUserEventTime( true );
+-                gdk_window_focus( m_pWindow->window, nUserTime );
++                gdk_window_focus( widget_get_window(m_pWindow), nUserTime );
+             }
+             /*  need to do an XSetInputFocus here because
+              *  gdk_window_focus will ask a EWMH compliant WM to put the focus
+@@ -2107,7 +2126,7 @@
+                 // sad but true: this can cause an XError, we need to catch that
+                 // to do this we need to synchronize with the XServer
+                 getDisplay()->GetXLib()->PushXErrorLevel( true );
+-                XSetInputFocus( getDisplay()->GetDisplay(), GDK_WINDOW_XWINDOW( m_pWindow->window ), RevertToParent, CurrentTime );
++                XSetInputFocus( getDisplay()->GetDisplay(), GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow) ), RevertToParent, CurrentTime );
+                 XSync( getDisplay()->GetDisplay(), False );
+                 getDisplay()->GetXLib()->PopXErrorLevel();
+             }
+@@ -2126,7 +2145,7 @@
+     {
+         m_ePointerStyle = ePointerStyle;
+         GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
+-        gdk_window_set_cursor( m_pWindow->window, pCursor );
++        gdk_window_set_cursor( widget_get_window(m_pWindow), pCursor );
+         m_pCurrentCursor = pCursor;
+         
+         // #i80791# use grabPointer the same way as CaptureMouse, respective float grab
+@@ -2161,7 +2180,7 @@
+             {
+                 const int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
+     
+-                gdk_pointer_grab( m_pWindow->window, bOwnerEvents,
++                gdk_pointer_grab( widget_get_window(m_pWindow), bOwnerEvents,
+                                   (GdkEventMask) nMask, NULL, m_pCurrentCursor,
+                                   GDK_CURRENT_TIME );
+             }
+@@ -2174,7 +2193,7 @@
+                 // this is of course a bad hack, especially as we cannot
+                 // set the right cursor this way
+                 XGrabPointer( getDisplay()->GetDisplay(),
+-                              GDK_WINDOW_XWINDOW( m_pWindow->window),
++                              GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow)),
+                               bOwnerEvents,
+                               PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
+                               GrabModeAsync,
+@@ -2222,7 +2241,7 @@
+     // #i38648# ask for the next motion hint
+     gint x, y;
+     GdkModifierType mask;
+-    gdk_window_get_pointer( pFrame->m_pWindow->window, &x, &y, &mask );
++    gdk_window_get_pointer( widget_get_window(pFrame->m_pWindow), &x, &y, &mask );
+ }
+ 
+ void GtkSalFrame::Flush()
+@@ -2308,7 +2327,7 @@
+ 		return NULL;
+ 
+ 	X11SalBitmap *pBmp = new X11SalBitmap;
+-	GdkWindow *pWin = m_pWindow->window;
++	GdkWindow *pWin = widget_get_window(m_pWindow);
+ 	if( pBmp->SnapShot( GDK_DISPLAY_XDISPLAY( getGdkDisplay() ),
+ 						GDK_WINDOW_XID( pWin ) ) )
+ 		return pBmp;
+@@ -2370,7 +2389,7 @@
  
  void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nScreen )
  {
@@ -139,6 +335,150 @@
      if( bWasVisible )
          Show( FALSE );
      
+@@ -2443,7 +2462,7 @@
+     {
+         if( m_aGraphics[i].bInUse )
+         {
+-            m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
++            m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
+             m_aGraphics[i].pGraphics->SetWindow( m_pWindow );
+         }
+     }
+@@ -2473,7 +2492,7 @@
+ void GtkSalFrame::ResetClipRegion()
+ {
+     if( m_pWindow )
+-        gdk_window_shape_combine_region( m_pWindow->window, NULL, 0, 0 );
++        gdk_window_shape_combine_region( widget_get_window(m_pWindow), NULL, 0, 0 );
+ }
+ 
+ void GtkSalFrame::BeginSetClipRegion( ULONG )
+@@ -2500,7 +2519,7 @@
+ void GtkSalFrame::EndSetClipRegion()
+ {
+     if( m_pWindow && m_pRegion )
+-        gdk_window_shape_combine_region( m_pWindow->window, m_pRegion, 0, 0 );
++        gdk_window_shape_combine_region( widget_get_window(m_pWindow), m_pRegion, 0, 0 );
+ }
+ 
+ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
+@@ -2514,7 +2533,7 @@
+         if( pEvent->xproperty.atom == nDesktopAtom &&
+             pEvent->xproperty.state == PropertyNewValue )
+         {
+-            m_nWorkArea = pAdaptor->getWindowWorkArea( GDK_WINDOW_XWINDOW( m_pWindow->window) );
++            m_nWorkArea = pAdaptor->getWindowWorkArea( GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow) ) );
+         }
+     }
+     else if( pEvent->type == ConfigureNotify )
+@@ -2541,7 +2560,7 @@
+             int x = 0, y = 0;
+             XLIB_Window aChild;
+             XTranslateCoordinates( getDisplay()->GetDisplay(),
+-                                   GDK_WINDOW_XWINDOW( m_pWindow->window),
++                                   GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow) ),
+                                    getDisplay()->GetRootWindow( getDisplay()->GetDefaultScreenNumber() ),
+                                    0, 0,
+                                    &x, &y,
+@@ -2556,7 +2575,7 @@
+     }
+     else if( pEvent->type == ClientMessage &&
+              pEvent->xclient.message_type == getDisplay()->getWMAdaptor()->getAtom( vcl_sal::WMAdaptor::XEMBED ) &&
+-             pEvent->xclient.window == GDK_WINDOW_XWINDOW(m_pWindow->window) &&
++             pEvent->xclient.window == GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)) &&
+              m_bWindowIsGtkPlug
+              )
+     {
+@@ -2568,7 +2587,7 @@
+         {
+             GdkEventFocus aEvent;
+             aEvent.type = GDK_FOCUS_CHANGE;
+-            aEvent.window = m_pWindow->window;
++            aEvent.window = widget_get_window(m_pWindow);
+             aEvent.send_event = TRUE;
+             aEvent.in = (pEvent->xclient.data.l[1] == 1);
+             signalFocus( m_pWindow, &aEvent, this );
+@@ -2583,7 +2602,7 @@
+     if( m_hBackgroundPixmap )
+     {
+         XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
+-                                    GDK_WINDOW_XWINDOW(m_pWindow->window),
++                                    GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                                     None );
+         XFreePixmap( getDisplay()->GetDisplay(), m_hBackgroundPixmap );
+         m_hBackgroundPixmap = None;
+@@ -2596,7 +2615,7 @@
+         {
+             m_hBackgroundPixmap =
+                 XCreatePixmap( getDisplay()->GetDisplay(),
+-                               GDK_WINDOW_XWINDOW(m_pWindow->window),
++                               GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                                aSize.Width(),
+                                aSize.Height(),
+                                getDisplay()->GetVisual(m_nScreen).GetDepth() );
+@@ -2612,7 +2631,7 @@
+                                aTwoRect,
+                                getDisplay()->GetCopyGC(m_nScreen) );
+                 XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
+-                                            GDK_WINDOW_XWINDOW(m_pWindow->window),
++                                            GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
+                                             m_hBackgroundPixmap );
+             }
+         }
+@@ -2785,7 +2804,7 @@
+ 			// ask for the next hint
+ 			gint x, y;
+ 			GdkModifierType mask;
+-			gdk_window_get_pointer( GTK_WIDGET(pThis->m_pWindow)->window, &x, &y, &mask );
++			gdk_window_get_pointer( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &x, &y, &mask );
+ 		}
+ 	}
+ 
+@@ -2873,7 +2892,7 @@
+         */
+         if( ! pThis->m_pParent && (pThis->m_nStyle & SAL_FRAME_STYLE_MOVEABLE) != 0 )
+             XSetInputFocus( pThis->getDisplay()->GetDisplay(),
+-                            GDK_WINDOW_XWINDOW( GTK_WIDGET(pThis->m_pWindow)->window),
++                            GDK_WINDOW_XWINDOW( widget_get_window(GTK_WIDGET(pThis->m_pWindow)) ),
+                             RevertToParent, CurrentTime );
+     }
+                     
+@@ -2921,7 +2940,7 @@
+      */
+     XLIB_Window aChild;
+     XTranslateCoordinates( pThis->getDisplay()->GetDisplay(),
+-                           GDK_WINDOW_XWINDOW(GTK_WIDGET(pThis->m_pWindow)->window),
++                           GDK_WINDOW_XWINDOW(widget_get_window(GTK_WIDGET(pThis->m_pWindow))),
+                            pThis->getDisplay()->GetRootWindow( pThis->getDisplay()->GetDefaultScreenNumber() ),
+                            0, 0,
+                            &x, &y,
+@@ -2955,7 +2974,7 @@
+     if( ! (pThis->m_nStyle & SAL_FRAME_STYLE_PLUG) )
+     {
+         GdkRectangle aRect;
+-        gdk_window_get_frame_extents( GTK_WIDGET(pThis->m_pWindow)->window, &aRect );
++        gdk_window_get_frame_extents( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &aRect );
+         pThis->maGeometry.nTopDecoration	= y - aRect.y;
+         pThis->maGeometry.nBottomDecoration	= aRect.y + aRect.height - y - pEvent->height;
+         pThis->maGeometry.nLeftDecoration	= x - aRect.x;
+@@ -3166,7 +3185,7 @@
+     *  some time on the Xserver as well as prevent
+     *  some paint issues
+     */
+-    GdkWindow* pWin = GTK_WIDGET(pThis->getWindow())->window;
++    GdkWindow* pWin = widget_get_window(GTK_WIDGET(pThis->getWindow()));
+     if( pWin )
+     {
+         XLIB_Window aWin = GDK_WINDOW_XWINDOW(pWin);
+@@ -3269,7 +3288,7 @@
+                           G_CALLBACK (signalIMPreeditEnd), this );
+ 
+         m_pFrame->getDisplay()->GetXLib()->PushXErrorLevel( true );
+-        gtk_im_context_set_client_window( m_pIMContext, GTK_WIDGET(m_pFrame->m_pWindow)->window );
++        gtk_im_context_set_client_window( m_pIMContext, widget_get_window(GTK_WIDGET(m_pFrame->m_pWindow)) );
+ 		gtk_im_context_focus_in( m_pIMContext );
+         m_pFrame->getDisplay()->GetXLib()->PopXErrorLevel();
+         m_bFocused = true;
 --- vcl.orig/unx/gtk/window/makefile.mk	2010-05-29 11:29:16.000000000 +0100
 +++ vcl/unx/gtk/window/makefile.mk	2010-05-29 11:30:51.000000000 +0100
 @@ -50,7 +50,7 @@
@@ -226,7 +566,53 @@
  
    if (xev->xany.type == ClientMessage &&
        xev->xclient.message_type == icon->manager_atom &&
-@@ -322,6 +323,16 @@
+@@ -280,6 +281,36 @@
+ #endif
+ }
+ 
++static gboolean
++gtk_widget_is_has_window(GtkWidget *widget)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_get_has_window(widget);
++#else
++    return GTK_WIDGET_NO_WINDOW(widget);
++#endif
++}
++
++static gboolean
++gtk_widget_is_app_paintable(GtkWidget *widget)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_get_app_paintable(widget);
++#else
++    return GTK_WIDGET_APP_PAINTABLE(widget);
++#endif
++}
++
++static GdkWindow *
++gtk_widget_window(GtkWidget *widget)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_get_window(widget);
++#else
++    return widget->window
++#endif
++}
++
+ #ifdef GDK_WINDOWING_X11
+ 
+ static void
+@@ -297,7 +328,7 @@
+   ev.window = window;
+   ev.message_type = icon->system_tray_opcode_atom;
+   ev.format = 32;
+-  ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
++  ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_window(GTK_WIDGET(icon)));
+   ev.data.l[1] = message;
+   ev.data.l[2] = data1;
+   ev.data.l[3] = data2;
+@@ -322,6 +353,16 @@
  				      0, 0);
  }
  
@@ -243,7 +629,7 @@
  static void
  egg_tray_icon_update_manager_window (EggTrayIcon *icon,
  				     gboolean     dock_if_realized)
-@@ -354,7 +365,7 @@
+@@ -354,7 +395,7 @@
        
        gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
  
@@ -252,43 +638,26 @@
  	egg_tray_icon_send_dock_request (icon);
  
        egg_tray_icon_get_orientation_property (icon);
-@@ -383,6 +394,7 @@
+@@ -383,7 +424,8 @@
  static gboolean
  transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
  {
+-  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
 +  (void)user_data;
-   gdk_window_clear_area (widget->window, event->area.x, event->area.y,
++  gdk_window_clear_area (gtk_widget_window(widget), event->area.x, event->area.y,
  			 event->area.width, event->area.height);
    return FALSE;
-@@ -392,15 +404,38 @@
+ }
+@@ -392,18 +434,21 @@
  make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
  			gpointer user_data)
  {
+-  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
 +  (void)previous_style;
 +  (void)user_data;
-   gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++  gdk_window_set_back_pixmap (gtk_widget_window(widget), NULL, TRUE);
  }
  
-+static gboolean
-+gtk_widget_is_has_window(GtkWidget *widget)
-+{
-+#if GTK_CHECK_VERSION(2,90,0)
-+    return gtk_widget_get_has_window(widget);
-+#else
-+    return GTK_WIDGET_NO_WINDOW(widget);
-+#endif
-+}
-+
-+static gboolean
-+gtk_widget_is_app_paintable(GtkWidget *widget)
-+{
-+#if GTK_CHECK_VERSION(2,90,0)
-+    return gtk_widget_get_app_paintable(widget);
-+#else
-+    return GTK_WIDGET_APP_PAINTABLE(widget);
-+#endif
-+}
-+
  static void
  make_transparent (GtkWidget *widget, gpointer user_data)
  {
@@ -299,7 +668,11 @@
 +  (void)user_data;
    gtk_widget_set_app_paintable (widget, TRUE);
    gtk_widget_set_double_buffered (widget, FALSE);
-   gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+-  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++  gdk_window_set_back_pixmap (gtk_widget_window(widget), NULL, TRUE);
+   g_signal_connect (widget, "expose_event",
+ 		    G_CALLBACK (transparent_expose_event), NULL);
+   g_signal_connect_after (widget, "style_set",
 --- libegg.orig/source/eggtrayicon-impl.h	2010-05-29 21:27:29.000000000 +0100
 +++ libegg/source/eggtrayicon-impl.h	2010-05-30 12:46:49.000000000 +0100
 @@ -21,7 +21,7 @@
@@ -591,7 +964,56 @@
  Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
 --- vcl.orig/unx/inc/plugins/gtk/gtkgdi.hxx	2010-06-21 12:34:41.000000000 +0100
 +++ vcl/unx/inc/plugins/gtk/gtkgdi.hxx	2010-06-21 13:16:40.000000000 +0100
-@@ -127,7 +127,7 @@
+@@ -36,6 +36,39 @@
+  
+ #include <salgdi.h>
+ 
++inline GdkWindow * widget_get_window(GtkWidget *widget)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_get_window(widget);
++#else
++    return widget->window
++#endif
++}
++
++inline void widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_set_can_focus(widget, can_focus);
++#else
++    if (can_focus)
++        GTK_WIDGET_SET_FLAGS( widget, GTK_CAN_FOCUS );
++    else
++        GTK_WIDGET_UNSET_FLAGS( widget, GTK_CAN_FOCUS );
++#endif
++}
++
++inline void widget_set_can_default(GtkWidget *widget, gboolean can_default)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    return gtk_widget_set_can_default(widget, can_default);
++#else
++    if (can_default)
++        GTK_WIDGET_SET_FLAGS( widget, GTK_CAN_DEFAULT );
++    else
++        GTK_WIDGET_UNSET_FLAGS( widget, GTK_CAN_DEFAULT );
++#endif
++}
++
+ class GtkSalGraphics : public X11SalGraphics
+ {
+     GtkWidget           *m_pWindow;
+@@ -49,7 +82,7 @@
+     virtual             ~GtkSalGraphics();
+     
+     inline GtkWidget*  GetGtkWidget() const { return m_pWindow; }
+-    inline GdkWindow*  GetGdkWindow() const { return m_pWindow->window; }
++    inline GdkWindow*  GetGdkWindow() const { return widget_get_window(m_pWindow); }
+     inline GtkSalFrame* GetGtkFrame() const { return static_cast<GtkSalFrame*>(m_pFrame); }
+     void SetWindow( GtkWidget* window ) { m_pWindow = window; } 
+     
+@@ -127,7 +160,7 @@
                              const clipList& rClipList,
                              ControlState nState, const ImplControlValue& aValue,
  							SalControlHandle& rControlHandle, const OUString& rCaption );
@@ -600,7 +1022,7 @@
  							 const Rectangle& rControlRectangle,
                               const clipList& rClipList,
                               ControlState nState, const ImplControlValue& aValue,
-@@ -137,7 +137,7 @@
+@@ -137,7 +170,7 @@
                              const clipList& rClipList,
                              ControlState nState, const ImplControlValue& aValue,
  							SalControlHandle& rControlHandle, const OUString& rCaption );
@@ -611,7 +1033,17 @@
                              ControlState nState, const ImplControlValue& aValue,
 --- vcl.orig/unx/gtk/gdi/salnativewidgets-gtk.cxx	2010-06-21 12:34:41.000000000 +0100
 +++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx	2010-06-21 13:19:37.000000000 +0100
-@@ -82,8 +82,14 @@
+@@ -28,6 +28,9 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_vcl.hxx"
+ 
++//GTK_HAS_DEFAULT and GTK_HAS_FOCUS are still a problem
++#undef GSEAL_ENABLE
++
+ #include "plugins/gtk/gtkframe.hxx"
+ #include "plugins/gtk/gtkdata.hxx"
+ #include "plugins/gtk/gtkinst.hxx"
+@@ -82,8 +85,14 @@
      GtkWidget *	gEditBoxWidget;
      GtkWidget *	gSpinButtonWidget;
      GtkWidget *	gNotebookWidget;
@@ -628,7 +1060,7 @@
      GtkWidget *	gScrolledWindowWidget;
      GtkWidget *  gToolbarWidget;
      GtkWidget *  gToolbarButtonWidget;
-@@ -118,8 +124,14 @@
+@@ -118,8 +127,14 @@
          gEditBoxWidget( NULL ),
          gSpinButtonWidget( NULL ),
          gNotebookWidget( NULL ),
@@ -645,7 +1077,7 @@
          gScrolledWindowWidget( NULL ),
          gToolbarWidget( NULL ),
          gToolbarButtonWidget( NULL ),
-@@ -163,8 +175,8 @@
+@@ -163,8 +178,8 @@
  static void NWEnsureGTKEditBox			( int nScreen );
  static void NWEnsureGTKSpinButton		( int nScreen );
  static void NWEnsureGTKNotebook			( int nScreen );
@@ -656,7 +1088,7 @@
  static void NWEnsureGTKScrolledWindow	( int nScreen );
  static void NWEnsureGTKToolbar			( int nScreen );
  static void NWEnsureGTKMenubar          ( int nScreen );
-@@ -205,14 +217,11 @@
+@@ -205,14 +220,11 @@
  							ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
  							const OUString& rCaption );
  //---
@@ -673,7 +1105,7 @@
  							const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
  
  static Rectangle NWGetToolbarRect( int nScreen,
-@@ -294,7 +303,6 @@
+@@ -294,7 +306,6 @@
          g_object_ref( m_pixmap );
  }
  
@@ -681,7 +1113,7 @@
  NWPixmapCache::NWPixmapCache( int nScreen )
  {
      m_idx = 0;
-@@ -304,25 +312,25 @@
+@@ -304,25 +315,25 @@
      if( gWidgetData[m_screen].gNWPixmapCacheList )
          gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
  } 
@@ -711,7 +1143,7 @@
      {
          if( pData[i].m_nType == aType &&
              pData[i].m_nState == aState &&    
-@@ -350,11 +358,11 @@
+@@ -350,11 +361,11 @@
      pData[m_idx].SetPixmap( pPixmap );
  }
  
@@ -724,7 +1156,7 @@
  void NWPixmapCacheList::RemoveCache( NWPixmapCache* pCache )
  {
      ::std::vector< NWPixmapCache* >::iterator p;
-@@ -362,6 +370,7 @@
+@@ -362,6 +373,7 @@
      if( p != mCaches.end() )
          mCaches.erase( p );
  }
@@ -732,7 +1164,16 @@
  void NWPixmapCacheList::ThemeChanged( )
  {
      ::std::vector< NWPixmapCache* >::iterator p = mCaches.begin();
-@@ -827,7 +836,7 @@
+@@ -506,7 +518,7 @@
+     if( pFrame && m_pWindow )
+     {
+         /* #i64117# some themes set the background pixmap VERY frequently */
+-        GdkWindow* pWin = GTK_WIDGET(m_pWindow)->window;
++        GdkWindow* pWin = widget_get_window(GTK_WIDGET(m_pWindow));
+         if( pWin )
+         {
+             aWin = GDK_WINDOW_XWINDOW(pWin);
+@@ -827,7 +839,7 @@
          ||(nPart==PART_BUTTON_DOWN)
          ) )
      {
@@ -741,7 +1182,7 @@
      }
      else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
      {
-@@ -838,7 +847,7 @@
+@@ -838,7 +850,7 @@
      }
      else if ( (nType==CTRL_LISTBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_WINDOW)) )
      {
@@ -750,7 +1191,7 @@
      }
      else if ( (nType== CTRL_TOOLBAR) )
      {
-@@ -996,7 +1005,7 @@
+@@ -996,7 +1008,7 @@
      }
      if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
      {
@@ -759,7 +1200,7 @@
          aValue, rControlHandle, rCaption );
          rNativeContentRegion = rNativeBoundingRegion;
          
-@@ -1013,7 +1022,7 @@
+@@ -1013,7 +1025,7 @@
      }
      if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
      {
@@ -768,7 +1209,185 @@
          aValue, rControlHandle, rCaption );
          rNativeContentRegion = rNativeBoundingRegion;
          
-@@ -1874,7 +1883,7 @@
+@@ -1171,20 +1183,20 @@
+         clipRect.height = it->GetHeight();
+         
+         // Buttons must paint opaque since some themes have alpha-channel enabled buttons
+-        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
+-                            &clipRect, m_pWindow, "base", x, y, w, h );
++        gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget), gdkDrawable, GTK_STATE_NORMAL,
++                            GTK_SHADOW_NONE, &clipRect, m_pWindow, "base", x, y, w, h );
+         
+-        if ( (nState & CTRL_STATE_DEFAULT) && (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief == GTK_RELIEF_NORMAL) )
++        if ( (nState & CTRL_STATE_DEFAULT) && (gtk_button_get_relief(GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget))== GTK_RELIEF_NORMAL) )
+         {
+-            gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
+-                           &clipRect, gWidgetData[m_nScreen].gBtnWidget, "buttondefault", x, y, w, h );
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget), gdkDrawable, GTK_STATE_NORMAL,
++                           GTK_SHADOW_IN, &clipRect, gWidgetData[m_nScreen].gBtnWidget, "buttondefault", x, y, w, h );
+         }
+         
+-        if ( (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief != GTK_RELIEF_NONE)
++        if ( (gtk_button_get_relief(GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)) != GTK_RELIEF_NONE)
+             || (nState & CTRL_STATE_PRESSED)
+ 		    || (nState & CTRL_STATE_ROLLOVER) )
+         {
+-            gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, stateType, shadowType,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget), gdkDrawable, stateType, shadowType,
+                            &clipRect, gWidgetData[m_nScreen].gBtnWidget, "button", xi, yi, wi, hi );
+         }
+     }
+@@ -1194,10 +1206,10 @@
+ 	{
+ 		if (interiorFocus)
+ 		{
+-			x += gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad;
+-			y += gWidgetData[m_nScreen].gBtnWidget->style->ythickness + focusPad;
+-			w -= 2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
+-			h -=  2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
++			x += gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget)->xthickness + focusPad;
++			y += gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget)->ythickness + focusPad;
++			w -= 2 * (gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget)->xthickness + focusPad);
++			h -=  2 * (gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget)->xthickness + focusPad);
+ 		}
+ 		else
+ 		{
+@@ -1207,7 +1219,7 @@
+ 			h += 2 * (focusWidth + focusPad);
+ 		}
+ 		if ( !interiorFocus )
+-			gtk_paint_focus( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, stateType, &clipRect,
++			gtk_paint_focus( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget), gdkDrawable, stateType, &clipRect,
+                              gWidgetData[m_nScreen].gBtnWidget, "button", x, y, w, h );
+ 	}
+ #endif
+@@ -1306,8 +1318,8 @@
+     // intermediate states between active/inactive. Let's hope that
+     // GtkToggleButtone stays binary compatible.
+ 	if (!isChecked)
+-		GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling)->active = TRUE;
+-	GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidget)->active = isChecked;
++		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling), TRUE);
++	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidget), isChecked);
+ 
+     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+     {
+@@ -1316,8 +1328,8 @@
+         clipRect.width = it->GetWidth();
+         clipRect.height = it->GetHeight();
+         
+-        gtk_paint_option( gWidgetData[m_nScreen].gRadioWidget->style, gdkDrawable, stateType, shadowType, 
+-                          &clipRect, gWidgetData[m_nScreen].gRadioWidget, "radiobutton",
++        gtk_paint_option( gtk_widget_get_style(gWidgetData[m_nScreen].gRadioWidget), gdkDrawable, stateType,
++                          shadowType, &clipRect, gWidgetData[m_nScreen].gRadioWidget, "radiobutton",
+                           x, y, indicator_size, indicator_size );
+     }
+     
+@@ -1353,7 +1365,7 @@
+ 	// Set the shadow based on if checked or not so we get a checkmark.
+ 	shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
+ 	NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
+-	GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gCheckWidget)->active = isChecked;
++	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gCheckWidget), isChecked);
+ 
+     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+     {
+@@ -1362,8 +1374,8 @@
+         clipRect.width = it->GetWidth();
+         clipRect.height = it->GetHeight();
+         
+-        gtk_paint_check( gWidgetData[m_nScreen].gCheckWidget->style, gdkDrawable, stateType, shadowType, 
+-                         &clipRect, gWidgetData[m_nScreen].gCheckWidget, "checkbutton",
++        gtk_paint_check( gtk_widget_get_style(gWidgetData[m_nScreen].gCheckWidget), gdkDrawable, stateType,
++                         shadowType, &clipRect, gWidgetData[m_nScreen].gCheckWidget, "checkbutton",
+                          x, y, indicator_size, indicator_size );
+     }
+ 
+@@ -1383,6 +1395,42 @@
+         ) );
+ }
+ 
++static void set_widget_orientation(GtkWidget *widget, GtkOrientation orientation)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    gtk_orientable_set_orientation( GTK_ORIENTABLE(widget), orientation );
++#else
++    gtk_toolbar_set_orientation( GTK_TOOLBAR(widget), orientation );
++#endif
++}
++
++static void set_adjustment_lower(GtkAdjustment *widget, double lower)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    gtk_adjustment_set_lower( widget, lower );
++#else
++    widget->lower = lower;
++#endif
++}
++
++static void set_adjustment_upper(GtkAdjustment *widget, double upper)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    gtk_adjustment_set_upper( widget, upper );
++#else
++    widget->upper = upper;
++#endif
++}
++
++static void set_adjustment_page_size(GtkAdjustment *widget, double page_size)
++{
++#if GTK_CHECK_VERSION(2,90,0)
++    gtk_adjustment_set_page_size( widget, page_size );
++#else
++    widget->page_size = page_size;
++#endif
++}
++
+ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
+                                           const Rectangle& rControlRectangle,
+                                           const clipList&,
+@@ -1568,20 +1616,13 @@
+ 	scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
+ 	if ( scrollbarValues == NULL )
+ 		scrollbarValues = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
++	set_adjustment_lower(scrollbarValues, pScrollbarVal->mnMin);
++	set_adjustment_upper(scrollbarValues, pScrollbarVal->mnMax);
++	gtk_adjustment_set_value(scrollbarValues, pScrollbarVal->mnCur);
+ 	if ( nPart == PART_DRAW_BACKGROUND_HORZ )
+-	{
+-		scrollbarValues->lower = pScrollbarVal->mnMin;
+-		scrollbarValues->upper = pScrollbarVal->mnMax;
+-		scrollbarValues->value = pScrollbarVal->mnCur;
+-		scrollbarValues->page_size = scrollbarRect.GetWidth() / 2;
+-	}
++	    set_adjustment_page_size(scrollbarValues, scrollbarRect.GetWidth() / 2);
+ 	else
+-	{
+-		scrollbarValues->lower = pScrollbarVal->mnMin;
+-		scrollbarValues->upper = pScrollbarVal->mnMax;
+-		scrollbarValues->value = pScrollbarVal->mnCur;
+-		scrollbarValues->page_size = scrollbarRect.GetHeight() / 2;
+-	}
++	    set_adjustment_page_size(scrollbarValues, scrollbarRect.GetHeight() / 2);
+ 	gtk_adjustment_changed( scrollbarValues );
+     
+     // as multiple paints are required for the scrollbar
+@@ -1600,11 +1641,11 @@
+ 	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+ 	NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
+ 	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
+-	style = GTK_WIDGET( scrollbarWidget )->style;
++	style = gtk_widget_get_style(GTK_WIDGET( scrollbarWidget ));
+ 
+ 	// ----------------- TROUGH
+-	gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, 
+-                        GTK_STATE_NORMAL, GTK_SHADOW_NONE, gdkRect,
++	gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget),
++                        gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, gdkRect,
+                         m_pWindow, "base", x, y, 
+                         w, h );
+ 	gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, 
+@@ -1874,7 +1915,7 @@
  	NWEnsureGTKButton( nScreen );
  	NWEnsureGTKEditBox( nScreen );
  	NWEnsureGTKSpinButton( nScreen );
@@ -777,7 +1396,7 @@
  	NWEnsureGTKScrolledWindow( nScreen );
  	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
  
-@@ -1887,14 +1896,13 @@
+@@ -1887,14 +1928,13 @@
  		case CTRL_SPINBOX:
  			widget = gWidgetData[nScreen].gSpinButtonWidget;
  			break;
@@ -794,7 +1413,72 @@
  		default:
  			widget = gWidgetData[nScreen].gEditBoxWidget;
  			break;
-@@ -2112,7 +2120,9 @@
+@@ -1913,12 +1953,12 @@
+     }
+ 	NWSetWidgetState( widget, nState, stateType );
+ 
+-	gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE, 
+-                        gdkRect, pBGWidget, "entry_bg",
++	gtk_paint_flat_box( gtk_widget_get_style(pBGWidget), gdkDrawable, stateType,
++                        GTK_SHADOW_NONE, gdkRect, pBGWidget, "entry_bg",
+                         aEditBoxRect.Left(), aEditBoxRect.Top(), 
+                         aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
+-	gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
+-                      gdkRect, widget, "entry",
++	gtk_paint_shadow( gtk_widget_get_style(widget), gdkDrawable, GTK_STATE_NORMAL,
++                      GTK_SHADOW_IN, gdkRect, widget, "entry",
+                       aEditBoxRect.Left(), aEditBoxRect.Top(), 
+                       aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
+ 
+@@ -2003,8 +2043,8 @@
+ 		Rectangle		shadowRect( upBtnRect );
+ 
+ 		shadowRect.Union( downBtnRect );
+-		gtk_paint_box( gWidgetData[m_nScreen].gSpinButtonWidget->style, pixmap, GTK_STATE_NORMAL, shadowType, NULL,
+-			gWidgetData[m_nScreen].gSpinButtonWidget, "spinbutton",
++		gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gSpinButtonWidget), pixmap, GTK_STATE_NORMAL,
++            shadowType, NULL, gWidgetData[m_nScreen].gSpinButtonWidget, "spinbutton",
+ 			(shadowRect.Left() - pixmapRect.Left()), (shadowRect.Top() - pixmapRect.Top()),
+ 			shadowRect.GetWidth(), shadowRect.GetHeight() );
+ 	}
+@@ -2038,10 +2078,10 @@
+ 
+ 	NWEnsureGTKSpinButton( nScreen );
+ 
+-	buttonSize = MAX( PANGO_PIXELS( pango_font_description_get_size(GTK_WIDGET(gWidgetData[nScreen].gSpinButtonWidget)->style->font_desc) ),
++	buttonSize = MAX( PANGO_PIXELS( pango_font_description_get_size(gtk_widget_get_style(GTK_WIDGET(gWidgetData[nScreen].gSpinButtonWidget))->font_desc) ),
+ 				   MIN_SPIN_ARROW_WIDTH );
+ 	buttonSize -= buttonSize % 2 - 1; /* force odd */
+-	buttonRect.SetSize( Size( buttonSize + 2 * gWidgetData[nScreen].gSpinButtonWidget->style->xthickness,
++	buttonRect.SetSize( Size( buttonSize + 2 * gtk_widget_get_style(gWidgetData[nScreen].gSpinButtonWidget)->xthickness,
+                               buttonRect.GetHeight() ) );
+ 	buttonRect.setX( aAreaRect.Left() + (aAreaRect.GetWidth() - buttonRect.GetWidth()) );
+ 	if ( nPart == PART_BUTTON_UP )
+@@ -2089,12 +2129,12 @@
+ 	buttonRect = NWGetSpinButtonRect( nScreen, nType, nPart, aAreaRect, nState, aValue, rControlHandle, rCaption );
+ 
+ 	NWSetWidgetState( gWidgetData[nScreen].gSpinButtonWidget, nState, stateType );
+-	gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, NULL, gWidgetData[nScreen].gSpinButtonWidget,
++	gtk_paint_box( gtk_widget_get_style(gWidgetData[nScreen].gSpinButtonWidget), pixmap, stateType, shadowType, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ 			(nPart == PART_BUTTON_UP) ? "spinbutton_up" : "spinbutton_down",
+ 			(buttonRect.Left() - aAreaRect.Left()), (buttonRect.Top() - aAreaRect.Top()),
+ 			buttonRect.GetWidth(), buttonRect.GetHeight() );
+ 
+-	arrowSize = (buttonRect.GetWidth() - (2 * gWidgetData[nScreen].gSpinButtonWidget->style->xthickness)) - 4;
++	arrowSize = (buttonRect.GetWidth() - (2 * gtk_widget_get_style(gWidgetData[nScreen].gSpinButtonWidget)->xthickness)) - 4;
+ 	arrowSize -= arrowSize % 2 - 1; /* force odd */
+     arrowRect.SetSize( Size( arrowSize, arrowSize ) );
+ 	arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 );
+@@ -2103,7 +2143,7 @@
+ 	else
+ 		arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
+ 
+-	gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
++	gtk_paint_arrow( gtk_widget_get_style(gWidgetData[nScreen].gSpinButtonWidget), pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ 			"spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, TRUE,
+ 			(arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
+ 			arrowRect.GetWidth(), arrowRect.GetHeight() );
+@@ -2112,7 +2152,9 @@
  
  //-------------------------------------
  
@@ -805,7 +1489,7 @@
                                           ControlType nType, ControlPart nPart,
                                           const Rectangle& rControlRectangle,
                                           const clipList& rClipList,
-@@ -2129,8 +2139,7 @@
+@@ -2129,8 +2171,7 @@
      GdkRectangle	clipRect;
  
  	NWEnsureGTKButton( m_nScreen );
@@ -815,7 +1499,7 @@
  	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
  
  	// Find the overall bounding rect of the buttons's drawing area,
-@@ -2140,17 +2149,15 @@
+@@ -2140,17 +2181,15 @@
      y = rControlRectangle.Top();
  
  	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
@@ -835,13 +1519,20 @@
  	arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
  	                         (gint)(MIN_ARROW_SIZE * ARROW_EXTENT) ) );
  	arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
-@@ -2173,14 +2180,14 @@
+@@ -2168,19 +2207,21 @@
+                                nState, aValue, rControlHandle, rCaption );
+         
+         // Buttons must paint opaque since some themes have alpha-channel enabled buttons
+-        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
++        gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget), gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
+                             &clipRect, m_pWindow, "base", 
                              x+(buttonRect.Left() - pixmapRect.Left()), 
                              y+(buttonRect.Top() - pixmapRect.Top()),
                              buttonRect.GetWidth(), buttonRect.GetHeight() );
 -        gtk_paint_box( GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button->style, gdkDrawable, stateType, shadowType,
 -                       &clipRect, GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button, "button",
-+        gtk_paint_box( gWidgetData[m_nScreen].gComboBoxEntry_ButtonWidget->style, gdkDrawable, stateType, shadowType,
++        gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gComboBoxEntry_ButtonWidget),
++                       gdkDrawable, stateType, shadowType,
 +                       &clipRect, gWidgetData[m_nScreen].gComboBoxEntry_ButtonWidget, "button",
                         x+(buttonRect.Left() - pixmapRect.Left()), 
                         y+(buttonRect.Top() - pixmapRect.Top()),
@@ -849,12 +1540,13 @@
  
 -        gtk_paint_arrow( gWidgetData[m_nScreen].gArrowWidget->style, gdkDrawable, stateType, shadowType,
 -                         &clipRect, gWidgetData[m_nScreen].gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
-+        gtk_paint_arrow( gWidgetData[m_nScreen].gComboBoxEntry_ArrowWidget->style, gdkDrawable, stateType, shadowType,
++        gtk_paint_arrow( gtk_widget_get_style(gWidgetData[m_nScreen].gComboBoxEntry_ArrowWidget),
++                         gdkDrawable, stateType, shadowType,
 +                         &clipRect, gWidgetData[m_nScreen].gComboBoxEntry_ArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
                           x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
-@@ -2188,9 +2195,125 @@
+@@ -2188,9 +2229,128 @@
  	return( TRUE );
  }
  
@@ -915,19 +1607,22 @@
 +        if ( nPart != PART_WINDOW )
 +        {
 +            // Buttons must paint opaque since some themes have alpha-channel enabled buttons
-+            gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
++            gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gBtnWidget),
++                                gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
 +                                &clipRect, m_pWindow, "base", 
 +                                x+(pixmapRect.Left() - pixmapRect.Left()), 
 +                                y+(pixmapRect.Top() - pixmapRect.Top()),
 +                                pixmapRect.GetWidth(), pixmapRect.GetHeight() );
 +
-+            gtk_paint_box( gWidgetData[m_nScreen].gComboBox_ButtonWidget->style, gdkDrawable, stateType, shadowType,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gComboBox_ButtonWidget),
++                           gdkDrawable, stateType, shadowType,
 +                           &clipRect, gWidgetData[m_nScreen].gComboBox_ButtonWidget, "button",
 +                           x+(pixmapRect.Left() - pixmapRect.Left()), 
 +                           y+(pixmapRect.Top() - pixmapRect.Top()),
 +                           pixmapRect.GetWidth(), pixmapRect.GetHeight() );
 +
-+            gtk_paint_arrow( gWidgetData[m_nScreen].gComboBox_ArrowWidget->style, gdkDrawable, stateType, shadowType,
++            gtk_paint_arrow( gtk_widget_get_style(gWidgetData[m_nScreen].gComboBox_ArrowWidget),
++                             gdkDrawable, stateType, shadowType,
 +                             &clipRect, gWidgetData[m_nScreen].gComboBox_ArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
 +                             x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
 +                             arrowRect.GetWidth(), arrowRect.GetHeight() );
@@ -943,7 +1638,7 @@
 +
 +                if (bWideSeparators)
 +                {
-+                    gtk_paint_box(gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style,
++                    gtk_paint_box(gtk_widget_get_style(gWidgetData[m_nScreen].gComboBox_SeparatorWidget),
 +                        gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_ETCHED_OUT,
 +                        &clipRect, gWidgetData[m_nScreen].gComboBox_SeparatorWidget,
 +                        "vseparator", x+(arrowRect.Left() - pixmapRect.Left()-nSeparatorWidth),
@@ -951,12 +1646,12 @@
 +                }
 +                else
 +                {
-+                    gtk_paint_vline(gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style,
++                    gtk_paint_vline(gtk_widget_get_style(gWidgetData[m_nScreen].gComboBox_SeparatorWidget),
 +                        gdkDrawable, GTK_STATE_NORMAL, &clipRect,
 +                        gWidgetData[m_nScreen].gComboBox_SeparatorWidget, "vseparator",
 +                        y+(arrowRect.Top() - pixmapRect.Top()), y+(arrowRect.Top() - pixmapRect.Top()) + arrowRect.GetHeight(),
 +                        x+(arrowRect.Left() - pixmapRect.Left())-
-+                            gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style->xthickness);
++                            gtk_widget_get_style(gWidgetData[m_nScreen].gComboBox_SeparatorWidget)->xthickness);
 +                }
 +            }
 +        }
@@ -964,8 +1659,8 @@
 +        {
 +            NWEnsureGTKScrolledWindow(m_nScreen);
 +
-+            gtk_paint_shadow( gWidgetData[m_nScreen].gScrolledWindowWidget->style, gdkDrawable,
-+                GTK_STATE_NORMAL, GTK_SHADOW_IN, &clipRect,
++            gtk_paint_shadow( gtk_widget_get_style(gWidgetData[m_nScreen].gScrolledWindowWidget),
++                gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, &clipRect,
 +                gWidgetData[m_nScreen].gScrolledWindowWidget, "scrolled_window",
 +                x, y, pixmapRect.GetWidth(), pixmapRect.GetHeight() );
 +        }
@@ -981,7 +1676,7 @@
                                            ControlType,
  									      ControlPart nPart,
                                            Rectangle				aAreaRect,
-@@ -2205,16 +2328,16 @@
+@@ -2205,16 +2365,18 @@
  	gint		nFocusWidth;
  	gint		nFocusPad;
  
@@ -995,23 +1690,25 @@
  									"focus-padding", 	&nFocusPad, (char *)NULL );
  
 -	nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gArrowWidget)->xpad * 2);
-+    nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gComboBoxEntry_ArrowWidget)->xpad * 2);
++    gint xpad=0;
++    gtk_misc_get_padding(GTK_MISC(gWidgetData[nScreen].gComboBoxEntry_ArrowWidget), &xpad, NULL);
++    nArrowWidth = MIN_ARROW_SIZE + (xpad * 2);
      nButtonWidth = nArrowWidth +
 -                   ((BTN_CHILD_SPACING + gWidgetData[nScreen].gDropdownWidget->style->xthickness) * 2)
-+                   ((BTN_CHILD_SPACING + gWidgetData[nScreen].gComboBoxEntry_ButtonWidget->style->xthickness) * 2)
++                   ((BTN_CHILD_SPACING + gtk_widget_get_style(gWidgetData[nScreen].gComboBoxEntry_ButtonWidget)->xthickness) * 2)
  				   + (2 * (nFocusWidth+nFocusPad));
      if( nPart == PART_BUTTON_DOWN )
      {
-@@ -2224,13 +2347,76 @@
+@@ -2224,13 +2386,78 @@
      }
      else if( nPart == PART_SUB_EDIT )
      {
 -        NWEnsureGTKCombo( nScreen );
-+        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboBoxEntryWidget)->border_width +
++        gint adjust_x = gtk_container_get_border_width(GTK_CONTAINER(gWidgetData[nScreen].gComboBoxEntryWidget)) +
 +                        nFocusWidth +
 +                        nFocusPad;
-+        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboBoxEntryWidget->style->ythickness;
-+        adjust_x     += gWidgetData[nScreen].gComboBoxEntryWidget->style->xthickness;
++        gint adjust_y = adjust_x + gtk_widget_get_style(gWidgetData[nScreen].gComboBoxEntryWidget)->ythickness;
++        adjust_x     += gtk_widget_get_style(gWidgetData[nScreen].gComboBoxEntryWidget)->xthickness;
 +        aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
 +                                   aAreaRect.GetHeight() - 2 * adjust_y ) );
 +        Point aEditPos = aAreaRect.TopLeft();
@@ -1045,7 +1742,9 @@
 +                                    "focus-line-width", &nFocusWidth,
 +                                    "focus-padding",    &nFocusPad, (char *)NULL );
 +
-+    nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gComboBox_ArrowWidget)->xpad * 2);
++    gint xpad=0;
++    gtk_misc_get_padding(GTK_MISC(gWidgetData[nScreen].gComboBoxEntry_ArrowWidget), &xpad, NULL);
++    nArrowWidth = MIN_ARROW_SIZE + (xpad * 2);
 +
 +    gint nSeparatorWidth = 0;
 +    if (gWidgetData[nScreen].gComboBox_SeparatorWidget)
@@ -1057,11 +1756,11 @@
 +                             NULL);
 +
 +        if (!bWideSeparators)
-+            nSeparatorWidth = gWidgetData[nScreen].gComboBox_SeparatorWidget->style->xthickness;
++            nSeparatorWidth = gtk_widget_get_style(gWidgetData[nScreen].gComboBox_SeparatorWidget)->xthickness;
 +    }
 +
 +    nButtonWidth = nArrowWidth + nSeparatorWidth +
-+                   + gWidgetData[nScreen].gComboBox_ButtonWidget->style->xthickness
++                   + gtk_widget_get_style(gWidgetData[nScreen].gComboBox_ButtonWidget)->xthickness
 +                   + (nFocusWidth+nFocusPad);
          
 -        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
@@ -1073,17 +1772,17 @@
 +    }
 +    else if( nPart == PART_SUB_EDIT )
 +    {
-+        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboBoxWidget)->border_width +
++        gint adjust_x = gtk_container_get_border_width(GTK_CONTAINER(gWidgetData[nScreen].gComboBoxWidget)) +
                          nFocusWidth +
                          nFocusPad;
 -        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboWidget->style->ythickness;
 -        adjust_x     += gWidgetData[nScreen].gComboWidget->style->xthickness;
-+        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboBoxWidget->style->ythickness;
-+        adjust_x     += gWidgetData[nScreen].gComboBoxWidget->style->xthickness;
++        gint adjust_y = adjust_x + gtk_widget_get_style(gWidgetData[nScreen].gComboBoxWidget)->ythickness;
++        adjust_x     += gtk_widget_get_style(gWidgetData[nScreen].gComboBoxWidget)->xthickness;
          aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
                                     aAreaRect.GetHeight() - 2 * adjust_y ) );
          Point aEditPos = aAreaRect.TopLeft();
-@@ -2242,6 +2428,7 @@
+@@ -2242,6 +2469,7 @@
  	return( aButtonRect );
  }
  
@@ -1091,7 +1790,40 @@
  //-------------------------------------
  
  
-@@ -2385,100 +2572,13 @@
+@@ -2336,7 +2564,7 @@
+     paintRect.width = pixmapRect.GetWidth();
+     paintRect.height = pixmapRect.GetHeight();
+                              
+-    gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL, 
++    gtk_paint_flat_box( gtk_widget_get_style(m_pWindow), pixmap, GTK_STATE_NORMAL, 
+ 		                GTK_SHADOW_NONE, &paintRect, m_pWindow, "base", 0, 0, -1, -1);
+ 
+ 	NWSetWidgetState( gWidgetData[m_nScreen].gNotebookWidget, nState, stateType );
+@@ -2348,20 +2576,20 @@
+ 
+ 		case CTRL_FIXEDBORDER:
+ 		case CTRL_TAB_PANE:
+-			gtk_paint_box_gap( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
++			gtk_paint_box_gap( gtk_widget_get_style(gWidgetData[m_nScreen].gNotebookWidget), pixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
+ 				(char *)"notebook", 0, 0, pixmapRect.GetWidth(), pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
+ 			break;
+ 
+ 		case CTRL_TAB_ITEM:
+ 			stateType = ( nState & CTRL_STATE_SELECTED ) ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE;
+ 
+-			gtk_paint_extension( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
++			gtk_paint_extension( gtk_widget_get_style(gWidgetData[m_nScreen].gNotebookWidget), pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
+ 				(char *)"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
+ 				tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
+ 
+ 			if ( nState & CTRL_STATE_SELECTED )
+ 			{
+-				gtk_paint_flat_box( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
++				gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gNotebookWidget), pixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
+ 					(char *)"base", 0, (pixmapRect.GetHeight() - 1), pixmapRect.GetWidth(), 1 );
+ 			}
+ 			break;
+@@ -2385,102 +2613,6 @@
  	return bSuccess;
  }
  
@@ -1104,8 +1836,7 @@
 -                                        ControlState nState, 
 -                                        const ImplControlValue& aValue,
 -                                        SalControlHandle& rControlHandle, const OUString& rCaption )
-+static void set_widget_orientation(GtkWidget *widget, GtkOrientation orientation)
- {
+-{
 -	Rectangle		pixmapRect;
 -	Rectangle		widgetRect;
 -	Rectangle		aIndicatorRect;
@@ -1190,16 +1921,20 @@
 -    }
 -    
 -	return( TRUE );
-+#if GTK_CHECK_VERSION(2,90,0)
-+    gtk_orientable_set_orientation( GTK_ORIENTABLE(widget), orientation );
-+#else
-+    gtk_toolbar_set_orientation( GTK_TOOLBAR(widget), orientation );
-+#endif
- }
- 
+-}
+-
  BOOL GtkSalGraphics::NWPaintGTKToolbar(
-@@ -2518,9 +2618,9 @@
-             GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gToolbarWidget, GTK_SENSITIVE );
+             GdkDrawable* gdkDrawable,
+             ControlType, ControlPart nPart,
+@@ -2513,23 +2645,23 @@
+     {
+ 	    NWSetWidgetState( gWidgetData[m_nScreen].gToolbarWidget, nState, stateType );
+ 
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gToolbarWidget, GTK_SENSITIVE );
++        gtk_widget_set_sensitive( gWidgetData[m_nScreen].gToolbarWidget, false );
+         if ( nState & CTRL_STATE_ENABLED )
+-            GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gToolbarWidget, GTK_SENSITIVE );
++            gtk_widget_set_sensitive( gWidgetData[m_nScreen].gToolbarWidget, true );
  
          if( nPart == PART_DRAW_BACKGROUND_HORZ )
 -            gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_HORIZONTAL );
@@ -1210,7 +1945,199 @@
      }        
      // handle grip
      else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
-@@ -2999,118 +3099,6 @@
+     {
+ 	    NWSetWidgetState( gWidgetData[m_nScreen].gHandleBoxWidget, nState, stateType );
+ 
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gHandleBoxWidget, GTK_SENSITIVE );
++        gtk_widget_set_sensitive( gWidgetData[m_nScreen].gHandleBoxWidget, false );
+         if ( nState & CTRL_STATE_ENABLED )
+-            GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gHandleBoxWidget, GTK_SENSITIVE );
++            gtk_widget_set_sensitive( gWidgetData[m_nScreen].gHandleBoxWidget, true );
+ 
+         gtk_handle_box_set_shadow_type( GTK_HANDLE_BOX(gWidgetData[m_nScreen].gHandleBoxWidget), shadowType );
+ 
+@@ -2547,7 +2679,7 @@
+     else if( nPart == PART_BUTTON )
+     {
+         bPaintButton =
+-            (GTK_BUTTON(pButtonWidget)->relief != GTK_RELIEF_NONE)
++            (gtk_button_get_relief(GTK_BUTTON(pButtonWidget)) != GTK_RELIEF_NONE)
+             || (nState & CTRL_STATE_PRESSED)
+ 		    || (nState & CTRL_STATE_ROLLOVER); 
+         if( aValue.getTristateVal() == BUTTONVALUE_ON )
+@@ -2576,7 +2708,7 @@
+         // draw toolbar
+         if( nPart == PART_DRAW_BACKGROUND_HORZ || nPart == PART_DRAW_BACKGROUND_VERT )
+         {
+-            gtk_paint_flat_box( gWidgetData[m_nScreen].gToolbarWidget->style,
++            gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gToolbarWidget),
+                                 gdkDrawable,
+                                 (GtkStateType)GTK_STATE_NORMAL,
+                                 GTK_SHADOW_NONE, 
+@@ -2584,7 +2716,7 @@
+                                 gWidgetData[m_nScreen].gToolbarWidget,
+                                 "base",
+                                 x, y, w, h );
+-            gtk_paint_box( gWidgetData[m_nScreen].gToolbarWidget->style,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gToolbarWidget),
+                            gdkDrawable,
+                            stateType,
+                            shadowType,
+@@ -2596,7 +2728,7 @@
+         // draw grip
+         else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
+         {
+-            gtk_paint_handle( gWidgetData[m_nScreen].gHandleBoxWidget->style,
++            gtk_paint_handle( gtk_widget_get_style(gWidgetData[m_nScreen].gHandleBoxWidget),
+                               gdkDrawable,
+                               GTK_STATE_NORMAL,
+                               GTK_SHADOW_OUT,
+@@ -2614,7 +2746,7 @@
+         {
+             if( bPaintButton )
+             {
+-                gtk_paint_box( pButtonWidget->style, gdkDrawable,
++                gtk_paint_box( gtk_widget_get_style(pButtonWidget), gdkDrawable,
+                                stateType,
+                                shadowType,
+                                &clipRect,
+@@ -2672,12 +2804,12 @@
+         {
+             NWSetWidgetState( gWidgetData[m_nScreen].gMenubarWidget, nState, stateType );
+             
+-            GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gMenubarWidget, GTK_SENSITIVE );
++            gtk_widget_set_sensitive( gWidgetData[m_nScreen].gMenubarWidget, false );
+             if ( nState & CTRL_STATE_ENABLED )
+-                GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gMenubarWidget, GTK_SENSITIVE );
++                gtk_widget_set_sensitive( gWidgetData[m_nScreen].gMenubarWidget, true );
+ 
+             // #118704# for translucent menubar styles paint background first
+-            gtk_paint_flat_box( gWidgetData[m_nScreen].gMenubarWidget->style,
++            gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenubarWidget),
+                                 gdkDrawable,
+                                 GTK_STATE_NORMAL,
+                                 GTK_SHADOW_NONE, 
+@@ -2685,7 +2817,7 @@
+                                 GTK_WIDGET(m_pWindow),
+                                 "base", 
+                                 x, y, w, h );
+-            gtk_paint_box( gWidgetData[m_nScreen].gMenubarWidget->style,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenubarWidget),
+                            gdkDrawable,
+                            stateType,
+                            shadowType,
+@@ -2698,7 +2830,7 @@
+         {
+             if( nState & (CTRL_STATE_SELECTED|CTRL_STATE_ROLLOVER) )
+             {
+-                gtk_paint_box( gWidgetData[m_nScreen].gMenuItemMenubarWidget->style,
++                gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenuItemMenubarWidget),
+                                gdkDrawable,
+                                GTK_STATE_PRELIGHT,
+                                selected_shadow_type,
+@@ -2750,9 +2882,9 @@
+ 
+     NWSetWidgetState( gWidgetData[m_nScreen].gMenuWidget, nState, stateType );
+ 
+-    GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gMenuWidget, GTK_SENSITIVE );
++    gtk_widget_set_sensitive( gWidgetData[m_nScreen].gMenuWidget, false );
+     if ( nState & CTRL_STATE_ENABLED )
+-        GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gMenuWidget, GTK_SENSITIVE );
++        gtk_widget_set_sensitive( gWidgetData[m_nScreen].gMenuWidget, true );
+ 
+     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+     {
+@@ -2764,7 +2896,7 @@
+         if( nPart == PART_ENTIRE_CONTROL )
+         {
+             // #118704# for translucent menubar styles paint background first
+-            gtk_paint_flat_box( gWidgetData[m_nScreen].gMenuWidget->style,
++            gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenuWidget),
+                                 gdkDrawable,
+                                 GTK_STATE_NORMAL,
+                                 GTK_SHADOW_NONE, 
+@@ -2772,7 +2904,7 @@
+                                 GTK_WIDGET(m_pWindow),
+                                 "base", 
+                                 x, y, w, h );
+-            gtk_paint_box( gWidgetData[m_nScreen].gMenuWidget->style,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenuWidget),
+                            gdkDrawable,
+                            GTK_STATE_NORMAL,
+                            GTK_SHADOW_OUT,
+@@ -2786,7 +2918,7 @@
+             if( nState & (CTRL_STATE_SELECTED|CTRL_STATE_ROLLOVER) )
+             {
+                 if( nState & CTRL_STATE_ENABLED )
+-                gtk_paint_box( gWidgetData[m_nScreen].gMenuItemMenuWidget->style,
++                gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gMenuItemMenuWidget),
+                                gdkDrawable,
+                                GTK_STATE_PRELIGHT,
+                                selected_shadow_type,
+@@ -2817,7 +2949,7 @@
+ 
+             if ( nPart == PART_MENU_ITEM_CHECK_MARK )
+             {
+-                gtk_paint_check( pWidget->style,
++                gtk_paint_check( gtk_widget_get_style(pWidget),
+                                  gdkDrawable,
+                                  nStateType,
+                                  nShadowType,
+@@ -2828,7 +2960,7 @@
+             }
+             else
+             {
+-                gtk_paint_option( pWidget->style,
++                gtk_paint_option( gtk_widget_get_style(pWidget),
+                                   gdkDrawable,
+                                   nStateType,
+                                   nShadowType,
+@@ -2868,7 +3000,7 @@
+         clipRect.width = it->GetWidth();
+         clipRect.height = it->GetHeight();
+         
+-        gtk_paint_flat_box( gWidgetData[m_nScreen].gTooltipPopup->style,
++        gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gTooltipPopup),
+                             gdkDrawable,
+                             GTK_STATE_NORMAL,
+                             GTK_SHADOW_OUT,
+@@ -2920,7 +3052,7 @@
+         return FALSE;
+     
+     GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
+-    gtk_paint_expander( gWidgetData[m_nScreen].gTreeView->style,
++    gtk_paint_expander( gtk_widget_get_style(gWidgetData[m_nScreen].gTreeView),
+                         pixDrawable,
+                         stateType,
+                         NULL,
+@@ -2958,7 +3090,7 @@
+     GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
+ 
+     // paint background
+-    gtk_paint_flat_box( gWidgetData[m_nScreen].gProgressBar->style,
++    gtk_paint_flat_box( gtk_widget_get_style(gWidgetData[m_nScreen].gProgressBar),
+                         pixDrawable,
+                         GTK_STATE_NORMAL,
+                         GTK_SHADOW_NONE,
+@@ -2971,7 +3103,7 @@
+         // paint progress
+         if( Application::GetSettings().GetLayoutRTL() )
+         {
+-            gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gProgressBar),
+                            pixDrawable,
+                            GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
+                            NULL,
+@@ -2982,7 +3114,7 @@
+         }
+         else
+         {
+-            gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
++            gtk_paint_box( gtk_widget_get_style(gWidgetData[m_nScreen].gProgressBar),
+                            pixDrawable,
+                            GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
+                            NULL,
+@@ -2999,118 +3131,6 @@
  	return bRet;
  }
  
@@ -1329,7 +2256,43 @@
  static Rectangle NWGetToolbarRect(  int nScreen,
                                      ControlType,
  									ControlPart				nPart,
-@@ -3737,7 +3725,7 @@
+@@ -3136,13 +3156,13 @@
+         NWEnsureGTKToolbar( nScreen );
+         
+         gint nMinWidth =
+-            2*gWidgetData[nScreen].gToolbarButtonWidget->style->xthickness
++            2*gtk_widget_get_style(gWidgetData[nScreen].gToolbarButtonWidget)->xthickness
+             + 1 // CHILD_SPACING constant, found in gtk_button.c
+-            + 3*gWidgetData[nScreen].gToolbarButtonWidget->style->xthickness; // Murphy factor
++            + 3*gtk_widget_get_style(gWidgetData[nScreen].gToolbarButtonWidget)->xthickness; // Murphy factor
+         gint nMinHeight =
+-            2*gWidgetData[nScreen].gToolbarButtonWidget->style->ythickness
++            2*gtk_widget_get_style(gWidgetData[nScreen].gToolbarButtonWidget)->ythickness
+             + 1 // CHILD_SPACING constant, found in gtk_button.c
+-            + 3*gWidgetData[nScreen].gToolbarButtonWidget->style->ythickness; // Murphy factor                          
++            + 3*gtk_widget_get_style(gWidgetData[nScreen].gToolbarButtonWidget)->ythickness; // Murphy factor                          
+         
+         gtk_widget_ensure_style( gWidgetData[nScreen].gToolbarButtonWidget );
+         if( aAreaRect.GetWidth() < nMinWidth )
+@@ -3630,7 +3650,7 @@
+ 	// Set to default state, then build up from there
+ 	GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_DEFAULT );
+ 	GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_FOCUS );
+-	GTK_WIDGET_UNSET_FLAGS( widget, GTK_SENSITIVE );
++	gtk_widget_set_sensitive( widget, false );
+ 	GTK_WIDGET_SET_FLAGS( widget, gWidgetDefaultFlags[(long)widget] );
+ 
+ 	if ( nState & CTRL_STATE_DEFAULT )
+@@ -3638,7 +3658,7 @@
+ 	if ( !GTK_IS_TOGGLE_BUTTON(widget) && (nState & CTRL_STATE_FOCUSED) )
+ 		GTK_WIDGET_SET_FLAGS( widget, GTK_HAS_FOCUS );
+ 	if ( nState & CTRL_STATE_ENABLED )
+-		GTK_WIDGET_SET_FLAGS( widget, GTK_SENSITIVE );
++		gtk_widget_set_sensitive( widget, true );
+ 	gtk_widget_set_state( widget, nGtkState );
+ }
+ 
+@@ -3737,7 +3757,7 @@
  		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gDropdownWidget, nScreen );
  		gWidgetData[nScreen].gArrowWidget = gtk_arrow_new( GTK_ARROW_DOWN, GTK_SHADOW_OUT );
  		gtk_container_add( GTK_CONTAINER(gWidgetData[nScreen].gDropdownWidget), gWidgetData[nScreen].gArrowWidget );
@@ -1338,7 +2301,7 @@
  		gtk_widget_realize( gWidgetData[nScreen].gArrowWidget );
  	}
  }
-@@ -3783,32 +3771,132 @@
+@@ -3783,32 +3803,132 @@
  
  //-------------------------------------
  
@@ -1403,7 +2366,7 @@
 +        if (gWidgetData[nScreen].gComboBoxEntry_ButtonWidget)
 +        {
 +            //Dig around for the arrow
-+            GtkWidget *child = GTK_BIN(gWidgetData[nScreen].gComboBoxEntry_ButtonWidget)->child;
++            GtkWidget *child = gtk_bin_get_child(GTK_BIN(gWidgetData[nScreen].gComboBoxEntry_ButtonWidget));
 +            if (GTK_IS_HBOX(child))
 +            {
 +                gtk_container_forall(GTK_CONTAINER(child), get_combo_box_entry_arrow,
@@ -1448,14 +2411,14 @@
 +    if ( !gWidgetData[nScreen].gComboBoxWidget )
 +    {
 +        gWidgetData[nScreen].gComboBoxWidget = gtk_combo_box_new();
-+
-+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboBoxWidget, nScreen );
  
 -		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboWidget, nScreen );
 -		// Must realize the ComboBox's children, since GTK
 -		// does not do this for us in GtkCombo::gtk_widget_realize()
 -		gtk_widget_realize( GTK_COMBO(gWidgetData[nScreen].gComboWidget)->button );
 -		gtk_widget_realize( GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry );
++        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboBoxWidget, nScreen );
++
 +        gtk_container_forall(GTK_CONTAINER(gWidgetData[nScreen].gComboBoxWidget),
 +            get_combo_box_inner_widgets, GINT_TO_POINTER(nScreen) );
 +
@@ -1464,7 +2427,7 @@
 +        if (gWidgetData[nScreen].gComboBox_ButtonWidget)
 +        {
 +            //Dig around for the arrow
-+            GtkWidget *child = GTK_BIN(gWidgetData[nScreen].gComboBox_ButtonWidget)->child;
++            GtkWidget *child = gtk_bin_get_child(GTK_BIN(gWidgetData[nScreen].gComboBox_ButtonWidget));
 +            if (GTK_IS_HBOX(child))
 +            {
 +                gtk_container_forall(GTK_CONTAINER(child), get_combo_box_inner_widgets,
@@ -1487,9 +2450,73 @@
  	}
  }
  
-@@ -3951,3 +4039,5 @@
+@@ -3844,13 +3964,13 @@
+                               (char *)NULL);
+                               
+         gtk_button_set_relief( GTK_BUTTON(gWidgetData[nScreen].gToolbarButtonWidget), aRelief );
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarButtonWidget, GTK_CAN_FOCUS );
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarButtonWidget, GTK_CAN_DEFAULT );
++        widget_set_can_focus( gWidgetData[nScreen].gToolbarButtonWidget, false );
++        widget_set_can_default( gWidgetData[nScreen].gToolbarButtonWidget, false );
+         NWAddWidgetToCacheWindow( gWidgetData[nScreen].gToolbarButtonWidget, nScreen );
+ 
+         gtk_button_set_relief( GTK_BUTTON(gWidgetData[nScreen].gToolbarToggleWidget), aRelief );
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarToggleWidget, GTK_CAN_FOCUS );
+-        GTK_WIDGET_UNSET_FLAGS( gWidgetData[nScreen].gToolbarToggleWidget, GTK_CAN_DEFAULT );
++        widget_set_can_focus( gWidgetData[nScreen].gToolbarToggleWidget, false );
++        widget_set_can_default( gWidgetData[nScreen].gToolbarToggleWidget, false );
+         NWAddWidgetToCacheWindow( gWidgetData[nScreen].gToolbarToggleWidget, nScreen );        
+     }
+     if( ! gWidgetData[nScreen].gHandleBoxWidget )
+@@ -3951,3 +4071,5 @@
  		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
      }
  }
 +
 +/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+--- vcl.orig/unx/gtk/window/gtkobject.cxx	2010-05-26 17:30:44.000000000 +0100
++++ vcl/unx/gtk/window/gtkobject.cxx	2010-07-01 10:45:41.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include <plugins/gtk/gtkframe.hxx>
+ #include <plugins/gtk/gtkdata.hxx>
+ #include <plugins/gtk/gtkinst.hxx>
++#include <plugins/gtk/gtkgdi.hxx>
+ 
+ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow ) 
+         : m_pSocket( NULL ),
+@@ -58,7 +59,7 @@
+         SalDisplay* pDisp = GetX11SalData()->GetDisplay();
+         m_aSystemData.nSize 		= sizeof( SystemChildData );
+         m_aSystemData.pDisplay		= pDisp->GetDisplay();
+-        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pSocket->window);
++        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pSocket));
+         m_aSystemData.pSalFrame		= NULL;
+         m_aSystemData.pWidget		= m_pSocket;
+         m_aSystemData.pVisual		= pDisp->GetVisual(pParent->getScreenNumber()).GetVisual();
+@@ -66,7 +67,7 @@
+         m_aSystemData.nDepth		= pDisp->GetVisual(pParent->getScreenNumber()).GetDepth();
+         m_aSystemData.aColormap		= pDisp->GetColormap(pParent->getScreenNumber()).GetXColormap();
+         m_aSystemData.pAppContext	= NULL;
+-        m_aSystemData.aShellWindow	= GDK_WINDOW_XWINDOW(GTK_WIDGET(pParent->getWindow())->window);
++        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 );
+@@ -101,7 +102,7 @@
+ void GtkSalObject::ResetClipRegion()
+ {
+     if( m_pSocket )
+-        gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
++        gdk_window_shape_combine_region( widget_get_window(m_pSocket), NULL, 0, 0 );
+ }
+ 
+ USHORT GtkSalObject::GetClipRegionType()
+@@ -130,7 +131,7 @@
+ void GtkSalObject::EndSetClipRegion()
+ {
+     if( m_pSocket )
+-        gdk_window_shape_combine_region( m_pSocket->window, m_pRegion, 0, 0 );
++        gdk_window_shape_combine_region( widget_get_window(m_pSocket), m_pRegion, 0, 0 );
+ }
+ 
+ void GtkSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )



More information about the scm-commits mailing list