Hello community,

here is the log from the commit of package oxygen-gtk2 for openSUSE:Factory 
checked in at 2014-03-09 18:32:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/oxygen-gtk2 (Old)
 and      /work/SRC/openSUSE:Factory/.oxygen-gtk2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "oxygen-gtk2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/oxygen-gtk2/oxygen-gtk2.changes  2014-01-29 
07:16:41.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.oxygen-gtk2.new/oxygen-gtk2.changes     
2014-03-09 18:32:12.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Mar  8 16:10:57 UTC 2014 - hrvoje.sen...@gmail.com
+
+- Update to version 1.4.4
+  * Bugfix release, no changelog provided from upstream
+
+-------------------------------------------------------------------

Old:
----
  oxygen-gtk2-1.4.3.tar.bz2

New:
----
  oxygen-gtk2-1.4.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ oxygen-gtk2.spec ++++++
--- /var/tmp/diff_new_pack.8OFRed/_old  2014-03-09 18:32:12.000000000 +0100
+++ /var/tmp/diff_new_pack.8OFRed/_new  2014-03-09 18:32:12.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           oxygen-gtk2
-Version:        1.4.3
+Version:        1.4.4
 Release:        0
 Summary:        A Port of the default KDE Widget Theme (Oxygen), to GTK 2.x
 License:        LGPL-2.1+

++++++ oxygen-gtk2-1.4.3.tar.bz2 -> oxygen-gtk2-1.4.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/CMakeLists.txt 
new/oxygen-gtk2-1.4.4/CMakeLists.txt
--- old/oxygen-gtk2-1.4.3/CMakeLists.txt        2014-01-24 10:31:18.000000000 
+0100
+++ new/oxygen-gtk2-1.4.4/CMakeLists.txt        2014-03-07 16:26:45.000000000 
+0100
@@ -13,7 +13,7 @@
 set( CPACK_PACKAGE_VENDOR "hugo.pere...@free.fr" )
 set( CPACK_PACKAGE_VERSION_MAJOR "1" )
 set( CPACK_PACKAGE_VERSION_MINOR "4" )
-set( CPACK_PACKAGE_VERSION_PATCH "3" )
+set( CPACK_PACKAGE_VERSION_PATCH "4" )
 set( CPACK_SOURCE_IGNORE_FILES "build" "^${PROJECT_SOURCE_DIR}.*/.git/" )
 
 ##################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/config.h.cmake 
new/oxygen-gtk2-1.4.4/config.h.cmake
--- old/oxygen-gtk2-1.4.3/config.h.cmake        2014-01-24 10:31:10.000000000 
+0100
+++ new/oxygen-gtk2-1.4.4/config.h.cmake        2014-03-07 16:26:39.000000000 
+0100
@@ -24,11 +24,13 @@
 
 #define GTK_THEME_DIR "@GTK_THEME_DIR@/gtk-2.0"
 #ifndef OXYGEN_DEBUG
-#   define OXYGEN_DEBUG @OXYGEN_DEBUG@
+#define OXYGEN_DEBUG @OXYGEN_DEBUG@
 #endif
+
 #ifndef OXYGEN_DEBUG_INNERSHADOWS
-#   define OXYGEN_DEBUG_INNERSHADOWS @OXYGEN_DEBUG_INNERSHADOWS@
+#define OXYGEN_DEBUG_INNERSHADOWS @OXYGEN_DEBUG_INNERSHADOWS@
 #endif
+
 #define OXYGEN_ICON_HACK @OXYGEN_ICON_HACK@
 #define OXYGEN_FORCE_KDE_ICONS_AND_FONTS @OXYGEN_FORCE_KDE_ICONS_AND_FONTS@
 #define HAVE_DBUS @HAVE_DBUS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oxygen-gtk2-1.4.3/src/animations/oxygenanimations.cpp 
new/oxygen-gtk2-1.4.4/src/animations/oxygenanimations.cpp
--- old/oxygen-gtk2-1.4.3/src/animations/oxygenanimations.cpp   2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/animations/oxygenanimations.cpp   2014-03-07 
16:26:39.000000000 +0100
@@ -308,6 +308,10 @@
             << std::endl;
         #endif
 
