[Libreoffice-commits] .: vcl/inc vcl/unx

2012-11-15 Thread Libreoffice Gerrit user
 vcl/inc/unx/gtk/gtkframe.hxx|3 ++-
 vcl/inc/unx/gtk/gtksalmenu.hxx  |6 +++---
 vcl/unx/gtk/window/gtkframe.cxx |9 +
 3 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 67582fd2e3180fde45c11e85f8c3eb5e20ef8bc0
Author: Michael Meeks michael.me...@suse.com
Date:   Thu Nov 15 20:08:12 2012 +

glib / dbus version checks strangely ommitted from the merge.

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 72b9119..3613cf5 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -213,7 +213,8 @@ class GtkSalFrame : public SalFrame
 #endif
 
 SalMenu*m_pSalMenu;
-#ifdef ENABLE_DBUS
+
+#if defined(ENABLE_DBUS)  defined(ENABLE_GIO)
 friend void ensure_dbus_setup(GdkWindow* gdkWindow, GtkSalFrame* 
pSalFrame);
 friend void on_registrar_available (GDBusConnection*, const gchar*, const 
gchar*, gpointer);
 friend void on_registrar_unavailable (GDBusConnection*, const gchar*, 
gpointer);
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index a5c9973..7c16bb6 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -17,16 +17,16 @@
 #include unx/gtk/gtkframe.hxx
 
 #if defined(ENABLE_DBUS)  defined(ENABLE_GIO)
-#  ifdef GLIB_AVAILABLE_IN_2_32
+#  if GLIB_MAJOR_VERSION  2  GLIB_MINOR_VERSION = 32
 #define ENABLE_GMENU_INTEGRATION
 #  endif
 #  include unx/gtk/glomenu.h
 #  include unx/gtk/gloactiongroup.h
 #else
-#  ifndef GLIB_AVAILABLE_IN_2_32
+#  if GLIB_MAJOR_VERSION  2  GLIB_MINOR_VERSION = 32
  typedef void GMenuModel;
 #  endif
-#  if !GLIB_CHECK_VERSION(2,28,0)
+#  if GLIB_MAJOR_VERSION  2  GLIB_MINOR_VERSION = 28
  typedef void GActionGroup;
 #  endif
 #endif
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 88ac7f2..5736413 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -481,12 +481,14 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
 Init( pSysData );
 }
 
-#if !GTK_CHECK_VERSION(3,0,0)  defined(ENABLE_DBUS)  defined(ENABLE_GIO)
+#ifdef ENABLE_GMENU_INTEGRATION
+
 static void
 gdk_x11_window_set_utf8_property  (GdkWindow *window,
const gchar *name,
const gchar *value)
 {
+#if !GTK_CHECK_VERSION(3,0,0)
   GdkDisplay* display = gdk_window_get_display (window);
 
   if (value != NULL)
@@ -503,12 +505,11 @@ gdk_x11_window_set_utf8_property  (GdkWindow *window,
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, name));
 }
-}
 #endif
+}
 
 // AppMenu watch functions.
 
