diff options
author | vjinoch <elianoss@gmail.com> | 2013-04-12 17:19:44 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-04-12 18:04:11 +0100 |
commit | a1cd39a17216d78b4f335e6301786e205be14d0d (patch) | |
tree | dc6818b5b2a6e28c116ab69a9e982f6016e2e62f | |
parent | d8dbe5844b192f1339a3d38e0f477c5330c89194 (diff) |
fdo#60690 - Remove all calls t GTK_YIELD_GRAB because it does nothing.
Change-Id: I76e76ec5fc85d8e1fd673a45b3e54163ca7643f3
-rw-r--r-- | vcl/inc/unx/gtk/gtkinst.hxx | 22 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtkdata.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gloactiongroup.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 25 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkobject.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalmenu.cxx | 2 |
6 files changed, 2 insertions, 56 deletions
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index eb6531853d80..6e358331e8fe 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -39,36 +39,18 @@ class GenPspGraphics; class GtkYieldMutex : public SalYieldMutex { std::list<sal_uLong> aYieldStack; + public: GtkYieldMutex(); virtual void acquire(); virtual void release(); virtual sal_Bool tryToAcquire() { return SalYieldMutex::tryToAcquire(); } - virtual int Grab() { return 0; }; - virtual void Ungrab(int ) {}; - void ThreadsEnter(); void ThreadsLeave(); - - class GtkYieldGuard - { - GtkYieldMutex* m_pMutex; - int m_nGrab; - public: - GtkYieldGuard( GtkYieldMutex* pMutex ) - : m_pMutex( pMutex ) - { - m_nGrab = m_pMutex->Grab(); - } - ~GtkYieldGuard() - { - m_pMutex->Ungrab( m_nGrab ); - } - }; }; -#define GTK_YIELD_GRAB() GtkYieldMutex::GtkYieldGuard aLocalGtkYieldGuard( static_cast<GtkYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex()) ) + class GtkSalTimer; #if GTK_CHECK_VERSION(3,0,0) diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index dac0f28f4105..59eb593009ad 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -136,8 +136,6 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event, CallEventCallback( pEvent, sizeof( XEvent ) ) ) aFilterReturn = GDK_FILTER_REMOVE; - GTK_YIELD_GRAB(); - if (GetDisplay() == pEvent->xany.display ) { // #i53471# gtk has no callback mechanism that lets us be notified diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx index f2effd7fccc8..cce66c87c28f 100644 --- a/vcl/unx/gtk/window/gloactiongroup.cxx +++ b/vcl/unx/gtk/window/gloactiongroup.cxx @@ -166,8 +166,6 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group, const gchar *action_name, GVariant *state) { - GTK_YIELD_GRAB(); - GtkSalFrame* pFrame = group->priv->frame; if (pFrame == NULL) @@ -239,8 +237,6 @@ g_lo_action_group_activate (GActionGroup *group, const gchar *action_name, GVariant *parameter) { - GTK_YIELD_GRAB(); - GLOActionGroup *lo_group = G_LO_ACTION_GROUP (group); GtkSalFrame *pFrame = lo_group->priv->frame; diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index efd6c13800d8..5b039ffb0069 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -2957,8 +2957,6 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer gdk_display_pointer_ungrab( pThis->getGdkDisplay(), GDK_CURRENT_TIME ); } - GTK_YIELD_GRAB(); - if( pThis->m_bWindowIsGtkPlug && pEvent->type == GDK_BUTTON_PRESS && pEvent->button == 1 ) @@ -3028,8 +3026,6 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame aEvent.mnCode = GetMouseModCode( pSEvent->state ); aEvent.mbHorz = (pSEvent->direction == GDK_SCROLL_LEFT || pSEvent->direction == GDK_SCROLL_RIGHT); - GTK_YIELD_GRAB(); - // --- RTL --- (mirror mouse pos) if( Application::GetSettings().GetLayoutRTL() ) aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; @@ -3050,9 +3046,6 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer aEvent.mnCode = GetMouseModCode( pEvent->state ); aEvent.mnButton = 0; - - GTK_YIELD_GRAB(); - // --- RTL --- (mirror mouse pos) if( Application::GetSettings().GetLayoutRTL() ) aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX; @@ -3094,7 +3087,6 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi aEvent.mnCode = GetMouseModCode( pEvent->state ); aEvent.mnButton = 0; - GTK_YIELD_GRAB(); pThis->CallCallback( (pEvent->type == GDK_ENTER_NOTIFY) ? SALEVENT_MOUSEMOVE : SALEVENT_MOUSELEAVE, &aEvent ); return sal_True; @@ -3245,8 +3237,6 @@ gboolean GtkSalFrame::signalDraw( GtkWidget*, cairo_t *cr, gpointer frame ) double x1 = 0.0, y1 = 0.0, x2 = 0.0, y2 = 0.0; cairo_clip_extents (cr, &x1, &y1, &x2, &y2); - GTK_YIELD_GRAB(); - if (debugQueuePureRedraw > 0) { debugQueuePureRedraw--; @@ -3289,7 +3279,6 @@ gboolean GtkSalFrame::signalExpose( GtkWidget*, GdkEventExpose* pEvent, gpointer struct SalPaintEvent aEvent( pEvent->area.x, pEvent->area.y, pEvent->area.width, pEvent->area.height ); - GTK_YIELD_GRAB(); pThis->CallCallback( SALEVENT_PAINT, &aEvent ); return sal_False; @@ -3299,8 +3288,6 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f { GtkSalFrame* pThis = (GtkSalFrame*)frame; - GTK_YIELD_GRAB(); - X11SalInstance *pSalInstance = static_cast< X11SalInstance* >(GetSalData()->m_pInstance); @@ -3336,8 +3323,6 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame ) { GtkSalFrame* pThis = (GtkSalFrame*)frame; - GTK_YIELD_GRAB(); - bool bSetFocus = pThis->m_bSetFocusOnMap; pThis->m_bSetFocusOnMap = false; @@ -3365,7 +3350,6 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame ) { GtkSalFrame* pThis = (GtkSalFrame*)frame; - GTK_YIELD_GRAB(); pThis->CallCallback( SALEVENT_RESIZE, NULL ); return sal_False; @@ -3445,7 +3429,6 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp if( bSized ) pThis->AllocateFrame(); - GTK_YIELD_GRAB(); if( bMoved && bSized ) pThis->CallCallback( SALEVENT_MOVERESIZE, NULL ); else if( bMoved ) @@ -3467,7 +3450,6 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame if( pThis->m_pIMHandler->handleKeyEvent( pEvent ) ) return sal_True; } - GTK_YIELD_GRAB(); // handle modifiers if( pEvent->keyval == GDK_Shift_L || pEvent->keyval == GDK_Shift_R || @@ -3577,7 +3559,6 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame ) { GtkSalFrame* pThis = (GtkSalFrame*)frame; - GTK_YIELD_GRAB(); pThis->CallCallback( SALEVENT_CLOSE, NULL ); return sal_True; @@ -3948,10 +3929,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p SolarMutexGuard aGuard; vcl::DeletionListener aDel( pThis->m_pFrame ); - // open a block that will end the GTK_YIELD_GRAB before calling preedit changed again { - GTK_YIELD_GRAB(); - const bool bWasPreedit = (pThis->m_aInputEvent.mpTextAttr != 0) || pThis->m_bPreeditJustChanged; @@ -4115,8 +4093,6 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ g_free( pText ); pango_attr_list_unref( pAttrs ); - GTK_YIELD_GRAB(); - SolarMutexGuard aGuard; vcl::DeletionListener aDel( pThis->m_pFrame ); @@ -4134,7 +4110,6 @@ void GtkSalFrame::IMHandler::signalIMPreeditStart( GtkIMContext*, gpointer /*im_ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_handler ) { GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler; - GTK_YIELD_GRAB(); pThis->m_bPreeditJustChanged = true; diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx index 809c212ede2f..b0fa39a5f551 100644 --- a/vcl/unx/gtk/window/gtkobject.cxx +++ b/vcl/unx/gtk/window/gtkobject.cxx @@ -178,7 +178,6 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe if( pEvent->type == GDK_BUTTON_PRESS ) { - GTK_YIELD_GRAB(); pThis->CallCallback( SALOBJ_EVENT_TOTOP, NULL ); } @@ -189,8 +188,6 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer { GtkSalObject* pThis = (GtkSalObject*)object; - GTK_YIELD_GRAB(); - pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, NULL ); return FALSE; diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx index 688fda4a9419..5ca2e47d84ed 100644 --- a/vcl/unx/gtk/window/gtksalmenu.cxx +++ b/vcl/unx/gtk/window/gtksalmenu.cxx @@ -403,7 +403,6 @@ GtkSalMenu::GtkSalMenu( sal_Bool bMenuBar ) : GtkSalMenu::~GtkSalMenu() { SolarMutexGuard aGuard; - //GTK_YIELD_GRAB(); if ( mbMenuBar == sal_True ) { @@ -457,7 +456,6 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig void GtkSalMenu::SetFrame( const SalFrame* pFrame ) { SolarMutexGuard aGuard; - GTK_YIELD_GRAB(); assert(mbMenuBar); SAL_INFO("vcl.unity", "GtkSalMenu set to frame"); |