+        // force shadow type on known windows
+        if( Gtk::gtk_scrolled_window_force_sunken( parent ) )
+        { gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( parent ), 
GTK_SHADOW_IN ); }
+
         animations.innerShadowEngine().registerWidget( parent );
         animations.innerShadowEngine().registerChild( parent, widget );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oxygen-gtk2-1.4.3/src/animations/oxygeninnershadowdata.cpp 
new/oxygen-gtk2-1.4.4/src/animations/oxygeninnershadowdata.cpp
--- old/oxygen-gtk2-1.4.3/src/animations/oxygeninnershadowdata.cpp      
2014-01-24 10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/animations/oxygeninnershadowdata.cpp      
2014-03-07 16:26:39.000000000 +0100
@@ -89,6 +89,9 @@
         // make sure widget is not already in map
         if( _childrenData.find( widget ) != _childrenData.end() ) return;
 
+        if( gtk_scrolled_window_get_shadow_type( GTK_SCROLLED_WINDOW( _target 
) ) != GTK_SHADOW_IN )
+        { return; }
+
         #if OXYGEN_DEBUG
         std::cerr
             << "Oxygen::InnerShadowData::registerChild -"
@@ -276,7 +279,7 @@
         int basicOffset=2;
 
         // we only draw SHADOW_IN here
