[ooo-build-commit] 3 commits - patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Thu Nov 5 09:53:21 PST 2009


 patches/dev300/apply                         |    5 
 patches/dev300/gnome-screen-saver.diff       |  168 +++++++++++++++++++++++++++
 patches/dev300/toolkit-proper-erase-fix.diff |   48 +++++++
 3 files changed, 221 insertions(+)

New commits:
commit 90567f76262862d01e90f58b96521c1fdabf18cd
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Nov 5 18:30:21 2009 +0100

    Erase is useless when done on copy
    
    * patches/dev300/toolkit-proper-erase-fix.diff: updated fix to not
      only erase correctly, but also on the right instance - pass
      parameter by reference

diff --git a/patches/dev300/toolkit-proper-erase-fix.diff b/patches/dev300/toolkit-proper-erase-fix.diff
index 9ef81fc..ce26717 100644
--- a/patches/dev300/toolkit-proper-erase-fix.diff
+++ b/patches/dev300/toolkit-proper-erase-fix.diff
@@ -5,15 +5,24 @@ From: dcb314 at openoffice.org
 
 ---
 
- toolkit/source/layout/core/box-base.cxx |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
+ toolkit/source/layout/core/box-base.cxx |    5 +++--
+ toolkit/source/layout/core/box-base.hxx |    2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
 
 
 diff --git toolkit/source/layout/core/box-base.cxx toolkit/source/layout/core/box-base.cxx
-index f03cd5c..72a808d 100644
+index f03cd5c..37b02b2 100644
 --- toolkit/source/layout/core/box-base.cxx
 +++ toolkit/source/layout/core/box-base.cxx