-#ifdef ENABLE_GMENU_INTEGRATION
 static void ObjectDestroyedNotify( gpointer data )
 {
 if ( data ) {
@@ -1135,7 +1136,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong 
nStyle )
 #if !GTK_CHECK_VERSION(3,0,0)
 if( eWinType == GTK_WINDOW_TOPLEVEL )
 {
-#if defined(ENABLE_DBUS)  defined(ENABLE_GIO)
+#ifdef ENABLE_GMENU_INTEGRATION
 // Enable DBus native menu if available.
 ensure_dbus_setup( this );
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2012-11-14 Thread Libreoffice Gerrit user
 vcl/inc/unx/gtk/gloactiongroup.h  |   21 -
 vcl/inc/unx/gtk/glomenu.h |   21 -
 vcl/inc/unx/gtk/gtksalmenu.hxx|   22 --
 vcl/inc/unx/gtk/hudawareness.h|   22 +-
 vcl/unx/gtk/window/gloactiongroup.cxx |   22 --
 vcl/unx/gtk/window/glomenu.cxx|   22 --
 vcl/unx/gtk/window/gtksalmenu.cxx |   21 -
 vcl/unx/gtk/window/hudawareness.cxx   |   23 ++-
 8 files changed, 35 insertions(+), 139 deletions(-)

New commits:
commit a857cd94f558e9215f48601197939356ed774faf
Author: Bjoern Michaelsen bjoern.michael...@canonical.com
Date:   Wed Nov 14 14:09:25 2012 +0100

update license header for Canonical contribution

Change-Id: I5bb1b92929686ced48415c4d0198fa3fa2f2f0e3

diff --git a/vcl/inc/unx/gtk/gloactiongroup.h b/vcl/inc/unx/gtk/gloactiongroup.h
index 61ec718..fb05d43 100644
--- a/vcl/inc/unx/gtk/gloactiongroup.h
+++ b/vcl/inc/unx/gtk/gloactiongroup.h
@@ -1,24 +1,11 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
 /*
- * Copyright © 2011 Canonical Ltd.
+ * This file is part of the LibreOffice project.
  *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- *
- * Author: Antonio Fernández antonio.fernan...@aentos.es
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 #ifndef GLOACTIONGROUP_H
diff --git a/vcl/inc/unx/gtk/glomenu.h b/vcl/inc/unx/gtk/glomenu.h
index a1a615b..f74af4b 100644
--- a/vcl/inc/unx/gtk/glomenu.h
+++ b/vcl/inc/unx/gtk/glomenu.h
@@ -1,24 +1,11 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
 /*
- * Copyright © 2011 Canonical Ltd.
+ * This file is part of the LibreOffice project.
  *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- *
- * Author: Antonio Fernández antonio.fernan...@aentos.es
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 #ifndef __G_LO_MENU_H__
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 03aa700..822d3a1 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -1,24 +1,10 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
 /*
- * Copyright © 2011 Canonical Ltd.
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
+ * This file is part of the LibreOffice project.
  *
- * Author: Antonio Fernández antonio.fernan...@aentos.es
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * 

[Libreoffice-commits] .: vcl/inc vcl/unx

2012-09-20 Thread Libreoffice Gerrit user
 vcl/inc/cupsmgr.hxx |2 +-
 vcl/unx/generic/printer/cupsmgr.cxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 8e1e27ae6d0751097d276eb3394b57af123e09f3
Author: Michael Meeks michael.me...@suse.com
Date:   Thu Sep 20 12:00:11 2012 +0100

cups: initialize thread running member

Change-Id: Idf8b079857638558075fa6b1fb5f7ea6b3c9f632

diff --git a/vcl/inc/cupsmgr.hxx b/vcl/inc/cupsmgr.hxx
index f3cee19..d2ae11d 100644
--- a/vcl/inc/cupsmgr.hxx
+++ b/vcl/inc/cupsmgr.hxx
@@ -47,7 +47,7 @@ struct FPtrHash
 
 class CUPSManager : public PrinterInfoManager
 {
-boost::unordered_map FILE*, rtl::OString, FPtrHash
m_aSpoolFiles;
+boost::unordered_map FILE*, rtl::OString, FPtrHashm_aSpoolFiles;
 int m_nDests;
 void*   m_pDests;
 boolm_bNewDests;
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index f13b774..616385e 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -193,7 +193,8 @@ CUPSManager::CUPSManager() :
 PrinterInfoManager( CUPS ),
 m_nDests( 0 ),
 m_pDests( NULL ),
-m_bNewDests( false )
+m_bNewDests( false ),
+m_bPPDThreadRunning( false )
 {
 m_aDestThread = osl_createThread( run_dest_thread_stub, this );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2012-09-12 Thread Libreoffice Gerrit user
 vcl/inc/unx/saldata.hxx |2 --
 vcl/unx/generic/app/saldata.cxx |3 ---
 2 files changed, 5 deletions(-)

New commits:
commit dbb77c1448e58ee42fade4fa2f4d478a9ac91f1c
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 12 12:31:00 2012 +0100

remove unused hMainThread_

Change-Id: Iea56d7f1b4d3133067e321a033df81378be2817a

diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index 3748231..6b1ec99 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -71,7 +71,6 @@ class VCLPLUG_GEN_PUBLIC X11SalData : public SalGenericData
 
 protected:
 SalXLib  *pXLib_;
-pthread_t hMainThread_;
 
 public:
  X11SalData( SalGenericDataType t, SalInstance *pInstance );
@@ -87,7 +86,6 @@ public:
 voidDeleteDisplay(); // for shutdown
 
 inline  SalXLib*GetLib() const { return pXLib_; }
-inline  pthread_t   GetMainThread() const { return hMainThread_; }
 
 voidStartTimer( sal_uLong nMS );
 inline  voidStopTimer();
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index c0fcf87..1fb6a7a 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -229,7 +229,6 @@ static const char* XRequest[] = {
 
 // -=-= SalData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include pthread.h
 
 X11SalData::X11SalData( SalGenericDataType t, SalInstance *pInstance )
 : SalGenericData( t, pInstance )
@@ -237,8 +236,6 @@ X11SalData::X11SalData( SalGenericDataType t, SalInstance 
*pInstance )
 pXLib_  = NULL;
 m_pPlugin   = NULL;
 
-hMainThread_= pthread_self();
-
 m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)XIOErrorHdl 
);
 PushXErrorLevel( !!getenv( SAL_IGNOREXERRORS ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2012-07-27 Thread Michael Meeks
 vcl/inc/unx/gtk/gtkframe.hxx  |1 +
 vcl/unx/gtk/window/gtkframe.cxx   |   20 ++--
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |8 +++-
 3 files changed, 22 insertions(+), 7 deletions(-)

New commits:
commit fae17f307efeebf535d5e389e2e829fbd9dace58
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Jul 27 15:27:46 2012 +0100

gtk3: ensure we re-render native commits

If we blit pixels to the back-buffer, we need to remember to get them
to gtk3 at idle.

Change-Id: Ic37660e963fbbcdd132cfba0ce739174d64148d2

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 50258e0..17d3e12 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -329,6 +329,7 @@ public:
 // only for gtk3 ...
 void pushIgnoreDamage();
 void popIgnoreDamage();
+bool isDuringRender();
 void renderArea( cairo_t *cr, cairo_rectangle_t *src );
 #endif
 virtual ~GtkSalFrame();
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 36be0b2..d45a8f6 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2990,6 +2990,12 @@ void GtkSalFrame::popIgnoreDamage()
 {
 m_nDuringRender--;
 }
+
+bool GtkSalFrame::isDuringRender()
+{
+return m_nDuringRender;
+}
+
 #endif
 
 void GtkSalFrame::damaged (const basegfx::B2IBox rDamageRect)
@@ -2997,27 +3003,29 @@ void GtkSalFrame::damaged (const basegfx::B2IBox 
rDamageRect)
 #if !GTK_CHECK_VERSION(3,0,0)
 (void)rDamageRect;
 #else
-if (m_nDuringRender)
+if ( isDuringRender() )
 return;
 #if OSL_DEBUG_LEVEL  1
 long long area = rDamageRect.getWidth() * rDamageRect.getHeight();
 if( area  32 * 1024 )
-fprintf( stderr, bitmap damaged  %d %d (%dx%d) area %lld\n,
+{
+fprintf( stderr, bitmap damaged  %d %d (%dx%d) area %lld widget\n,
  (int) rDamageRect.getMinX(),
  (int) rDamageRect.getMinY(),
  (int) rDamageRect.getWidth(),
  (int) rDamageRect.getHeight(),
  area );
+}
 #endif
 /* FIXME: this is a dirty hack, to render buttons correctly, we
  * should of course remove the -100 and + 200, but the whole area
  * won't be rendered then.
  */
 gtk_widget_queue_draw_area( m_pWindow,
-rDamageRect.getMinX() - 100,
-rDamageRect.getMinY() - 100,
-rDamageRect.getWidth() + 200,
-rDamageRect.getHeight() + 200 );
+rDamageRect.getMinX() - 1,
+rDamageRect.getMinY() - 1,
+rDamageRect.getWidth() + 2,
+rDamageRect.getHeight() + 2 );
 #endif
 }
 
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 64dc0bc..5e0972f 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -979,7 +979,10 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
 src += nStride;
 cairo_data += cairo_stride;
 }
