[Libreoffice-commits] .: patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Mon Nov 1 09:23:55 PDT 2010
patches/dev300/apply | 4 -
patches/dev300/vcl-disable-mouse-grab.diff | 116 -----------------------------
2 files changed, 120 deletions(-)
New commits:
commit 1c8a1d7f8e20fe306e71d3b0618c5e715a2839c8
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Mon Nov 1 17:23:28 2010 +0100
Moved patch to git
diff --git a/patches/dev300/apply b/patches/dev300/apply
index b5b657a..787fdd9 100755
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1891,10 +1891,6 @@ sd-slideshow-slideshowview-transformation-fix.diff, rodo
# version compat distinction?
sd-custom-show-fix.diff, n#355638, i#90145, thorsten
-# apply this patch if you need to disable vcl grabbing your mouse -
-# after applying the patch, set SAL_NO_MOUSEGRABS in your env
-#vcl-disable-mouse-grab.diff
-
# temporary fix. does no harm and gets the job done but its not
# beautiful. Since the whole section needs to be refactored anyway decided not
# to waste for time with this fix but to focus on the refactoring
diff --git a/patches/dev300/vcl-disable-mouse-grab.diff b/patches/dev300/vcl-disable-mouse-grab.diff
deleted file mode 100644
index e82db35..0000000
--- a/patches/dev300/vcl-disable-mouse-grab.diff
+++ /dev/null
@@ -1,116 +0,0 @@
---- vcl/unx/gtk/window/gtkframe.cxx 2008-04-15 15:28:46.000000000 +0200
-+++ vcl/unx/gtk/window/gtkframe.cxx 2008-05-10 14:20:37.000000000 +0200
-@@ -2061,6 +2061,8 @@
-
- void GtkSalFrame::grabPointer( BOOL bGrab, BOOL bOwnerEvents )
- {
-+ static const char* pEnv = getenv( "SAL_NO_MOUSEGRABS" );
-+
- if( m_pWindow )
- {
- if( bGrab )
-@@ -2083,9 +2085,10 @@
- {
- const int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
-
-- gdk_pointer_grab( m_pWindow->window, bOwnerEvents,
-- (GdkEventMask) nMask, NULL, m_pCurrentCursor,
-- GDK_CURRENT_TIME );
-+ if( !pEnv || !*pEnv )
-+ gdk_pointer_grab( m_pWindow->window, bOwnerEvents,
-+ (GdkEventMask) nMask, NULL, m_pCurrentCursor,
-+ GDK_CURRENT_TIME );
- }
- else
- {
-@@ -2095,23 +2098,25 @@
- //
- // this is of course a bad hack, especially as we cannot
- // set the right cursor this way
-- XGrabPointer( getDisplay()->GetDisplay(),
-- GDK_WINDOW_XWINDOW( m_pWindow->window),
-- bOwnerEvents,
-- PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
-- GrabModeAsync,
-- GrabModeAsync,
-- None,
-- None,
-- CurrentTime
-- );
-+ if( !pEnv || !*pEnv )
-+ XGrabPointer( getDisplay()->GetDisplay(),
-+ GDK_WINDOW_XWINDOW( m_pWindow->window),
-+ bOwnerEvents,
-+ PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
-+ GrabModeAsync,
-+ GrabModeAsync,
-+ None,
-+ None,
-+ CurrentTime
-+ );
-
- }
- }
- else
- {
- // Two GdkDisplays may be open
-- gdk_display_pointer_ungrab( getGdkDisplay(), GDK_CURRENT_TIME);
-+ if( !pEnv || !*pEnv )
-+ gdk_display_pointer_ungrab( getGdkDisplay(), GDK_CURRENT_TIME);
- }
- }
- }
---- vcl/unx/source/app/saldisp.cxx 2008-04-11 11:48:34.000000000 +0200
-+++ vcl/unx/source/app/saldisp.cxx 2008-05-10 14:18:29.000000000 +0200
-@@ -2139,10 +2174,13 @@
-
- int SalDisplay::CaptureMouse( SalFrame *pCapture )
- {
-+ static const char* pEnv = getenv( "SAL_NO_MOUSEGRABS" );
-+
- if( !pCapture )
- {
- m_pCapture = NULL;
-- XUngrabPointer( GetDisplay(), CurrentTime );
-+ if( !pEnv || !*pEnv )
-+ XUngrabPointer( GetDisplay(), CurrentTime );
- XFlush( GetDisplay() );
- return 0;
- }
-@@ -2151,20 +2189,23 @@
-
- // FIXME: get rid of X11SalFrame
- const SystemEnvData* pEnvData = pCapture->GetSystemData();
-- int ret = XGrabPointer( GetDisplay(),
-- (XLIB_Window)pEnvData->aWindow,
-- False,
-- PointerMotionMask| ButtonPressMask|ButtonReleaseMask,
-- GrabModeAsync,
-- GrabModeAsync,
-- None,
-- static_cast<X11SalFrame*>(pCapture)->GetCursor(),
-- CurrentTime );
--
-- if( ret != GrabSuccess )
-+ if( !pEnv || !*pEnv )
- {
-- DBG_ASSERT( 1, "SalDisplay::CaptureMouse could not grab pointer\n");
-- return -1;
-+ int ret = XGrabPointer( GetDisplay(),
-+ (XLIB_Window)pEnvData->aWindow,
-+ False,
-+ PointerMotionMask| ButtonPressMask|ButtonReleaseMask,
-+ GrabModeAsync,
-+ GrabModeAsync,
-+ None,
-+ static_cast<X11SalFrame*>(pCapture)->GetCursor(),
-+ CurrentTime );
-+
-+ if( ret != GrabSuccess )
-+ {
-+ DBG_ASSERT( 1, "SalDisplay::CaptureMouse could not grab pointer\n");
-+ return -1;
-+ }
- }
-
- m_pCapture = pCapture;
More information about the Libreoffice-commits
mailing list