-@@ -115,8 +115,9 @@ Box_Base::removeChildData( std::list< ChildData* > lst, css::uno::Reference< css
+@@ -108,15 +108,16 @@ Box_Base::addChild (uno::Reference <awt::XLayoutConstrains> const& xChild)
+ }
+ 
+ Box_Base::ChildData*
+-Box_Base::removeChildData( std::list< ChildData* > lst, css::uno::Reference< css::awt::XLayoutConstrains > const& xChild )
++Box_Base::removeChildData( std::list< ChildData* >& lst, css::uno::Reference< css::awt::XLayoutConstrains > const& xChild )
+ {
+     for ( std::list< ChildData* >::iterator it = lst.begin();
+           it != lst.end(); it++ )
      {
          if ( (*it)->mxChild == xChild )
          {
@@ -24,3 +33,16 @@ index f03cd5c..72a808d 100644
          }
      }
      return 0;
+diff --git toolkit/source/layout/core/box-base.hxx toolkit/source/layout/core/box-base.hxx
+index 67365a3..f6d84c5 100644
+--- toolkit/source/layout/core/box-base.hxx
++++ toolkit/source/layout/core/box-base.hxx
+@@ -66,7 +66,7 @@ protected:
+     virtual ChildData *createChild( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ) = 0;
+     virtual ChildProps *createChildProps( ChildData* pData ) = 0;
+     
+-    ChildData *removeChildData( std::list< ChildData *>, css::uno::Reference< css::awt::XLayoutConstrains > const& Child );
++    ChildData *removeChildData( std::list< ChildData *>&, css::uno::Reference< css::awt::XLayoutConstrains > const& Child );
+     
+ public:
+     void AddChild( const css::uno::Reference< css::awt::XLayoutConstrains >& Child);
commit 062280e20c651d8d42a61a01ad17ebe2dc5b54f3
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Nov 4 12:23:04 2009 +0100

    Fix erasing elements in toolkit layout code
    
    * patches/dev300/apply: added the patch
    * patches/dev300/toolkit-proper-erase-fix.diff: patch from dcb314 to
      store copy of pointer, before invalidating iterator via list::erase

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c66d275..428ddee 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3370,6 +3370,7 @@ unoxml-fix-empty-xmlns.diff, rodo
 configure-fix-lpsolve-depends.diff, janneke
 configure-fix-use-c++-for-mythes.diff, janneke
 build-fix-xulrunner-npapi-inc.diff, janneke
+toolkit-proper-erase-fix.diff, i#106575, thorsten
 
 [ Fixes ]
 # fix incorrect background color of text frame
diff --git a/patches/dev300/toolkit-proper-erase-fix.diff b/patches/dev300/toolkit-proper-erase-fix.diff
new file mode 100644
index 0000000..9ef81fc
--- /dev/null
+++ b/patches/dev300/toolkit-proper-erase-fix.diff
@@ -0,0 +1,26 @@
+Backup ptr before erasing from list fix
+
+From: dcb314 at openoffice.org
+
+
+---
+
+ toolkit/source/layout/core/box-base.cxx |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+
+diff --git toolkit/source/layout/core/box-base.cxx toolkit/source/layout/core/box-base.cxx
+index f03cd5c..72a808d 100644
+--- toolkit/source/layout/core/box-base.cxx
++++ toolkit/source/layout/core/box-base.cxx
+@@ -115,8 +115,9 @@ Box_Base::removeChildData( std::list< ChildData* > lst, css::uno::Reference< css
+     {
+         if ( (*it)->mxChild == xChild )
+         {
++            ChildData* pRet = *it;
+             lst.erase( it );
+-            return *it;
++            return pRet;
+         }
+     }
+     return 0;
commit a41b42862f2e380820e1eabfd25ca234bfe9c6b8
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Mon Nov 2 12:11:43 2009 +0100

    Added Caolan's screensaver update patch from i#106372
    
    * patches/dev300/apply: added new section GnomeSessionManagement
    * patches/dev300/gnome-screen-saver.diff: the patch from the upstream
      issue

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2b0acf0..c66d275 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -54,6 +54,7 @@ Localize : LocalizeFixes
 # FIXME: Get this cleaned up
 Extensions : ExtensionFixes
 UnstableWP : UnstableLibwpd
+Gnome2-26 : GnomeSessionManagement
 
 # Novell
 NovellBase : LinuxCommon, NovellOnly, NovellOnlyUnix, \
@@ -3395,3 +3396,6 @@ win32-dont-attempt-restart.diff, n#524250, tml
 
 [ SystemGraphiteWithSTLport ]
 vcl-system-graphite-with-stlport.diff, #i106157
+
+[ GnomeSessionManagement ]
+gnome-screen-saver.diff, i#106372, cmc
diff --git a/patches/dev300/gnome-screen-saver.diff b/patches/dev300/gnome-screen-saver.diff
new file mode 100644
index 0000000..285b375
--- /dev/null
+++ b/patches/dev300/gnome-screen-saver.diff
@@ -0,0 +1,168 @@
+Gnome session management patch from Caolan
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ vcl/unx/gtk/window/gtkframe.cxx      |   51 ++++++++++++++++++----------------
+ vcl/unx/inc/plugins/gtk/gtkframe.hxx |    2 +
+ 2 files changed, 28 insertions(+), 25 deletions(-)
+
+
+diff --git vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
+index 7f0417e..707be14 100644
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -70,9 +70,9 @@
+ #ifdef ENABLE_DBUS
+ #include <dbus/dbus-glib.h>
+ 
+-#define GSS_DBUS_SERVICE        "org.gnome.ScreenSaver"
+-#define GSS_DBUS_PATH           "/org/gnome/ScreenSaver"
+-#define GSS_DBUS_INTERFACE      "org.gnome.ScreenSaver"
++#define GSM_DBUS_SERVICE        "org.gnome.SessionManager"
++#define GSM_DBUS_PATH           "/org/gnome/SessionManager"
++#define GSM_DBUS_INTERFACE      "org.gnome.SessionManager"
+ #endif
+ 
+ // make compile on gtk older than 2.10
+@@ -567,7 +567,7 @@ void GtkSalFrame::InitCommon()
+     m_pIMHandler		= NULL;
+     m_hBackgroundPixmap = None;
+     m_nSavedScreenSaverTimeout = 0;
+-    m_nGSSCookie = 0;
++    m_nGSMCookie = 0;
+     m_nExtStyle         = 0;
+     m_pRegion           = NULL;
+     m_ePointerStyle     = 0xffff;
+@@ -1912,8 +1912,9 @@ void GtkSalFrame::setAutoLock( bool bLock )
+ #ifdef ENABLE_DBUS
+ /** cookie is returned as an unsigned integer */
+ static guint
+-dbus_inhibit_gss (const gchar *appname,
+-                  const gchar *reason)
++dbus_inhibit_gsm (const gchar *appname,
++                  const gchar *reason,
++                  guint xid)
+ {
+         gboolean         res;
+         guint            cookie;
+@@ -1929,20 +1930,22 @@ dbus_inhibit_gss (const gchar *appname,
+                 return -1;
+         }
+ 
+-        /* get the proxy with gnome-screensaver */
++        /* get the proxy with gnome-session-manager */
+         proxy = dbus_g_proxy_new_for_name (session_connection,
+-                                           GSS_DBUS_SERVICE,
+-                                           GSS_DBUS_PATH,
+-                                           GSS_DBUS_INTERFACE);
++                                           GSM_DBUS_SERVICE,
++                                           GSM_DBUS_PATH,
++                                           GSM_DBUS_INTERFACE);
+         if (proxy == NULL) {
+-                g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
++                g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
+                 return -1;
+         }
+ 
+         res = dbus_g_proxy_call (proxy,
+                                  "Inhibit", &error,
+                                  G_TYPE_STRING, appname,
++                                 G_TYPE_UINT, xid,
+                                  G_TYPE_STRING, reason,
++                                 G_TYPE_UINT, 8, //Inhibit the session being marked as idle
+                                  G_TYPE_INVALID,
+                                  G_TYPE_UINT, &cookie,
+                                  G_TYPE_INVALID);
+@@ -1965,15 +1968,14 @@ dbus_inhibit_gss (const gchar *appname,
+ }
+ 
+ static void
+-dbus_uninhibit_gss (guint cookie)
++dbus_uninhibit_gsm (guint cookie)
+ {
+         gboolean         res;
+         GError          *error = NULL;
+         DBusGProxy      *proxy = NULL;
+         DBusGConnection *session_connection = NULL;
+ 
+-        /* cookies have to be positive as unsigned */
+-        if (cookie < 0) {
++        if (cookie == guint(-1)) {
+                 g_warning ("Invalid cookie");
+                 return;
+         }
+@@ -1986,18 +1988,18 @@ dbus_uninhibit_gss (guint cookie)
+                 return;
+         }
+ 
+-        /* get the proxy with gnome-screensaver */
++        /* get the proxy with gnome-session-manager */
+         proxy = dbus_g_proxy_new_for_name (session_connection,
+-                                           GSS_DBUS_SERVICE,
+-                                           GSS_DBUS_PATH,
+-                                           GSS_DBUS_INTERFACE);
++                                           GSM_DBUS_SERVICE,
++                                           GSM_DBUS_PATH,
++                                           GSM_DBUS_INTERFACE);
+         if (proxy == NULL) {
+-                g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
++                g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
+                 return;
+         }
+ 
+         res = dbus_g_proxy_call (proxy,
+-                                 "UnInhibit",
++                                 "Uninhibit",
+                                  &error,
+                                  G_TYPE_UINT, cookie,
+                                  G_TYPE_INVALID,
+@@ -2005,12 +2007,12 @@ dbus_uninhibit_gss (guint cookie)
+ 
+         /* check the return value */
+         if (! res) {
+-                g_warning ("UnInhibit method failed");
++                g_warning ("Uninhibit method failed");
+         }
+ 
+         /* check the error value */
+         if (error != NULL) {
+-                g_warning ("Inhibit problem : %s", error->message);
++                g_warning ("Uninhibit problem : %s", error->message);
+                 g_error_free (error);
+                 cookie = -1;
+         }
+@@ -2038,7 +2040,8 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
+                              bPreferBlanking, bAllowExposures );
+         }
+ #ifdef ENABLE_DBUS
+-        m_nGSSCookie = dbus_inhibit_gss(g_get_application_name(), "presentation");
++		m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation", 
++                    GDK_WINDOW_XID(m_pWindow->window));
+ #endif
+     }
+     else
+@@ -2049,7 +2052,7 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
+                              bAllowExposures );
+         m_nSavedScreenSaverTimeout = 0;
+ #ifdef ENABLE_DBUS
+-        dbus_uninhibit_gss(m_nGSSCookie);
++		dbus_uninhibit_gsm(m_nGSMCookie);
+ #endif
+     }
+ }
+diff --git vcl/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkframe.hxx
+index afd258b..990a515 100644
+--- vcl/unx/inc/plugins/gtk/gtkframe.hxx
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx
+@@ -180,7 +180,7 @@ class GtkSalFrame : public SalFrame
+     GdkVisibilityState              m_nVisibility;
+     PointerStyle                    m_ePointerStyle;
+     int                             m_nSavedScreenSaverTimeout;
+-    guint                           m_nGSSCookie;
++    guint                           m_nGSMCookie;
+     int                             m_nWorkArea;
+     bool                            m_bFullscreen;
+     bool                            m_bSingleAltPress;


More information about the ooo-build-commit mailing list