+if ( !mpFrame-isDuringRender() )
+gtk_widget_queue_draw_area( mpFrame-getWindow(), ax, ay, awidth, 
aheight );
 }
+
 sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, 
ControlPart nPart, const Rectangle rControlRegion, ControlState,
 const ImplControlValue, const 
rtl::OUString,
 Rectangle 
rNativeBoundingRegion, Rectangle rNativeContentRegion )
@@ -1551,6 +1554,7 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY,
long nSrcWidth, long nSrcHeight,
sal_uInt16 nFlags )
 {
+#ifndef DISABLE_CLEVER_COPYAREA
 mpFrame-pushIgnoreDamage();
 SvpSalGraphics::copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, 
nSrcHeight, nFlags );
 mpFrame-popIgnoreDamage();
@@ -1595,10 +1599,12 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY,
 // FIXME: this will queue (duplicate) gtk+ re-rendering for the exposed 
area, c'est la vie
 gdk_window_move_region( gtk_widget_get_window( mpFrame-getWindow() ),
 region, nDestX - nSrcX, nDestY - nSrcY );
-
 print_update_area( gtk_widget_get_window( mpFrame-getWindow() ), after 
copy area );
 cairo_region_destroy( clip_region );
 cairo_region_destroy( region );
+#else
+SvpSalGraphics::copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, 
nSrcHeight, nFlags );
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

[Libreoffice-commits] .: vcl/inc vcl/unx

2012-06-22 Thread Stephan Bergmann
 vcl/inc/unx/sm.hxx |   12 -
 vcl/unx/generic/app/sm.cxx |  472 ++---
 2 files changed, 247 insertions(+), 237 deletions(-)

New commits:
commit 2a5fc950439d484d1227a736bea6566e86e73b7c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Jun 22 15:27:47 2012 +0200

Some further clean-up of X Session Management code

Change-Id: I0cc47b152835d69e90226f42609eabe5291f55f3

diff --git a/vcl/inc/unx/sm.hxx b/vcl/inc/unx/sm.hxx
index 13291d1..d2c56ce 100644
--- a/vcl/inc/unx/sm.hxx
+++ b/vcl/inc/unx/sm.hxx
@@ -32,21 +32,25 @@
 
 #include X11/SM/SMlib.h
 
+#include boost/scoped_ptr.hpp
 #include tools/link.hxx
+
 #include vclpluginapi.h
 
 namespace rtl {
 class OString;
 class OUString;
 }
