[Libreoffice-commits] .: Branch 'feature/gtk3' - vcl/unx

Michael Meeks michael at kemper.freedesktop.org
Fri Oct 7 03:29:00 PDT 2011


 vcl/unx/generic/gdi/salbmp.cxx    |    1 -
 vcl/unx/generic/window/salobj.cxx |    1 -
 vcl/unx/gtk/app/gtkdata.cxx       |   18 +++++++++++++-----
 vcl/unx/gtk/app/gtkinst.cxx       |    2 ++
 vcl/unx/gtk/window/gtkframe.cxx   |   37 ++++++++++++++++++++++++++++++-------
 5 files changed, 45 insertions(+), 14 deletions(-)

New commits:
commit ab5fe885321d0be4267a6772b91d04bede948e43
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Oct 7 11:29:18 2011 +0100

    WaE: cleanup misc. redundant warnings, and silence the gtk2 case

diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index d0201e3..44c1a71 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -218,7 +218,6 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
     if( aDrawable && nWidth && nHeight && nDrawableDepth )
     {
         SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
-        SalXLib*    pXLib = pSalDisp->GetXLib();
         Display*    pXDisp = pSalDisp->GetDisplay();
 
         // do not die on XError here
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index da09378..5ad6c40 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -273,7 +273,6 @@ X11SalObject::~X11SalObject()
 {
     std::list< SalObject* >& rObjects = GetGenericData()->GetSalDisplay()->getSalObjects();
     rObjects.remove( this );
-    SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
 
     GetGenericData()->ErrorTrapPush();
     if ( maSecondary )
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index f5075a9..4fd338b 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -68,9 +68,9 @@ using namespace vcl_sal;
 
 using ::rtl::OUString;
 
-/***************************************************************************
- * class GtkSalDisplay                                                        *
- ***************************************************************************/
+/***************************************************************
+ * class GtkSalDisplay                                         *
+ ***************************************************************/
 extern "C" {
 GdkFilterReturn call_filterGdkEvent( GdkXEvent* sys_event,
                                      GdkEvent* event,
@@ -126,6 +126,9 @@ void signalKeysChanged( GdkKeymap*, gpointer data )
     GtkSalDisplay* pDisp = (GtkSalDisplay*)data;
 #if !GTK_CHECK_VERSION(3,0,0)
     pDisp->GetKeyboardName(true);
+#else
+    (void)pDisp;
+#warning FIXME: impl. / check signalKeysChanged ...
 #endif
 }
 
@@ -192,6 +195,8 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
 
     return aFilterReturn;
 #else
+    (void) sys_event;
+#warning FIXME: implement filterGdkEvent ...
     return GDK_FILTER_CONTINUE;
 #endif
 }
@@ -202,7 +207,8 @@ void GtkSalDisplay::screenSizeChanged( GdkScreen* pScreen )
     if (pScreen)
         m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, 0 );
 #else
-#warning get this right
+    (void)pScreen;
+#warning FIXME: implement screenSizeChanged ...
 #endif
 }
 
@@ -224,7 +230,9 @@ extern "C"
 void GtkSalDisplay::initScreen( int nScreen ) const
 {
 #if GTK_CHECK_VERSION(3,0,0)
-    // no colormaps handling in gtk 3 or need to init screens ...
+    // No implementation needed for gt3k: no colormaps handling
+    // or need to init screens ...
+    (void)nScreen;
 #else
     if( nScreen < 0 || nScreen >= static_cast<int>(m_aScreens.size()) )
         nScreen = m_nDefaultScreen;
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 156e0d3..597be51 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -235,6 +235,7 @@ extern "C" {
                                                         GdkEvent *event,
                                                         gpointer  data)
     {
+        (void)event;
         // FIXME: in theory this could be for non-X events but in reality it never is.
         XEvent *pXEvent = (XEvent *)_xevent;
         sal_uInt16 nType;
@@ -341,6 +342,7 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind
     if( pWindowData )
         return X11SalObject::CreateObject( pParent, pWindowData, bShow );
 #else
+    (void)pWindowData;
 #warning FIXME: Missing CreateObject functionality ...
 #endif
 
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 0b99e6d..cbd23ec 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -343,7 +343,9 @@ GetAlternateKeyCode( const sal_uInt16 nKeyCode )
 }
 
 static int debugQueuePureRedraw = 0;
+#if GTK_CHECK_VERSION(3,0,0)
 static int debugRedboxRedraws = 0;
+#endif
 
 void GtkSalFrame::doKeyCallback( guint state,
                                  guint keyval,
@@ -787,8 +789,12 @@ static void lcl_set_accept_focus( GtkWindow* pWindow, gboolean bAccept, bool bBe
             XFree( pProtocols );
         }
     }
+#else
+    (void)pWindow; (void)bAccept; (void)bBeforeRealize;
+#  warning FIXME: No set_accept_focus impl
 #endif
 }