-        if(gtk_scrolled_window_get_shadow_type(GTK_SCROLLED_WINDOW(widget)) != 
GTK_SHADOW_IN )
+        if( gtk_scrolled_window_get_shadow_type( GTK_SCROLLED_WINDOW( widget ) 
) != GTK_SHADOW_IN )
         {
             if( GTK_IS_VIEWPORT(child) && 
gtk_viewport_get_shadow_type(GTK_VIEWPORT(child)) == GTK_SHADOW_IN )
             {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizedata.cpp 
new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizedata.cpp
--- old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizedata.cpp       
2014-01-24 10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizedata.cpp       
2014-03-07 16:26:39.000000000 +0100
@@ -25,47 +25,43 @@
 
 namespace Oxygen
 {
-    bool WidgetSizeData::updateXShape()
+
+    
//___________________________________________________________________________________________________________
+    bool WidgetSizeData::updateMask()
     {
-        GtkWidget* widget(_widget);
+
+        /* check widget type, store window and offset */
         GdkWindow* window(0);
         int verticalMaskOffset(0);
-
-        if(GTK_IS_MENU(widget))
+        if( GTK_IS_MENU( _target ) )
         {
 
-            window = gtk_widget_get_parent_window(widget);
+            window = gtk_widget_get_parent_window( _target );
             verticalMaskOffset=Oxygen::Menu_VerticalOffset;
 
-        } else if(Gtk::gtk_is_tooltip(widget)) {
-
-            window = gtk_widget_get_window(widget);
-
-        } else if(Gtk::gtk_combobox_is_popup(widget)) {
-
-            window=gtk_widget_get_window(widget);
-
-        } else if(Gtk::gtk_combo_is_popup(widget)) {
+        } else if(
+            Gtk::gtk_is_tooltip( _target ) ||
+            Gtk::gtk_combobox_is_popup( _target ) ||
+            Gtk::gtk_combo_is_popup( _target ) ) {
 
-            window=gtk_widget_get_window(widget);
+            window=gtk_widget_get_window( _target );
 
         } else {
 
-            std::cerr << "FIXME: Oxygen::WidgetSizeData: unknown window type: 
\""<< Gtk::gtk_widget_path(widget)<<"\"\n";
+            std::cerr << "FIXME: Oxygen::WidgetSizeData: unknown window type: 
\""<< Gtk::gtk_widget_path( _target )<<"\"\n";
             return false;
 
         }
 
-        const bool wasAlpha(_alpha);
-        const bool alpha(Gtk::gtk_widget_has_rgba( widget ));
-
-        const GtkAllocation allocation( Gtk::gtk_widget_get_allocation( widget 
) );
-        const int &width(allocation.width), &height(allocation.height);
+        const bool alpha( Gtk::gtk_widget_has_rgba( _target ) );
+        const GtkAllocation allocation( Gtk::gtk_widget_get_allocation( 
_target ) );
+        const int &width(allocation.width);
+        const int &height(allocation.height);
 
+        // check modifications
         const bool sizeChanged( width != _width || height != _height );
-        const bool alphaChanged( alpha != wasAlpha );
-
-        if( !sizeChanged && !alphaChanged ) return false;
+        const bool alphaChanged( alpha != _alpha );
+        if( !( sizeChanged || alphaChanged ) ) return false;
 
         if(!alpha)
         {
@@ -80,21 +76,14 @@
             // reset mask if compositing has appeared after we had set a mask
             gdk_window_shape_combine_mask( window, NULL, 0, 0);
 
-            // TODO: move to size allocation hook
-            if( Gtk::gtk_is_tooltip(widget) && ( sizeChanged || !wasAlpha ) )
-            {
-                Style::instance().setWindowBlur(window,true);
-            }
-
-            if( Style::instance().settings().backgroundOpacity() < 255 )
-            {
-
-                if(GTK_IS_MENU(widget)) 
Style::instance().setWindowBlur(window,true);
-
-            }
-
         }
 
+        // adjust blur region
+        if( sizeChanged && alpha &&
+            ( Gtk::gtk_is_tooltip( _target ) ||
+            ( Style::instance().settings().backgroundOpacity() < 255 && 
GTK_IS_MENU( _target ) ) ) )
+        { Style::instance().setWindowBlur(window,true); }
+
         // Update widget properties
         _width=width;
         _height=height;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizedata.h 
new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizedata.h
--- old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizedata.h 2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizedata.h 2014-03-07 
16:26:39.000000000 +0100
@@ -33,7 +33,7 @@
 
         //! constructor
         WidgetSizeData( void ):
-            _widget(NULL),
+            _target(NULL),
             _width(-1),
             _height(-1),
             _alpha(false)
@@ -45,20 +45,18 @@
 
         //! setup connections
         void connect( GtkWidget* widget )
-        {
-            _widget=widget;
-        }
+        { _target = widget; }
 
         //! disconnect
-        void disconnect( GtkWidget* ) const
-        {}
+        void disconnect( GtkWidget* )
+        { _target = 0L; }
 
         //! update XShape, return true if size has changed
-        bool updateXShape();
+        bool updateMask();
 
         private:
         //! target widget
-        GtkWidget* _widget;
+        GtkWidget* _target;
 
         //! old width
         int _width;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizeengine.h 
new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizeengine.h
--- old/oxygen-gtk2-1.4.3/src/animations/oxygenwidgetsizeengine.h       
2014-01-24 10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/animations/oxygenwidgetsizeengine.h       
2014-03-07 16:26:39.000000000 +0100
@@ -52,8 +52,8 @@
         {}
 
         //! update window XShape for given widget
-        bool updateXShape( GtkWidget* widget )
-        { return data().value( widget ).updateXShape(); }
+        bool updateMask( GtkWidget* widget )
+        { return data().value( widget ).updateMask(); }
     };
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/src/oxygengtkutils.cpp 
new/oxygen-gtk2-1.4.4/src/oxygengtkutils.cpp
--- old/oxygen-gtk2-1.4.3/src/oxygengtkutils.cpp        2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/oxygengtkutils.cpp        2014-03-07 
16:26:39.000000000 +0100
@@ -589,21 +589,21 @@
         switch( gtk_notebook_get_tab_pos( notebook ) )
         {
             case GTK_POS_BOTTOM:
-            rect->y += pageAllocation.height;
-            rect->height -= pageAllocation.height;
+            rect->height += rect->y - (pageAllocation.y + 
pageAllocation.height);
+            rect->y = pageAllocation.y + pageAllocation.height;
             break;
 
             case GTK_POS_TOP:
-            rect->height -= pageAllocation.height;
+            rect->height = pageAllocation.y - rect->y;
             break;
 
             case GTK_POS_RIGHT:
-            rect->x += pageAllocation.width;
-            rect->width -= pageAllocation.width;
+            rect->width += rect->x - (pageAllocation.x + pageAllocation.width);
+            rect->x = pageAllocation.x + pageAllocation.width;
             break;
 
             case GTK_POS_LEFT:
-            rect->width -= pageAllocation.width;
+            rect->width = pageAllocation.x - rect->x;
             break;
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/src/oxygenstyle.cpp 
new/oxygen-gtk2-1.4.4/src/oxygenstyle.cpp
--- old/oxygen-gtk2-1.4.3/src/oxygenstyle.cpp   2014-01-24 10:31:10.000000000 
+0100
+++ new/oxygen-gtk2-1.4.4/src/oxygenstyle.cpp   2014-03-07 16:26:39.000000000 
+0100
@@ -274,8 +274,20 @@
 
             ColorUtils::Rgba base( color( Palette::Window, options ) );
             const bool needToDestroyContext( !context );
-            if( !context ) context = gdk_cairo_create(window);
-            else cairo_save( context );
+            if( !context )
+            {
+
+                // create context
+                context = gdk_cairo_create(window);
+
+                // set clip rect
+                if( clipRect )
+                {
+                    
cairo_rectangle(context,clipRect->x,clipRect->y,clipRect->width,clipRect->height);
+                    cairo_clip(context);
+                }
+
+            } else cairo_save( context );
 
             cairo_set_source(context,base);
             cairo_rectangle(context,x,y,w,h);
@@ -4097,16 +4109,16 @@
         // Make whole window blurred
         // FIXME: should roundedness be taken into account?
         #if GTK_CHECK_VERSION(2,24,0)
-        int w = gdk_window_get_width(window);
-        int h = gdk_window_get_height(window);
-        GdkDisplay* gdkDisplay=gdk_window_get_display(window);
+        const int w( gdk_window_get_width( window ) );
+        const int h( gdk_window_get_height( window ) );
+        GdkDisplay* gdkDisplay = gdk_window_get_display( window );
         #else
-        int w,h;
-        gdk_drawable_get_size(window,&w,&h);
-        GdkDisplay* gdkDisplay=gdk_drawable_get_display(window);
+        int w(0), h(0);
+        gdk_drawable_get_size( window, &w, &h );
+        GdkDisplay* gdkDisplay = gdk_drawable_get_display( window );
         #endif
 
-        const guint32 rects[4]={0,0, (guint32)w, (guint32)h};
+        const unsigned long rects[4] = { 0, 0, (unsigned long)w, (unsigned 
long)h };
         const XID id( GDK_WINDOW_XID( window ) );
         Display* display( GDK_DISPLAY_XDISPLAY( gdkDisplay ) );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/src/oxygenstylewrapper.cpp 
new/oxygen-gtk2-1.4.4/src/oxygenstylewrapper.cpp
--- old/oxygen-gtk2-1.4.3/src/oxygenstylewrapper.cpp    2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/oxygenstylewrapper.cpp    2014-03-07 
16:26:39.000000000 +0100
@@ -283,7 +283,7 @@
             if( GDK_IS_WINDOW( window ) )
             {
                 
Style::instance().animations().widgetSizeEngine().registerWidget( widget );
-                
Style::instance().animations().widgetSizeEngine().updateXShape(widget);
+                
Style::instance().animations().widgetSizeEngine().updateMask(widget);
             }
 
             Style::instance().renderTooltipBackground( window, clipRect, x, y, 
w, h, options );
@@ -1258,7 +1258,7 @@
                     
Style::instance().animations().menuItemEngine().registerMenu( widget );
 
                     
Style::instance().animations().widgetSizeEngine().registerWidget( widget );
-                    
Style::instance().animations().widgetSizeEngine().updateXShape( widget );
+                    
Style::instance().animations().widgetSizeEngine().updateMask( widget );
                 }
 
                 // if render
@@ -1656,15 +1656,21 @@
         { return; }
 
         // adjust shadow type for some known widgets
-        if( d.isScrolledWindow() &&
-            shadow != GTK_SHADOW_IN &&
-            GTK_IS_SCROLLED_WINDOW( widget ) &&
-            Gtk::gtk_scrolled_window_force_sunken( widget ) )
+        if( d.isScrolledWindow() && GTK_IS_SCROLLED_WINDOW( widget ) )
         {
 
             // make sure that scrolled windows containing a treeView have 
sunken frame
-            shadow = GTK_SHADOW_IN;
-            gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( widget 
), GTK_SHADOW_IN );
+            if( shadow != GTK_SHADOW_IN && 
Gtk::gtk_scrolled_window_force_sunken( widget ) )
+            {
+
+                shadow = GTK_SHADOW_IN;
+                gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( 
widget ), GTK_SHADOW_IN );
+
+            }
+
+            // register to inner shadow engine
+            if( shadow == GTK_SHADOW_IN && 
gtk_scrolled_window_get_shadow_type( GTK_SCROLLED_WINDOW( widget ) ) == 
GTK_SHADOW_IN )
+            { 
Style::instance().animations().innerShadowEngine().registerChild( widget, 
gtk_bin_get_child( GTK_BIN( widget ) ) ); }
 
         } else if(
             d.isFrame() &&
@@ -1696,7 +1702,7 @@
 
             // always register to widget size engine
             Style::instance().animations().widgetSizeEngine().registerWidget( 
parent );
-            const bool sizeChanged( 
Style::instance().animations().widgetSizeEngine().updateXShape(parent) );
+            const bool sizeChanged( 
Style::instance().animations().widgetSizeEngine().updateMask(parent) );
             if( sizeChanged )
             {
 #if !ENABLE_INNER_SHADOWS_HACK
@@ -1750,7 +1756,7 @@
 
             // make background window rounded
             
Style::instance().animations().widgetSizeEngine().registerWidget(parent);
-            if( 
Style::instance().animations().widgetSizeEngine().updateXShape(parent))
+            
Style::instance().animations().widgetSizeEngine().updateMask(parent);
 
             // menu background and float frame
             Style::instance().renderMenuBackground( window, clipRect, x, y, w, 
h, options );
@@ -2066,9 +2072,13 @@
                     // also change scrolled window shadow if needed
                     GtkScrolledWindow* scrolledWindow(GTK_SCROLLED_WINDOW( 
child ) );
                     if( gtk_scrolled_window_get_shadow_type( scrolledWindow ) 
!= GTK_SHADOW_IN )
-                    { gtk_scrolled_window_set_shadow_type( scrolledWindow, 
GTK_SHADOW_IN ); }
+                    {
+                        gtk_scrolled_window_set_shadow_type( scrolledWindow, 
GTK_SHADOW_IN );
+                        
Style::instance().animations().innerShadowEngine().registerChild( child, 
gtk_bin_get_child( GTK_BIN( child ) ) );
+                    }
 
                     return;
+
                 }
 
             }
@@ -3707,6 +3717,7 @@
             Oxygen::Style::instance().animations().setEnabled( false );
             Oxygen::Style::instance().animations().setInnerShadowsEnabled( 
false );
             
Oxygen::Style::instance().animations().comboBoxEngine().setEnabled( true );
+            
Oxygen::Style::instance().animations().backgroundHintEngine().setEnabled( true 
);
         }
 
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/src/oxygenwindowmanager.cpp 
new/oxygen-gtk2-1.4.4/src/oxygenwindowmanager.cpp
--- old/oxygen-gtk2-1.4.3/src/oxygenwindowmanager.cpp   2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/oxygenwindowmanager.cpp   2014-03-07 
16:26:39.000000000 +0100
@@ -113,6 +113,15 @@
         // check against black listed typenames
         if( widgetIsBlackListed( widget ) )
         {
+
+            #if OXYGEN_DEBUG
+            std::cerr
+                << "Oxygen::WindowManager::registerWidget -"
+                << " widget: " << widget << " (" << G_OBJECT_TYPE_NAME( widget 
) << ")"
+                << " is black listed"
+                << std::endl;
+            #endif
+
             registerBlackListWidget( widget );
             return false;
         }