+class ICEConnectionObserver;
 class SalSession;
 
 class SessionManagerClient
 {
 static SalSession * m_pSession;
-static SmcConn  aSmcConnection;
+static boost::scoped_ptr ICEConnectionObserver  m_pICEConnectionObserver;
+static SmcConn m_pSmcConnection;
 static rtl::OString m_aClientID;
-static bool bDocSaveDone;
+static bool m_bDocSaveDone;
 
 static void SaveYourselfProc(   SmcConn connection,
 SmPointer client_data,
@@ -63,7 +67,7 @@ class SessionManagerClient
 static void InteractProc(   SmcConn connection,
 SmPointer clientData );
 
-static const rtl::OString getPreviousSessionID();
+static rtl::OString getPreviousSessionID();
 
 DECL_STATIC_LINK( SessionManagerClient, ShutDownHdl, void* );
 DECL_STATIC_LINK( SessionManagerClient, ShutDownCancelHdl, void* );
@@ -79,7 +83,7 @@ public:
 static void interactionDone( bool bCancelShutdown );
 
 static rtl::OUString getExecName();
-static VCLPLUG_GEN_PUBLIC const rtl::OString getSessionID();
+static VCLPLUG_GEN_PUBLIC rtl::OString getSessionID();
 };
 
 #endif
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index e0bbdb9..0122038 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -39,7 +39,7 @@
 
 #include rtl/strbuf.hxx
 
-#include osl/process.h
+#include rtl/process.h
 #include osl/security.h
 #include osl/conditn.h
 
@@ -108,58 +108,60 @@ bool IceSalSession::cancelShutdown()
 return false;
 }
 
-extern C void SAL_CALL ICEConnectionWorker( void* );
+extern C void ICEWatchProc(
+IceConn ice_conn, IcePointer client_data, Bool opening,
+IcePointer * watch_data);
+
+extern C void SAL_CALL ICEConnectionWorker(void * data);
 
 class ICEConnectionObserver
 {
-friend void SAL_CALL ICEConnectionWorker(void*);
-static sal_Bool bIsWatching;
-static void ICEWatchProc( IceConn connection, IcePointer client_data,
-  Bool opening, IcePointer* watch_data );
-
-static struct pollfd* pFilehandles;
-static IceConn* pConnections;
-static int nConnections;
-static int nWakeupFiles[2];
-static oslMutex ICEMutex;
-static oslThread ICEThread;
-static IceIOErrorHandler origIOErrorHandler;
-static IceErrorHandler origErrorHandler;
+friend void ICEWatchProc(IceConn, IcePointer, Bool, IcePointer *);
+
+friend void ICEConnectionWorker(void *);
+
+struct pollfd* m_pFilehandles;
+int m_nConnections;
+IceConn* m_pConnections;
+int m_nWakeupFiles[2];
+oslThread m_ICEThread;
+IceIOErrorHandler m_origIOErrorHandler;
+IceErrorHandler m_origErrorHandler;
+
+void wakeup();
+
 public:
+osl::Mutex m_ICEMutex;
 
-static void activate();
-static void deactivate();
-static void lock();
-static void unlock();
-static void wakeup();
-};
+ICEConnectionObserver():
+m_pFilehandles(NULL), m_nConnections(0), m_pConnections(NULL),
+m_ICEThread(NULL)
+{ m_nWakeupFiles[0] = m_nWakeupFiles[1] = 0; }
 
+void activate();
+void deactivate();
+void terminate(oslThread iceThread);
+};
 
-SalSession * SessionManagerClient::m_pSession = 0;
-SmcConn SessionManagerClient::aSmcConnection= NULL;
+SalSession * SessionManagerClient::m_pSession = NULL;
+boost::scoped_ptr ICEConnectionObserver 
+SessionManagerClient::m_pICEConnectionObserver;
+SmcConn SessionManagerClient::m_pSmcConnection = NULL;
 rtl::OString SessionManagerClient::m_aClientID;
-sal_BoolICEConnectionObserver::bIsWatching  = 
sal_False;
-struct pollfd*  ICEConnectionObserver::pFilehandles = NULL;
-IceConn*ICEConnectionObserver::pConnections = NULL;
-int ICEConnectionObserver::nConnections = 0;
-oslMutexICEConnectionObserver::ICEMutex = NULL;
-oslThread   ICEConnectionObserver::ICEThread= NULL;
-int ICEConnectionObserver::nWakeupFiles[2]  = { 0, 0 };
+bool SessionManagerClient::m_bDocSaveDone = false; // HACK
 

[Libreoffice-commits] .: vcl/inc vcl/unx

2012-06-05 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkgdi.hxx   |5 +
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |  110 ++-
 2 files changed, 114 insertions(+), 1 deletion(-)

New commits:
commit 0d314b0158b9d3660973656597d25a1504987b93
Author: Ruslan Kabatsayev b7.10110...@gmail.com
Date:   Sat Jun 2 16:04:51 2012 +0400