+
 static void lcl_set_user_time( GdkWindow* i_pWindow, guint32 i_nTime )
 {
 #if !GTK_CHECK_VERSION(3,0,0)
@@ -811,6 +817,9 @@ static void lcl_set_user_time( GdkWindow* i_pWindow, guint32 i_nTime )
                              PropModeReplace, (unsigned char*)&i_nTime, 1 );
         }
     }
+#else
+    (void)i_pWindow; (void)i_nTime;
+#  warning FIXME: no lcl_set_user_time impl.
 #endif
 };
 
@@ -970,6 +979,8 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
 
     return aWindow;
 #else
+    (void)aWindow;
+# warning FIXME: no findToplevelSystemWindow
     return 0;
 #endif
 }
@@ -1049,6 +1060,9 @@ void GtkSalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
                 m_aForeignParentWindow,
                 False, NoEventMask, &aEvent );
     GetGenericData()->ErrorTrapPop();
+#else
+    (void)i_nTimeCode;
+#warning FIXME: no askForXEmbedFocus for gtk3 yet
 #endif
 }
 
@@ -2111,27 +2125,26 @@ dbus_uninhibit_gsm (guint cookie)
 
 void GtkSalFrame::StartPresentation( sal_Bool bStart )
 {
-    Display *pDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
-
     setAutoLock( !bStart );
 
-    int nTimeout, nInterval, bPreferBlanking, bAllowExposures;
-
 #if !GTK_CHECK_VERSION(3,0,0)
+    Display *pDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
+
+    int nTimeout, nInterval, bPreferBlanking, bAllowExposures;
     XGetScreenSaver( pDisplay, &nTimeout, &nInterval,
                      &bPreferBlanking, &bAllowExposures );
 #endif
     if( bStart )
     {
+#if !GTK_CHECK_VERSION(3,0,0)
         if ( nTimeout )
         {
             m_nSavedScreenSaverTimeout = nTimeout;
-#if !GTK_CHECK_VERSION(3,0,0)
             XResetScreenSaver( pDisplay );
             XSetScreenSaver( pDisplay, 0, nInterval,
                              bPreferBlanking, bAllowExposures );
-#endif
         }
+#endif
 #ifdef ENABLE_DBUS
         m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation",
                     GDK_WINDOW_XID(widget_get_window(m_pWindow)));
@@ -2217,9 +2230,9 @@ void GtkSalFrame::SetPointer( PointerStyle ePointerStyle )
 
 void GtkSalFrame::grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents )
 {
+#if !GTK_CHECK_VERSION(3,0,0)
     static const char* pEnv = getenv( "SAL_NO_MOUSEGRABS" );
 
-#if !GTK_CHECK_VERSION(3,0,0)
     if( m_pWindow )
     {
         if( bGrab )
@@ -2273,6 +2286,9 @@ void GtkSalFrame::grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents )
                 gdk_display_pointer_ungrab( getGdkDisplay(), GDK_CURRENT_TIME);
         }
     }
+#else
+    (void)bGrab; (void) bOwnerEvents;
+#warning FIXME: No GrabPointer implementation for gtk3 ...
 #endif
 }
 
@@ -2326,6 +2342,7 @@ String GtkSalFrame::GetSymbolKeyName( const String&, sal_uInt16 nKeyCode )
 #if !GTK_CHECK_VERSION(3,0,0)
   return getDisplay()->GetKeyName( nKeyCode );
 #else
+  (void)nKeyCode;
 # warning FIXME - key names
   return String();
 #endif
@@ -2336,6 +2353,7 @@ String GtkSalFrame::GetKeyName( sal_uInt16 nKeyCode )
 #if !GTK_CHECK_VERSION(3,0,0)
     return getDisplay()->GetKeyName( nKeyCode );
 #else
+  (void)nKeyCode;
 # warning FIXME - key names
   return String();
 #endif
@@ -2606,6 +2624,8 @@ bool GtkSalFrame::SetPluginParent( SystemParentData* pSysParent )
     createNewWindow( pSysParent->aWindow, (pSysParent->nSize > sizeof(long)) ? pSysParent->bXEmbedSupport : false, m_nScreen );
     return true;
 #else
+    (void)pSysParent;
+#warning FIXME: no SetPluginParent impl. for gtk3
     return false;
 #endif
 }
@@ -2770,6 +2790,9 @@ void GtkSalFrame::SetBackgroundBitmap( SalBitmap* pBitmap )
             }
         }
     }
+#else
+    (void)pBitmap;
+#warning FIXME: no SetBackgroundBitmap impl. for gtk3
 #endif
 }
 


More information about the Libreoffice-commits mailing list