@@ -120,6 +129,15 @@
         // check blocking property
         if( g_object_get_data( G_OBJECT( widget ), PropertyNames::noWindowGrab 
) )
         {
+
+            #if OXYGEN_DEBUG
+            std::cerr
+                << "Oxygen::WindowManager::registerWidget -"
+                << " widget: " << widget << " (" << G_OBJECT_TYPE_NAME( widget 
) << ")"
+                << " requests no grab"
+                << std::endl;
+            #endif
+
             registerBlackListWidget( widget );
             return false;
         }
@@ -127,6 +145,15 @@
         // Window with no decorations (set by app), let window manage it self
         if( GTK_IS_WINDOW( widget ) && !gtk_window_get_decorated( GTK_WINDOW( 
widget ) ) )
         {
+
+            #if OXYGEN_DEBUG
+            std::cerr
+                << "Oxygen::WindowManager::registerWidget -"
+                << " widget: " << widget << " (" << G_OBJECT_TYPE_NAME( widget 
) << ")"
+                << " is not decorated"
+                << std::endl;
+            #endif
+
             registerBlackListWidget( widget );
             return false;
         }
@@ -147,13 +174,30 @@
             ( gtk_widget_get_events ( widget ) &
             ( GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK ) ) )
         {
+            #if OXYGEN_DEBUG
+            std::cerr
+                << "Oxygen::WindowManager::registerWidget -"
+                << " widget: " << widget << " (" << G_OBJECT_TYPE_NAME( widget 
) << ")"
+                << " has invalid event mask"
+                << std::endl;
+            #endif
             registerBlackListWidget( widget );
             return false;
         }
 
         // check for blacklisted parent
         if( widgetHasBlackListedParent( widget ) )