GTK theming: implement frame rendering

Change-Id: I7efa167cee05f84c56f554b5c2002e825809

diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index fbdcef1..b4fe837 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -165,6 +165,11 @@ protected:
 GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect );
 sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
 
+sal_Bool NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType nType, 
ControlPart nPart,
+   const Rectangle rControlRectangle,
+   const clipList rClipList,
+   ControlState nState, const ImplControlValue aValue,
+   const OUString rCaption );
 sal_Bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType 
nType, ControlPart nPart,
const Rectangle rControlRectangle,
const clipList rClipList,
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index e9101bf..b21f12c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -45,6 +45,8 @@
 
 #include vcl/vclenum.hxx
 #include vcl/fontmanager.hxx
+#include vcl/decoview.hxx
+
 typedef struct _cairo_font_options cairo_font_options_t;
 const char* const tabPrelitDataName=libreoffice-tab-is-prelit;
 
@@ -243,6 +245,8 @@ static Rectangle NWGetToolbarRect( SalX11Screen nScreen,
ControlState nState,
const ImplControlValue aValue,
const OUString rCaption );
+
+static int getFrameWidth(GtkWidget* widget);
 //---
 
 static Rectangle NWGetScrollButtonRect(SalX11Screen nScreen, ControlPart 
nPart, Rectangle aAreaRect );
@@ -581,6 +585,7 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( 
ControlType nType, ControlPar
 return true;
 break;
 
+case CTRL_FRAME:
 case CTRL_WINDOW_BACKGROUND:
 return true;
 
@@ -768,7 +773,6 @@ sal_Bool GtkSalGraphics::drawNativeControl(ControlType 
nType,
 // get a GC with current clipping region set
 GetFontGC();
 
-
 // theme changed ?
 if( GtkSalGraphics::bThemeChanged )
 {
@@ -918,6 +922,11 @@ sal_Bool GtkSalGraphics::drawNativeControl(ControlType 
nType,
 returnVal = NWPaintGTKWindowBackground( gdkDrawable, nType, nPart, 
aCtrlRect, aClip, nState, aValue, rCaption );
 }
 
+if(nType==CTRL_FRAME)
+{
+returnVal = NWPaintGTKFrame( gdkDrawable, nType, nPart, aCtrlRect, 
aClip, nState, aValue, rCaption);
+}
+
 if( pixmap )
 {
 returnVal = NWRenderPixmapToScreen( pixmap, aPixmapRect )  returnVal;
@@ -1144,6 +1153,33 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 rNativeBoundingRegion = rNativeContentRegion = aRect;
 returnVal = sal_True;
 }
+if( nType == CTRL_FRAME  nPart == PART_BORDER )
+{
+int frameWidth = getFrameWidth(m_pWindow);
+rNativeBoundingRegion = rControlRegion;
+sal_uInt16 nStyle = aValue.getNumericVal();
+int x1=rControlRegion.Left();
+int y1=rControlRegion.Top();
+int x2=rControlRegion.Right();
+int y2=rControlRegion.Bottom();
+
+if( nStyle  FRAME_DRAW_NODRAW )
+{
+if( (nStyle  FRAME_DRAW_TOPBOTTOM) == FRAME_DRAW_TOPBOTTOM )
+rNativeContentRegion = Rectangle(x1,
+ y1+frameWidth,
+ x2,
+ y2-frameWidth);
+else
+rNativeContentRegion = Rectangle(x1+frameWidth,
+ y1+frameWidth,
+ x2-frameWidth,
+ y2-frameWidth);
+}
+else
+rNativeContentRegion = rControlRegion;
+returnVal=true;
+}
 
 return( returnVal );
 }
@@ -1151,6 +1187,73 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 /
  * Individual control drawing functions
  /
+sal_Bool GtkSalGraphics::NWPaintGTKFrame(
+GdkDrawable* gdkDrawable,
+ControlType, ControlPart,
+const Rectangle rControlRectangle,
+

[Libreoffice-commits] .: vcl/inc vcl/unx

2012-05-31 Thread Michael Meeks
 vcl/inc/unx/gtk/gtkgdi.hxx   |5 +
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |   30 +-
 2 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 7b52e6b9b1c42ccd9ff5a6adbc3b62622d31ca75
Author: Ruslan Kabatsayev b7.10110...@gmail.com
Date:   Mon May 28 02:28:49 2012 +0400

GTK theming: implement rendering window background

Change-Id: I34c6c38f383fce54aa0b2a61a5e88ee9a8cff4e7

diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index bdc397e..fbdcef1 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -165,6 +165,11 @@ protected:
 GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect );
 sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
 
+sal_Bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType 
nType, ControlPart nPart,
+   const Rectangle rControlRectangle,
+   const clipList rClipList,
+   ControlState nState, const ImplControlValue aValue,
+   const OUString rCaption );
 sal_Bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* 
gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle rControlRectangle,
const clipList rClipList,
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index d65d635..f9781ab 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -614,7 +614,8 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( 
ControlType nType, ControlPar
 (   (nPart == PART_TRACK_HORZ_AREA)
 ||  (nPart == PART_TRACK_VERT_AREA)
 )
-)
+) ||
+(nType == CTRL_WINDOW_BACKGROUND)
 )
 return( sal_True );
 return( sal_False );
