diff options
Diffstat (limited to 'patches/vclplug/vcl-gtk-rtl-fix.diff')
-rw-r--r-- | patches/vclplug/vcl-gtk-rtl-fix.diff | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/patches/vclplug/vcl-gtk-rtl-fix.diff b/patches/vclplug/vcl-gtk-rtl-fix.diff new file mode 100644 index 000000000..0c242023e --- /dev/null +++ b/patches/vclplug/vcl-gtk-rtl-fix.diff @@ -0,0 +1,64 @@ +--- vcl/unx/gtk/window/gtkframe.cxx.bak 2004-11-24 11:28:39.000000000 +0530 ++++ vcl/unx/gtk/window/gtkframe.cxx 2004-11-30 10:51:59.785225136 +0530 +@@ -75,6 +75,8 @@ + #include <dlfcn.h> + #include <soicon.hxx> + ++#include <svapp.hxx> ++ + #ifndef _OSL_PROCESS_H_ + #include <osl/process.h> + #endif +@@ -648,6 +650,8 @@ + #endif + if( m_pParent ) + { ++ if( Application::GetSettings().GetLayoutRTL() ) ++ nX = m_pParent->maGeometry.nWidth-maGeometry.nWidth-1-nX; + nX += m_pParent->maGeometry.nX; + nY += m_pParent->maGeometry.nY; + } +@@ -1380,6 +1384,10 @@ + gdk_display_pointer_ungrab( pThis->getGdkDisplay(), GDK_CURRENT_TIME ); + } + ++ // --- RTL --- (mirror mouse pos) ++ if( Application::GetSettings().GetLayoutRTL() ) ++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; ++ + GTK_YIELD_GRAB(); + + vcl::DeletionListener aDel( pThis ); +@@ -1426,6 +1434,10 @@ + aEvent.mnCode = GetModCode( pSEvent->state ); + aEvent.mbHorz = (pSEvent->direction == GDK_SCROLL_LEFT || pSEvent->direction == GDK_SCROLL_RIGHT); + ++ // --- RTL --- (mirror mouse pos) ++ if( Application::GetSettings().GetLayoutRTL() ) ++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; ++ + GTK_YIELD_GRAB(); + pThis->CallCallback( SALEVENT_WHEELMOUSE, &aEvent ); + +@@ -1442,6 +1454,10 @@ + aEvent.mnCode = GetModCode( pEvent->state ); + aEvent.mnButton = 0; + ++ // --- RTL --- (mirror mouse pos) ++ if( Application::GetSettings().GetLayoutRTL() ) ++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; ++ + GTK_YIELD_GRAB(); + vcl::DeletionListener aDel( pThis ); + +@@ -1484,6 +1500,10 @@ + aEvent.mnBoundWidth = pEvent->area.width; + aEvent.mnBoundHeight = pEvent->area.height; + ++ // --- RTL --- (mirror mouse pos) ++ if( Application::GetSettings().GetLayoutRTL() ) ++ aEvent.mnBoundX = pThis->maGeometry.nWidth-aEvent.mnBoundWidth-aEvent.mnBoundX; ++ + GTK_YIELD_GRAB(); + pThis->CallCallback( SALEVENT_PAINT, &aEvent ); + |