[openoffice.org] extra cast

Caolan McNamara caolanm at fedoraproject.org
Tue Sep 7 09:40:59 UTC 2010


commit 0bfebec8218adc74a7baed9b7da49abe4d057e2f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 7 10:40:57 2010 +0100

    extra cast

 workspace.gtk3.patch |   89 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 54 insertions(+), 35 deletions(-)
---
diff --git a/workspace.gtk3.patch b/workspace.gtk3.patch
index 6af8795..c79b75e 100644
--- a/workspace.gtk3.patch
+++ b/workspace.gtk3.patch
@@ -432,7 +432,17 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                  getDisplay()->getWMAdaptor()->switchToWorkArea( m_pParent->m_nWorkArea );
              
              if( isFloatGrabWindow() &&
-@@ -1363,7 +1372,7 @@
+@@ -1355,7 +1364,8 @@
+             // awesome.
+             bool bHack =
+                 getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") ||
+-                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz")
++                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") ||
++                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Mutter")
+                 ;
+             if( nUserTime == 0 && bHack )
+             {
+@@ -1363,7 +1373,7 @@
                  nUserTime= getDisplay()->GetLastUserEventTime( true );
                  //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
              }
@@ -441,7 +451,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              
              if( bHack && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
                  m_bSetFocusOnMap = true;
-@@ -1472,7 +1481,7 @@
+@@ -1466,7 +1476,7 @@
      {
          m_aMaxSize = Size( nWidth, nHeight );
          // Show does a setMinMaxSize
@@ -450,7 +460,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              setMinMaxSize();
      }
  }
-@@ -1485,7 +1494,7 @@
+@@ -1479,7 +1489,7 @@
          {
              gtk_widget_set_size_request( m_pWindow, nWidth, nHeight );
              // Show does a setMinMaxSize
@@ -459,7 +469,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                  setMinMaxSize();
          }
      }
-@@ -1737,7 +1746,7 @@
+@@ -1731,7 +1741,7 @@
          gtk_widget_realize( m_pWindow );
          // update system data
          GtkSalDisplay* pDisp = getDisplay();
@@ -468,7 +478,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          m_aSystemData.pVisual		= pDisp->GetVisual( m_nScreen ).GetVisual();
          m_aSystemData.nScreen		= nScreen;
          m_aSystemData.nDepth		= pDisp->GetVisual( m_nScreen ).GetDepth();
-@@ -1748,7 +1757,7 @@
+@@ -1742,7 +1752,7 @@
          for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
          {
              if( m_aGraphics[i].bInUse )
@@ -477,7 +487,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          }
          updateScreenNumber();
      }
-@@ -1777,7 +1786,7 @@
+@@ -1771,7 +1781,7 @@
              
              Rectangle aOldScreenRect( pDisp->GetXineramaScreens()[maGeometry.nScreenNumber] );
              Rectangle aNewScreenRect( pDisp->GetXineramaScreens()[nNewScreen] );
@@ -486,7 +496,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              if( bVisible )
                  Show( FALSE );
              maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
-@@ -1809,7 +1818,7 @@
+@@ -1803,7 +1813,7 @@
              {
                  m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
                                                 Size( maGeometry.nWidth, maGeometry.nHeight ) );
@@ -495,7 +505,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                  if( bVisible )
                      Show( FALSE );
                  m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
-@@ -1838,7 +1847,7 @@
+@@ -1836,7 +1846,7 @@
              }
              else
              {
@@ -504,7 +514,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                  if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
                      gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
                  if( bVisible )
-@@ -2052,7 +2061,7 @@
+@@ -2044,7 +2054,7 @@
  		}
  #ifdef ENABLE_DBUS
  		m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation", 
@@ -513,7 +523,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  #endif
  	}
  	else
-@@ -2078,7 +2087,7 @@
+@@ -2070,7 +2080,7 @@
      {
          if( isChild( false, true ) )
              gtk_widget_grab_focus( m_pWindow );
@@ -522,7 +532,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          {
              if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) )
                  gtk_window_present( GTK_WINDOW(m_pWindow) );
-@@ -2087,7 +2096,7 @@
+@@ -2079,7 +2089,7 @@
                  // gdk_window_focus( m_pWindow->window, gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window) );
                  /* #i99360# ugly workaround an X11 library bug */
                  guint32 nUserTime= getDisplay()->GetLastUserEventTime( true );