@@ -898,6 +899,10 @@ sal_Bool GtkSalGraphics::drawNativeControl(ControlType 
nType,
 {
 returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, 
aClip, nState, aValue, rCaption );
 }
+else if( nType == CTRL_WINDOW_BACKGROUND )
+{
+returnVal = NWPaintGTKWindowBackground( gdkDrawable, nType, nPart, 
aCtrlRect, aClip, nState, aValue, rCaption );
+}
 
 if( pixmap )
 {
@@ -1132,6 +1137,29 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 /
  * Individual control drawing functions
  /
+sal_Bool GtkSalGraphics::NWPaintGTKWindowBackground(
+GdkDrawable* gdkDrawable,
+ControlType, ControlPart,
+const Rectangle rControlRectangle,
+const clipList rClipList,
+ControlState nState, const ImplControlValue,
+const OUString )
+{
+int w,h;
+gtk_window_get_size(GTK_WINDOW(m_pWindow),w,h);
+GdkRectangle clipRect;
+for( clipList::const_iterator it = rClipList.begin(); it != 
rClipList.end(); ++it )
+{
+clipRect.x = it-Left();
+clipRect.y = it-Top();
+clipRect.width = it-GetWidth();
+clipRect.height = it-GetHeight();
+
+
gtk_paint_flat_box(m_pWindow-style,gdkDrawable,GTK_STATE_NORMAL,GTK_SHADOW_NONE,clipRect,m_pWindow,base,0,0,w,h);
+}
+
+return sal_True;
+}
 
 sal_Bool GtkSalGraphics::NWPaintGTKButtonReal(
 GtkWidget* button,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2012-01-27 Thread Thomas Arnhold
 vcl/inc/unx/saldisp.hxx |   11 -
 vcl/unx/generic/app/keysymnames.cxx |  364 
 vcl/unx/generic/app/saldisp.cxx |   17 -
 3 files changed, 7 insertions(+), 385 deletions(-)

New commits:
commit 2233aa52da14ec85331aee1163b885fe9a9fb507
Author: Thomas Arnhold tho...@arnhold.org
Date:   Thu Jan 26 11:00:31 2012 +0100

keysymnames: get rid of some insanity

getKeysymReplacementName() returned a translated keyname, now
XKeysymToString() is called directly. This change had no negative
effect to me. I tried it with a fixed string as return value for
getKeysymReplacementName() on a german interface. INSRT is still
translated to EINFG as this is done by po files.

diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 94b66dc..3e4eb4e 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -470,17 +470,6 @@ public:
 voidSetupInput( SalI18N_InputMethod *pInputMethod );
 };
 
-/*--
- keep track of correct size of the initial window
- */
-// get foreign key names
-namespace vcl_sal {
-rtl::OUString getKeysymReplacementName(
-const char* pKeyboard,
-KeySym nSymbol );
-}
-
-
 #endif // _SV_SALDISP_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 4569091..ce6a7e7 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -64,370 +64,6 @@
 
 #include string.h
 
-namespace vcl_sal {
-
-struct KeysymNameReplacement
-{
-KeySym  aSymbol;
-const char* pName;
-};
-
-struct KeyboardReplacements
-{
-const char* pKeyboardName;
-const KeysymNameReplacement*pReplacements;
-int nReplacements;
-};
-
-// 
-//
-// CAUTION CAUTION CAUTION
-// every string value in the replacements tables must be in UTF8
-// be careful with your editor !
-//
-// 
-
-static const struct KeysymNameReplacement aImplReplacements_English[] =
-{
-{ XK_Control_L, Ctrl },
-{ XK_Control_R, Ctrl },
-{ XK_Escape, Esc },
-{ XK_space, Space },
-};
-
-static const struct KeysymNameReplacement aImplReplacements_Turkish[] =
-{
-{ XK_Control_L, Ctrl },
-{ XK_Control_R, Ctrl },
-{ XK_Right, Sağ },
-{ XK_Left, Sol },
-{ XK_Up, Yukarı },
-{ XK_Down, Aşağı },
-{ XK_space, Boşluk }
-};
-
-static const struct KeysymNameReplacement aImplReplacements_Russian[] =
-{
-{ XK_Right, Вправо },
-{ XK_Left, Влево },
-{ XK_Up, Вверх },
-{ XK_Down, Вниз },
-{ XK_space, Пробел }
-};
-
-static const struct KeysymNameReplacement aImplReplacements_German[] =
-{
-{ XK_Control_L, Strg },
-{ XK_Control_R, Strg },
-{ XK_Shift_L, Umschalt },
-{ XK_Shift_R, Umschalt },
-{ XK_Alt_L, Alt },
-{ XK_Alt_R, Alt Gr },
-{ XK_Page_Up, Bild auf },
-{ XK_Page_Down, Bild ab },
-{ XK_End, Ende },
-{ XK_Home, Pos 1 },
-{ XK_Insert, Einfg },
-{ XK_Delete, Entf },
-{ XK_Escape, Esc },
-{ XK_Right, Rechts },
-{ XK_Left, Links },
-{ XK_Up, Oben },
-{ XK_Down, Unten },
-{ XK_BackSpace, Rückschritt },
-{ XK_Return, Eingabe },
-{ XK_slash, Schrägstrich },
-{ XK_space, Leertaste },
-{ SunXK_Stop,  Stop },
-{ SunXK_Again, Wiederholen },
-{ SunXK_Props, Eigenschaften },
-{ SunXK_Undo,  Zurücknehmen },
-{ SunXK_Front, Vordergrund },
-{ SunXK_Copy,  Kopieren },
-{ SunXK_Open,  Öffnen },
-{ SunXK_Paste, Einsetzen },
-{ SunXK_Find,  Suchen },
-{ SunXK_Cut,   Ausschneiden },
-};
-
-static const struct KeysymNameReplacement aImplReplacements_French[] =
-{
-{ XK_Shift_L, Maj },
-{ XK_Shift_R, Maj },
-{ XK_Page_Up, Pg. Préc },
-{ XK_Page_Down, Pg. Suiv },
-{ XK_End, Fin },
-{ XK_Home, Origine },
-{ XK_Insert, Insérer },
-{ XK_Delete, Suppr },
-{ XK_Escape, Esc },
-{ XK_Right, Droite },
-{ XK_Left, Gauche },
-{ XK_Up, Haut },
-{ XK_Down, Bas },
-{ XK_BackSpace, Ret. Arr },
-{ XK_Return, Retour },
-{ XK_KP_Enter, Entrée },
-{ SunXK_Stop,  Stop },
-{ SunXK_Again, Encore },
-{ SunXK_Props, Props },
-{ SunXK_Undo,  Annuler },
-{ SunXK_Front, Devant },
-{ SunXK_Copy,  Copy },
-  

[Libreoffice-commits] .: vcl/inc vcl/unx

2012-01-16 Thread Caolán McNamara
 vcl/inc/unx/saldisp.hxx |2 +-
 vcl/unx/generic/app/saldisp.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b0f254fa1e1cb916fa21234603578de701f75e83
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jan 16 10:30:36 2012 +

WaE: getXScreen is an unsigned int now

diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 984726d..ea7dfa7 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -375,7 +375,7 @@ public:
 virtual ScreenData   *initScreen( SalX11Screen nXScreen ) const;
 const ScreenData getDataForScreen( SalX11Screen nXScreen ) const
 {
-if( nXScreen.getXScreen() = static_castint(m_aScreens.size()) )
+if( nXScreen.getXScreen() = static_castunsigned 
int(m_aScreens.size()) )
 return m_aInvalidScreenData;
 if( ! m_aScreens[nXScreen.getXScreen()].m_bInit )
 initScreen( nXScreen );
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index c3d5f79..f361961 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -525,7 +525,7 @@ void SalX11Display::PostUserEvent()
 SalDisplay::ScreenData *
 SalDisplay::initScreen( SalX11Screen nXScreen ) const
 {
-if( nXScreen.getXScreen() = static_castint(m_aScreens.size()) )
+if( nXScreen.getXScreen() = static_castunsigned int(m_aScreens.size()) )
 nXScreen = m_nXDefaultScreen;
 ScreenData* pSD = const_castScreenData 
*(m_aScreens[nXScreen.getXScreen()]);
 if( pSD-m_bInit )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2011-11-02 Thread David Tardon
 vcl/inc/unx/salunx.h|3 ---
 vcl/unx/generic/app/saldata.cxx |2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b2e0b5f3f5b9a4c6b8483e6fb9855054c84aab92
Author: David Tardon dtar...@redhat.com
Date:   Wed Nov 2 14:55:17 2011 +0100

use SAL_N_ELEMENTS

diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index e4150f0..5082519 100644
--- a/vcl/inc/unx/salunx.h
+++ b/vcl/inc/unx/salunx.h
@@ -33,9 +33,6 @@
 #include unx/svunx.h
 #include unx/salstd.hxx
 
-// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define capacityof(a)   (sizeof(a)/sizeof(*a))
-
 // -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 inline long Divide( long nDividend, long nDivisor )
 { return (nDividend + nDivisor/2) / nDivisor; }
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 8eb6602..3f88f35 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -513,7 +513,7 @@ static void PrintXError( Display *pDisplay, XErrorEvent 
*pEvent )
 XGetErrorText( pDisplay, pEvent-error_code, msg, sizeof( msg ) );
 #endif
 std::fprintf( stderr, X-Error: %s\n, msg );
-if( pEvent-request_code  capacityof( XRequest ) )
+if( pEvent-request_code  SAL_N_ELEMENTS( XRequest ) )
 {
 const char* pName = XRequest[pEvent-request_code];
 if( !pName )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/unx

2011-11-02 Thread Michael Meeks
 vcl/inc/unx/gtk/gtkgdi.hxx|   17 
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |  949 --
 2 files changed, 772 insertions(+), 194 deletions(-)

New commits:
commit 625afed7a89732decb068a12bb526fb406cd2c7f
Author: Cosimo Cecchi cosi...@gnome.org
Date:   Wed Nov 2 12:02:09 2011 -0400

gtk3: improve the GTK3 theming layer somewhat

Improvements include:
- don't create widgets when calculating the native region size, but use
  GtkStyleContext instead
- refactor the native control drawing cycle
- theme scrollbars
- theme menu radios/checks/separators/arrows

diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 4604751..cbf2500 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -72,10 +72,21 @@ private:
 static GtkStyleContext *mpToolbarStyle;
 static GtkStyleContext *mpToolButtonStyle;
 static GtkStyleContext *mpCheckButtonStyle;
-void renderAreaToPix( cairo_t* cr, cairo_rectangle_t* rect );
-void drawStyleContext( GtkStyleContext* style, GtkStateFlags flags,
-const Rectangle rControlRegion, bool render_background = true );
+static GtkStyleContext *mpMenuBarStyle;
+static GtkStyleContext *mpMenuBarItemStyle;
+static GtkStyleContext *mpMenuStyle;
+static GtkStyleContext *mpMenuItemStyle;
+static GtkStyleContext *mpTooltipStyle;
+
+void renderAreaToPix( cairo_t* cr, cairo_rectangle_int_t *region );
 void getStyleContext( GtkStyleContext** style, GtkWidget* widget );
+Rectangle NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect );
+void PaintScrollbar(GtkStyleContext *context,
+cairo_t *cr,
+const Rectangle rControlRectangle,
+ControlPart nPart,
+const ImplControlValue aValue );
+
 static bool style_loaded;
 };
 
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index fb88bc4..b9100f0 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -40,6 +40,11 @@ GtkStyleContext* GtkSalGraphics::mpScrollbarStyle = NULL;
 GtkStyleContext* GtkSalGraphics::mpToolbarStyle = NULL;
 GtkStyleContext* GtkSalGraphics::mpToolButtonStyle = NULL;
 GtkStyleContext* GtkSalGraphics::mpCheckButtonStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpMenuStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpMenuItemStyle = NULL;
+
 bool GtkSalGraphics::style_loaded = false;
 /
  * State conversion
@@ -48,99 +53,412 @@ static void NWConvertVCLStateToGTKState( ControlState 
nVCLState,
 GtkStateFlags* nGTKState, GtkShadowType* nGTKShadow )
 {
 *nGTKShadow = GTK_SHADOW_OUT;
-*nGTKState = GTK_STATE_FLAG_INSENSITIVE;
+*nGTKState = GTK_STATE_FLAG_NORMAL;
+
+if (!( nVCLState  CTRL_STATE_ENABLED ))
+*nGTKState = GTK_STATE_FLAG_INSENSITIVE;
+
+if ( nVCLState  CTRL_STATE_PRESSED )
+{
+*nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_ACTIVE);
+*nGTKShadow = GTK_SHADOW_IN;
+}
+
+if ( nVCLState  CTRL_STATE_ROLLOVER )
+*nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_PRELIGHT);
+
+if ( nVCLState  CTRL_STATE_SELECTED )
+*nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_SELECTED);
+
+if ( nVCLState  CTRL_STATE_FOCUSED )
+*nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_FOCUSED);
+}
+
+enum {
+RENDER_BACKGROUND_AND_FRAME = 1,
+RENDER_CHECK = 2,
+RENDER_BACKGROUND = 3,
+RENDER_LINE = 4,
+RENDER_ARROW = 5,
+RENDER_RADIO = 6,
+RENDER_SCROLLBAR = 7,
+};
+
+static void NWCalcArrowRect( const Rectangle rButton, Rectangle rArrow )
+{
+// Size the arrow appropriately
+Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 );
+rArrow.SetSize( aSize );
+
+rArrow.SetPos( Point(
+rButton.Left() + ( rButton.GetWidth()  - rArrow.GetWidth()  ) / 2,
+rButton.Top() + ( rButton.GetHeight() - rArrow.GetHeight() ) / 2
+) );
+}
+
+Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle 
aAreaRect )
+{
+gint slider_width;
+gint stepper_size;
+gint stepper_spacing;
+gint trough_border;
 
-if ( nVCLState  CTRL_STATE_ENABLED )
+// Grab some button style attributes
+gtk_style_context_get_style( mpScrollbarStyle,
+ slider-width, slider_width,
+ stepper-size, stepper_size,
+ trough-border, trough_border,
+ stepper-spacing, stepper_spacing, (char 
*)NULL );
+  
+gboolean has_forward;
+gboolean