-        { return false; }
+        {
+
+            #if OXYGEN_DEBUG
+            std::cerr
+                << "Oxygen::WindowManager::registerWidget -"
+                << " widget: " << widget << " (" << G_OBJECT_TYPE_NAME( widget 
) << ")"
+                << " has black listed parent"
+                << std::endl;
+            #endif
+            return false;
+        }
 
         #if OXYGEN_DEBUG
         std::cerr
@@ -605,107 +649,166 @@
 
         // check against mode
         if( _dragMode == Disabled ) return false;
-        if( _dragMode == Minimal && !( GTK_IS_TOOLBAR( widget ) || 
GTK_IS_MENU_BAR( widget ) ) ) return false;
-        if( _lastRejectedEvent && event == _lastRejectedEvent ) return false;
-
-        // always accept if widget is not a container
-        if( !GTK_IS_CONTAINER( widget ) ) return true;
-
-        // if widget is a notebook, accept if there is no hovered tab
-        bool useEvent( true );
-        if( GTK_IS_NOTEBOOK( widget ) )
-        {
+        else if( _dragMode == Minimal && !( GTK_IS_TOOLBAR( widget ) || 
GTK_IS_MENU_BAR( widget ) ) ) return false;
+        else if( _lastRejectedEvent && event == _lastRejectedEvent ) return 
false;
+        else {
 
-            useEvent =
-                ( !Gtk::gtk_notebook_has_visible_arrows( GTK_NOTEBOOK( widget 
) ) ) &&
-                Style::instance().animations().tabWidgetEngine().contains( 
widget ) &&
-                Style::instance().animations().tabWidgetEngine().hoveredTab( 
widget ) == -1 &&
-                childrenUseEvent( widget, event, false );
+            const DragStatus status( childrenUseEvent( widget, event, false ) 
);
 
-        } else {
+            #if OXYGEN_DEBUG
+            std::cerr << "Oxygen::WindowManager::useEvent -"
+                << " event: " << event
+                << " widget: " << widget
+                << " (" << G_OBJECT_TYPE_NAME( widget ) << ")"
+                << " " << gtk_widget_get_name( widget )
+                << " status: " << dragStatusString(status)
+                << std::endl;
+            #endif
 
-            if( GTK_IS_WINDOW( widget ) )
-            {
+            return status == Accepted;
 
-                // check hint
-                const GdkWindowTypeHint hint( gtk_window_get_type_hint( 
GTK_WINDOW( widget ) ) );
-                if( hint == GDK_WINDOW_TYPE_HINT_UTILITY ) return false;
+        }
 
-            }
+    }
 
