vcl/source/gdi/metaact.cxx                      |    3 +++
 vcl/unx/generic/window/screensaverinhibitor.cxx |   12 +++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 4a8a24be5a378308680a0b6e2e246d5d9df414c4
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon May 8 10:43:07 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue May 9 11:20:08 2023 +0200

    Related: tdf#142176 document what the other inhibit options are
    
    via an enum like the gtk one so it can be seen how to inhibit logging
    out due to unsaved changes
    
    Change-Id: I07609cfb7a97b5b6c1b94a09b7b79bcca308d5d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151559
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx 
b/vcl/unx/generic/window/screensaverinhibitor.cxx
index ec19fad09e5d..a2274028b526 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -207,6 +207,16 @@ void ScreenSaverInhibitor::inhibitFDOPM( bool bInhibit, 
const char* appname, con
 #endif // ENABLE_GIO
 }
 
+#if ENABLE_GIO
+enum ApplicationInhibitFlags
+{
+    APPLICATION_INHIBIT_LOGOUT  = (1 << 0),
+    APPLICATION_INHIBIT_SWITCH  = (1 << 1),
+    APPLICATION_INHIBIT_SUSPEND = (1 << 2),
+    APPLICATION_INHIBIT_IDLE    = (1 << 3) // Inhibit the session being marked 
as idle
+};
+#endif
+
 void ScreenSaverInhibitor::inhibitGSM( bool bInhibit, const char* appname, 
const char* reason, const unsigned int xid )
 {
 #if ENABLE_GIO
@@ -218,7 +228,7 @@ void ScreenSaverInhibitor::inhibitGSM( bool bInhibit, const 
char* appname, const
                                                                   appname,
                                                                   xid,
                                                                   reason,
-                                                                  8 //Inhibit 
the session being marked as idle
+                                                                  
APPLICATION_INHIBIT_IDLE
                                                                  ),
                                                     G_DBUS_CALL_FLAGS_NONE, 
-1, nullptr, &error );
                  },
commit b7ec54b7c6e85d507066442de3b7398f34bbb653
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue May 9 08:45:34 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue May 9 11:19:57 2023 +0200

    ofz#58756 Integer-overflow
    
    Change-Id: Ie2782c1d68f73e5e88cf868eb1ce106ec0c181b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151558
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 107972fe8765..22093a95735e 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -973,6 +973,9 @@ MetaBmpScalePartAction::MetaBmpScalePartAction( const 
Point& rDstPt, const Size&
 
 void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
 {
+    if (!AllowRect(pOut->LogicToPixel(tools::Rectangle(maDstPt, maDstSz))))
+        return;
+
     pOut->DrawBitmap( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp );
 }
 

Reply via email to