Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3357
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/57/3357/1
fdo#60690 Remove of all call GTK_YIELD_GRAB because it do nothing.
Change-Id: I76e76ec5fc85d8e1fd673a45b3e54163ca7643f3
---
M vcl/inc/unx/gtk/gtkinst.hxx
M vcl/unx/gtk/app/gtkdata.cxx
M vcl/unx/gtk/window/gloactiongroup.cxx
M vcl/unx/gtk/window/gtkframe.cxx
M vcl/unx/gtk/window/gtkobject.cxx
M vcl/unx/gtk/window/gtksalmenu.cxx
6 files changed, 3 insertions(+), 56 deletions(-)
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index a163633..ad9442a 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -38,38 +38,20 @@
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 ) {};
-
- std::list<sal_uLong> aYieldStack;
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 36b0ec8..b10da87 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -137,8 +137,6 @@
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 b7fd592..d5cc294 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -168,8 +168,6 @@
const gchar *action_name,
GVariant *state)
{
- GTK_YIELD_GRAB();
-
GtkSalFrame* pFrame = group->priv->frame;
if (pFrame == NULL)
@@ -241,8 +239,6 @@
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 9433ae5..3c31b00 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2952,8 +2952,6 @@
gdk_display_pointer_ungrab( pThis->getGdkDisplay(), GDK_CURRENT_TIME );
}
- GTK_YIELD_GRAB();
-
if( pThis->m_bWindowIsGtkPlug &&
pEvent->type == GDK_BUTTON_PRESS &&
pEvent->button == 1 )
@@ -3023,8 +3021,6 @@
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;
@@ -3044,9 +3040,6 @@
aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
aEvent.mnCode = GetMouseModCode( pEvent->state );
aEvent.mnButton = 0;
-
-
- GTK_YIELD_GRAB();
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
@@ -3089,7 +3082,6 @@
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;
@@ -3240,8 +3232,6 @@
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--;
@@ -3284,7 +3274,6 @@
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;
@@ -3293,8 +3282,6 @@
gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer frame )
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
-
- GTK_YIELD_GRAB();
X11SalInstance *pSalInstance =
static_cast< X11SalInstance* >(GetSalData()->m_pInstance);
@@ -3331,8 +3318,6 @@
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
- GTK_YIELD_GRAB();
-
bool bSetFocus = pThis->m_bSetFocusOnMap;
pThis->m_bSetFocusOnMap = false;
@@ -3360,7 +3345,6 @@
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
- GTK_YIELD_GRAB();
pThis->CallCallback( SALEVENT_RESIZE, NULL );
return sal_False;
@@ -3440,7 +3424,6 @@
if( bSized )
pThis->AllocateFrame();
- GTK_YIELD_GRAB();
if( bMoved && bSized )
pThis->CallCallback( SALEVENT_MOVERESIZE, NULL );
else if( bMoved )
@@ -3462,7 +3445,6 @@
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 ||
@@ -3572,7 +3554,6 @@
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
- GTK_YIELD_GRAB();
pThis->CallCallback( SALEVENT_CLOSE, NULL );
return sal_True;
@@ -3945,8 +3926,6 @@
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;
@@ -4110,8 +4089,6 @@
g_free( pText );
pango_attr_list_unref( pAttrs );
- GTK_YIELD_GRAB();
-
SolarMutexGuard aGuard;
vcl::DeletionListener aDel( pThis->m_pFrame );
@@ -4129,7 +4106,6 @@
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 809c212..b0fa39a 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -178,7 +178,6 @@
if( pEvent->type == GDK_BUTTON_PRESS )
{
- GTK_YIELD_GRAB();
pThis->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
}
@@ -188,8 +187,6 @@
gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer object )
{
GtkSalObject* pThis = (GtkSalObject*)object;
-
- GTK_YIELD_GRAB();
pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, NULL );
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 605db0d..d0f75fd 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -404,7 +404,6 @@
GtkSalMenu::~GtkSalMenu()
{
SolarMutexGuard aGuard;
- //GTK_YIELD_GRAB();
if ( mbMenuBar == sal_True )
{
@@ -458,7 +457,6 @@
void GtkSalMenu::SetFrame( const SalFrame* pFrame )
{
SolarMutexGuard aGuard;
- GTK_YIELD_GRAB();
assert(mbMenuBar);
SAL_INFO("vcl.unity", "GtkSalMenu set to frame");
--
To view, visit https://gerrit.libreoffice.org/3357
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76e76ec5fc85d8e1fd673a45b3e54163ca7643f3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Vlastimil Jinoch <elianoss@gmail.com>
Context
- [PATCH] fdo#60690 Remove of all call GTK_YIELD_GRAB because it do no... · Vlastimil Jinoch (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.