-            useEvent = childrenUseEvent( widget, event, false );
+    //_________________________________________________
+    std::string WindowManager::dragStatusString( DragStatus status ) const
+    {
 
+        switch( status )
+        {
+            case Accepted: return "accepted";
+            case BlackListed: return "widget is black-listed";
+            case WidgetIsPrelight: return "widget is prelit";
+            case WidgetIsButton: return "widget is a button";
+            case WidgetIsMenuItem: return "widget is a menu item";
+            case WidgetIsScrolledWindow: return "widget is a scrolled window 
with focus";
+            case WidgetIsTabLabel: return "widget is a notebook's tab label";
+            case InvalidWindow: return "widget's window is hidden";
+            case InvalidEventMask: return "invalid event mask";
+            default: return "unknown";
         }
-
-        return useEvent;
-
     }
 
     //_________________________________________________
-    bool WindowManager::childrenUseEvent( GtkWidget* widget, GdkEventButton* 
event, bool inNoteBook ) const
+    WindowManager::DragStatus WindowManager::childrenUseEvent( GtkWidget* 
widget, GdkEventButton* event, bool inNoteBook ) const
     {
-        // accept, by default
-        bool usable = true;
 
-        // get children and check
+        /*
+        always reject if
+        - widget is black listed
+        - widget is prelit
+        - widget is an active button
+        - widget is a menu item
+        - widget event mask is explicitly set to 
GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK
+        */
+        if( widgetIsBlackListed( widget ) ) return BlackListed;
+        else if( gtk_widget_get_state( widget ) == GTK_STATE_PRELIGHT ) return 
WidgetIsPrelight;
+        else if( GTK_IS_BUTTON( widget ) ) return WidgetIsButton;
+        else if( GTK_IS_MENU_ITEM( widget ) ) return WidgetIsMenuItem;
+        else if( GTK_IS_SCROLLED_WINDOW( widget ) && ( !inNoteBook || 
gtk_widget_is_focus( widget ) ) ) return WidgetIsScrolledWindow;
+
+        // check window
+        GdkWindow *window = gtk_widget_get_window( widget );
+        if( !( window && gdk_window_is_visible( window ) ) ) return 
InvalidWindow;
+
+        // accept if widget is not a container and we got this far,
+        if( !GTK_IS_CONTAINER( widget ) ) return Accepted;
+
+        // check notebook
+        if( GTK_IS_NOTEBOOK( widget ) )
+        {
+
+            /*
+            always reject if
+            - Notebook has visible scroll arrows
+            - there is an hovered tab
+            - notebook is not registered
+            */
+            if( Gtk::gtk_notebook_has_visible_arrows( GTK_NOTEBOOK( widget ) ) 
||
+                !Style::instance().animations().tabWidgetEngine().contains( 
widget ) ||
+                Style::instance().animations().tabWidgetEngine().hoveredTab( 
widget ) != -1 )
+            { return WidgetIsPrelight; }
+
+            // keep track on whether we are in a notebook
+            inNoteBook = true;
+        }
+
+        // loop over children and check
+        DragStatus status = Accepted;
         GList *children = gtk_container_get_children( GTK_CONTAINER( widget ) 
);
-        for( GList *child = g_list_first( children ); child && usable ; child 
= g_list_next( child ) )
+        for( GList *child = g_list_first( children ); child; child = 
g_list_next( child ) )
         {
 
             // cast child to GtkWidget
             if( !GTK_IS_WIDGET( child->data ) ) continue;
             GtkWidget* childWidget( GTK_WIDGET( child->data ) );
 
-            // check widget state and type
-            if( gtk_widget_get_state( childWidget ) == GTK_STATE_PRELIGHT )
+            // check that widget contains event
+            if( withinWidget( childWidget, event ) )
             {
 
-                // if widget is prelight, we don't need to check where event 
happen,
-                // any prelight widget indicate we can't do a move
-                usable = false;
-                continue;
+                /*
+                following checks must not be moved upstream, as they are not 
to be applied
+                to the first parent widget (the one that recieved the mouse 
press event
+                */
 
-            }
+                // always reject if child explicitly accepts button press and 
button release events
+                if( gtk_widget_get_events( childWidget ) & 
(GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK) )
+                {
 
-            GdkWindow *window = gtk_widget_get_window( childWidget );
-            if( !( window && gdk_window_is_visible( window ) ) )
-            { continue; }
-
-            if( GTK_IS_NOTEBOOK( childWidget ) ) inNoteBook = true;
-
-            if( !( event && withinWidget( childWidget, event ) ) )
-            { continue; }
-
-            // check special cases for which grab should not be enabled
-            if( usable && (
-                widgetIsBlackListed( childWidget ) ||
-                ( GTK_IS_NOTEBOOK( widget ) && Gtk::gtk_notebook_is_tab_label( 
GTK_NOTEBOOK( widget ), childWidget ) ) ||
-                ( GTK_IS_BUTTON( childWidget ) && gtk_widget_get_state( 
childWidget ) != GTK_STATE_INSENSITIVE ) ||
-                ( gtk_widget_get_events ( childWidget ) & 
(GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK) ) ||
-                ( GTK_IS_MENU_ITEM( childWidget ) ) ||
-                ( GTK_IS_SCROLLED_WINDOW( childWidget ) && ( !inNoteBook || 
gtk_widget_is_focus( childWidget ) ) ) ) )
-            { usable = false; }
-
-            // if child is a container and event has been accepted so far, 
also check it, recursively
-            if( usable && GTK_IS_CONTAINER( childWidget ) )
-            { usable = childrenUseEvent( childWidget, event, inNoteBook); }
+                    status = InvalidEventMask;
+
+                } else if( GTK_IS_NOTEBOOK( widget ) && 
Gtk::gtk_notebook_is_tab_label( GTK_NOTEBOOK( widget ), childWidget ) ) {
+
+                    // always disable on tabbar label
+                    status = WidgetIsTabLabel;
+
+                } else {
+
+                    // recursive check
+                    status = childrenUseEvent( childWidget, event, inNoteBook 
);
+
+                }
 
-            #if OXYGEN_DEBUG
-            std::cerr << "Oxygen::WindowManager::childrenUseEvent -"
-                << " event: " << event
-                << " widget: " << childWidget
-                << " (" << G_OBJECT_TYPE_NAME( childWidget ) << ")"
-                << " " << gtk_widget_get_name( childWidget )
-                << " usable: " << usable
-                << std::endl;
-            #endif
+
+                #if OXYGEN_DEBUG
+                std::cerr << "Oxygen::WindowManager::childrenUseEvent -"
+                    << " event: " << event
+                    << " widget: " << childWidget
+                    << " (" << G_OBJECT_TYPE_NAME( childWidget ) << ")"
+                    << " " << gtk_widget_get_name( childWidget )
+                    << " status: " << dragStatusString(status)
+                    << std::endl;
+                #endif
+
+                break;
+
+            }
 
         }
 
         // free list
         if( children ) g_list_free( children );
