Commits

Philipp Lohmann [pl]  committed 7f61cf8

ooo33gsl12: #i115107# do not call getNativeControlRegion during paint on gtk

  • Participants
  • Parent commits f6274c4

Comments (0)

Files changed (5)

File vcl/inc/vcl/svdata.hxx

                                                           // window background before drawing the native
                                                           // checkbox
     bool                    mbScrollbarJumpPage;          // true for "jump to here" behavior
+    bool                    mbCanDrawWidgetAnySize;       // set to true currently on gtk
+                                                          // signals that widgets can be drawn in any size and
+                                                          // brdwin.cxx ImplSmallBorderWindowView::DrawWindow
+                                                          // should not do GetNativeControlRegion
 };
 
 

File vcl/source/app/svdata.cxx

     // init global instance data
     memset( pImplSVData, 0, sizeof( ImplSVData ) );
     pImplSVData->maHelpData.mbAutoHelpId = sal_True;
-    pImplSVData->maHelpData.mbAutoHelpId = sal_True;
     pImplSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT );
 
     // find out whether we are running in the testtool

File vcl/source/control/spinfld.cxx

             Size aSize( pBorder->GetOutputSizePixel() );    // the size of the border window, i.e., the whole control
             Rectangle aBound, aContent;
             Rectangle aNatRgn( aPt, aSize );
-            if( pBorder->GetNativeControlRegion(CTRL_SPINBOX, PART_ENTIRE_CONTROL,
-                    aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
+            if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+                pBorder->GetNativeControlRegion( CTRL_SPINBOX, PART_ENTIRE_CONTROL,
+                                                 aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
             {
                 aSize = aContent.GetSize();
             }

File vcl/source/window/brdwin.cxx

         
         Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
         Rectangle aContentRgn( aCtrlRegion );
-        if(pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
-            nState, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn ))
+        if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+            pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
+                                          nState, aControlValue, rtl::OUString(),
+                                          aBoundingRgn, aContentRgn ))
         {
             aCtrlRegion=aContentRgn;
         }

File vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx

     // open first menu on F10
     pSVData->maNWFData.mbOpenMenuOnF10 = true;
     
+    // omit GetNativeControl while painting (see brdwin.cxx)
+    pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
+    
     int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
     gWidgetData = std::vector<NWFWidgetData>( nScreens );
     for( int i = 0; i < nScreens; i++ )