@@ -531,7 +541,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              }
              /*  need to do an XSetInputFocus here because
               *  gdk_window_focus will ask a EWMH compliant WM to put the focus
-@@ -2099,7 +2108,7 @@
+@@ -2091,7 +2101,7 @@
                  // sad but true: this can cause an XError, we need to catch that
                  // to do this we need to synchronize with the XServer
                  getDisplay()->GetXLib()->PushXErrorLevel( true );
@@ -540,7 +550,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                  XSync( getDisplay()->GetDisplay(), False );
                  getDisplay()->GetXLib()->PopXErrorLevel();
              }
-@@ -2118,7 +2127,7 @@
+@@ -2110,7 +2120,7 @@
      {
          m_ePointerStyle = ePointerStyle;
          GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
@@ -549,7 +559,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          m_pCurrentCursor = pCursor;
          
          // #i80791# use grabPointer the same way as CaptureMouse, respective float grab
-@@ -2153,7 +2162,7 @@
+@@ -2145,7 +2155,7 @@
              {
                  const int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
      
@@ -558,7 +568,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                    (GdkEventMask) nMask, NULL, m_pCurrentCursor,
                                    GDK_CURRENT_TIME );
              }
-@@ -2166,7 +2175,7 @@
+@@ -2158,7 +2168,7 @@
                  // this is of course a bad hack, especially as we cannot
                  // set the right cursor this way
                  XGrabPointer( getDisplay()->GetDisplay(),
@@ -567,7 +577,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                bOwnerEvents,
                                PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
                                GrabModeAsync,
-@@ -2214,7 +2223,7 @@
+@@ -2206,7 +2216,7 @@
      // #i38648# ask for the next motion hint
      gint x, y;
      GdkModifierType mask;
@@ -576,7 +586,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  }
  
  void GtkSalFrame::Flush()
-@@ -2300,7 +2309,7 @@
+@@ -2292,7 +2302,7 @@
  		return NULL;
  
  	X11SalBitmap *pBmp = new X11SalBitmap;
@@ -585,7 +595,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  	if( pBmp->SnapShot( GDK_DISPLAY_XDISPLAY( getGdkDisplay() ),
  						GDK_WINDOW_XID( pWin ) ) )
  		return pBmp;
-@@ -2362,7 +2371,7 @@
+@@ -2354,7 +2364,7 @@
  
  void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nScreen )
  {
@@ -594,7 +604,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
      if( bWasVisible )
          Show( FALSE );
      
-@@ -2407,7 +2416,7 @@
+@@ -2399,7 +2409,7 @@
          m_pIMHandler = NULL;
      }
      if( m_pRegion )
@@ -603,7 +613,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
      if( m_pFixedContainer )
          gtk_widget_destroy( GTK_WIDGET(m_pFixedContainer) );
      if( m_pWindow )
-@@ -2435,7 +2444,7 @@
+@@ -2427,7 +2437,7 @@
      {
          if( m_aGraphics[i].bInUse )
          {
@@ -612,7 +622,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              m_aGraphics[i].pGraphics->SetWindow( m_pWindow );
          }
      }
-@@ -2465,14 +2474,14 @@
+@@ -2457,14 +2467,14 @@
  void GtkSalFrame::ResetClipRegion()
  {
      if( m_pWindow )
@@ -630,7 +640,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  }
  
  void GtkSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
-@@ -2485,14 +2494,14 @@
+@@ -2477,14 +2487,14 @@
          aRect.width		= nWidth;
          aRect.height	= nHeight;
          
@@ -647,7 +657,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  }
  
  bool GtkSalFrame::Dispatch( const XEvent* pEvent )
-@@ -2506,7 +2515,7 @@
+@@ -2498,7 +2508,7 @@
          if( pEvent->xproperty.atom == nDesktopAtom &&
              pEvent->xproperty.state == PropertyNewValue )
          {
@@ -656,7 +666,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          }
      }
      else if( pEvent->type == ConfigureNotify )
-@@ -2533,7 +2542,7 @@
+@@ -2525,7 +2535,7 @@
              int x = 0, y = 0;
              XLIB_Window aChild;
              XTranslateCoordinates( getDisplay()->GetDisplay(),
@@ -665,7 +675,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                     getDisplay()->GetRootWindow( getDisplay()->GetDefaultScreenNumber() ),
                                     0, 0,
                                     &x, &y,
-@@ -2548,7 +2557,7 @@
+@@ -2540,7 +2550,7 @@
      }
      else if( pEvent->type == ClientMessage &&
               pEvent->xclient.message_type == getDisplay()->getWMAdaptor()->getAtom( vcl_sal::WMAdaptor::XEMBED ) &&
@@ -674,7 +684,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
               m_bWindowIsGtkPlug
               )
      {
-@@ -2560,7 +2569,7 @@
+@@ -2552,7 +2562,7 @@
          {
              GdkEventFocus aEvent;
              aEvent.type = GDK_FOCUS_CHANGE;
@@ -683,7 +693,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
              aEvent.send_event = TRUE;
              aEvent.in = (pEvent->xclient.data.l[1] == 1);
              signalFocus( m_pWindow, &aEvent, this );
-@@ -2575,7 +2584,7 @@
+@@ -2567,7 +2577,7 @@
      if( m_hBackgroundPixmap )
      {
          XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
@@ -692,7 +702,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                      None );
          XFreePixmap( getDisplay()->GetDisplay(), m_hBackgroundPixmap );
          m_hBackgroundPixmap = None;
-@@ -2588,7 +2597,7 @@
+@@ -2580,7 +2590,7 @@
          {
              m_hBackgroundPixmap =
                  XCreatePixmap( getDisplay()->GetDisplay(),
@@ -701,7 +711,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                 aSize.Width(),
                                 aSize.Height(),
                                 getDisplay()->GetVisual(m_nScreen).GetDepth() );
-@@ -2604,7 +2613,7 @@
+@@ -2596,7 +2606,7 @@
                                 aTwoRect,
                                 getDisplay()->GetCopyGC(m_nScreen) );
                  XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
@@ -710,7 +720,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                                              m_hBackgroundPixmap );
              }
          }
-@@ -2777,7 +2786,7 @@
+@@ -2769,7 +2779,7 @@
  			// ask for the next hint
  			gint x, y;
  			GdkModifierType mask;
@@ -719,7 +729,16 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
  		}
  	}
  
-@@ -2872,7 +2881,7 @@
+@@ -2854,7 +2864,7 @@
+         XEvent aEvent;
+         aEvent.type					= ClientMessage;
+         aEvent.xclient.display		= getDisplay()->GetDisplay();
+-        aEvent.xclient.window		= GDK_WINDOW_XWINDOW(m_pWindow->window);
++        aEvent.xclient.window		= GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow));
+         aEvent.xclient.message_type	= nStateAtom;
+         aEvent.xclient.format		= 32;
+         aEvent.xclient.data.l[0]	= 1;
+@@ -2904,7 +2914,7 @@
      if( bSetFocus )
      {
          XSetInputFocus( pThis->getDisplay()->GetDisplay(),
@@ -728,7 +747,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                          RevertToParent, CurrentTime );
      }
      
-@@ -2920,7 +2929,7 @@
+@@ -2952,7 +2962,7 @@
       */
      XLIB_Window aChild;
      XTranslateCoordinates( pThis->getDisplay()->GetDisplay(),
@@ -737,7 +756,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
                             pThis->getDisplay()->GetRootWindow( pThis->getDisplay()->GetDefaultScreenNumber() ),
                             0, 0,
                             &x, &y,
-@@ -2954,7 +2963,7 @@
+@@ -2986,7 +2996,7 @@
      if( ! (pThis->m_nStyle & SAL_FRAME_STYLE_PLUG) )
      {
          GdkRectangle aRect;
@@ -746,7 +765,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
          pThis->maGeometry.nTopDecoration	= y - aRect.y;
          pThis->maGeometry.nBottomDecoration	= aRect.y + aRect.height - y - pEvent->height;
          pThis->maGeometry.nLeftDecoration	= x - aRect.x;
-@@ -3165,7 +3174,7 @@
+@@ -3197,7 +3207,7 @@
      *  some time on the Xserver as well as prevent
      *  some paint issues
      */
@@ -755,7 +774,7 @@ diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/g
      if( pWin )
      {
          XLIB_Window aWin = GDK_WINDOW_XWINDOW(pWin);
-@@ -3269,7 +3278,7 @@
+@@ -3301,7 +3311,7 @@
                            G_CALLBACK (signalIMPreeditEnd), this );
  
          m_pFrame->getDisplay()->GetXLib()->PushXErrorLevel( true );


More information about the scm-commits mailing list