+        return status;
 
-        return usable;
+    }
+
+    //_________________________________________________
+    bool WindowManager::widgetIsBlackListed( GtkWidget* widget ) const
+    {
+        BlackList::const_iterator iter( std::find_if( _blackList.begin(), 
_blackList.end(), BlackListFTor( G_OBJECT( widget ) ) ) );
+        #if OXYGEN_DEBUG
+        if( iter == _blackList.end() ) return false;
+        else {
+
+            std::cerr << "Oxygen::WindowManager::widgetIsBlackListed - widget: 
" << widget << " type: " << *iter << std::endl;
+            return true;
+
+        }
+        #else
+        return iter != _blackList.end();
+        #endif
     }
 
     //_________________________________________________
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oxygen-gtk2-1.4.3/src/oxygenwindowmanager.h 
new/oxygen-gtk2-1.4.4/src/oxygenwindowmanager.h
--- old/oxygen-gtk2-1.4.3/src/oxygenwindowmanager.h     2014-01-24 
10:31:10.000000000 +0100
+++ new/oxygen-gtk2-1.4.4/src/oxygenwindowmanager.h     2014-03-07 
16:26:39.000000000 +0100
@@ -159,9 +159,26 @@
         //! return true if event is a usable drag event
         bool useEvent( GtkWidget*, GdkEventButton* );
 
-        //! return true if event is a usable drag event
+        //! drag status
+        enum DragStatus
+        {
+            Accepted = 0,
+            BlackListed,
+            WidgetIsPrelight,
+            WidgetIsButton,
+            WidgetIsMenuItem,
+            WidgetIsScrolledWindow,
+            WidgetIsTabLabel,
+            InvalidWindow,
+            InvalidEventMask
+        };
+
+        //! return string matching drag status, for debugging
+        std::string dragStatusString( DragStatus ) const;
+
+        //! return whether event is a usable drag event
         /*! for containers, children are also checked. The method is recursive 
*/
-        bool childrenUseEvent( GtkWidget*, GdkEventButton*, bool ) const;
+        DragStatus childrenUseEvent( GtkWidget*, GdkEventButton*, bool ) const;
 
         //! used to decide whether a widget is black-listed
         class BlackListFTor
@@ -189,8 +206,7 @@
         void initializeBlackList( void );
 
         //! return true if widget is black listed for grabbing
-        bool widgetIsBlackListed( GtkWidget* widget ) const
-        { return std::find_if( _blackList.begin(), _blackList.end(), 
BlackListFTor( G_OBJECT( widget ) ) ) != _blackList.end(); }
+        bool widgetIsBlackListed( GtkWidget* widget ) const;
 
         //! return true if widget has a black listed parent
         bool widgetHasBlackListedParent( GtkWidget* widget ) const;
@@ -285,7 +301,8 @@
         guint32 _time;
 
         //! widget typenames black-list
-        std::vector<std::string> _blackList;
+        typedef std::vector<std::string> BlackList;
+        BlackList _blackList;
 
         //! widget black-list
         typedef std::map< GtkWidget*, Signal > WidgetMap;

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to