vcl/inc/unx/gtk/gtkdata.hxx | 4 ++-- vcl/unx/gtk3/gtkdata.cxx | 2 +- vcl/unx/gtk3/gtkframe.cxx | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-)
New commits: commit fa4fda77f2be664c1547f0f49f0d26c193b7edd6 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 25 10:41:12 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Feb 25 14:44:19 2026 +0100 gtk: Make GtkSalData::ErrorTrap{Push,Pop} static Following Change-Id: Ic45c22eb4d661a45aec42e88b3210cd6546cc7ac Author: Michael Weghorn <[email protected]> Date: Wed Feb 25 10:34:35 2026 +0100 vcl: Drop GenericUnixSalData::ErrorTrap{Push,Pop} from base class , these can now be static. Change-Id: I83c9b41fc550e1677151b281247fba005d106dc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200303 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index a95e22d0e97d..90cdb60ffdb7 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -241,9 +241,9 @@ public: bool Yield( bool bWait, bool bHandleAllCurrentEvents ); inline GdkDisplay *GetGdkDisplay(); - void ErrorTrapPush(); + static void ErrorTrapPush(); // true on error - bool ErrorTrapPop(bool bIgnoreError = true); + static bool ErrorTrapPop(bool bIgnoreError = true); inline GtkSalDisplay *GetGtkDisplay() const; void setException(const std::exception_ptr& exception) { m_aException = exception; } diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index de664cc27924..27eebf3e1c68 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -56,7 +56,7 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) : rpCsr = nullptr; if ( getenv( "SAL_IGNOREXERRORS" ) ) - GetGtkSalData()->ErrorTrapPush(); // and leak the trap + GtkSalData::ErrorTrapPush(); // and leak the trap gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); } diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index 82d7b3819adf..f7ce1d395e57 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -531,7 +531,7 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData ) { getDisplay()->registerFrame( this ); // permanently ignore errors from our unruly children ... - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); m_bDefaultPos = true; m_bDefaultSize = true; Init( pSysData ); @@ -5541,13 +5541,13 @@ void GtkSalFrame::IMHandler::createIMContext() g_signal_connect( m_pIMContext, "preedit_end", G_CALLBACK (signalIMPreeditEnd), this ); - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); im_context_set_client_widget(m_pIMContext, m_pFrame->getMouseEventWidget()); #if GTK_CHECK_VERSION(4, 0, 0) gtk_event_controller_key_set_im_context(m_pFrame->m_pKeyController, m_pIMContext); #endif gtk_im_context_focus_in( m_pIMContext ); - GetGtkSalData()->ErrorTrapPop(); + GtkSalData::ErrorTrapPop(); m_bFocused = true; } @@ -5558,12 +5558,12 @@ void GtkSalFrame::IMHandler::deleteIMContext() return; // first give IC a chance to deinitialize - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); #if GTK_CHECK_VERSION(4, 0, 0) gtk_event_controller_key_set_im_context(m_pFrame->m_pKeyController, nullptr); #endif im_context_set_client_widget(m_pIMContext, nullptr); - GetGtkSalData()->ErrorTrapPop(); + GtkSalData::ErrorTrapPop(); // destroy old IC g_object_unref( m_pIMContext ); m_pIMContext = nullptr; @@ -5584,9 +5584,9 @@ void GtkSalFrame::IMHandler::updateIMSpotLocation() aArea.y = aPosEvent.mnY; aArea.width = aPosEvent.mnWidth; aArea.height = aPosEvent.mnHeight; - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); gtk_im_context_set_cursor_location( m_pIMContext, &aArea ); - GetGtkSalData()->ErrorTrapPop(); + GtkSalData::ErrorTrapPop(); } void GtkSalFrame::IMHandler::sendEmptyCommit() @@ -5630,9 +5630,9 @@ void GtkSalFrame::IMHandler::focusChanged( bool bFocusIn ) m_bFocused = bFocusIn; if( bFocusIn ) { - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); gtk_im_context_focus_in( m_pIMContext ); - GetGtkSalData()->ErrorTrapPop(); + GtkSalData::ErrorTrapPop(); if( m_aInputEvent.mpTextAttr ) { sendEmptyCommit(); @@ -5642,9 +5642,9 @@ void GtkSalFrame::IMHandler::focusChanged( bool bFocusIn ) } else { - GetGtkSalData()->ErrorTrapPush(); + GtkSalData::ErrorTrapPush(); gtk_im_context_focus_out( m_pIMContext ); - GetGtkSalData()->ErrorTrapPop(); + GtkSalData::ErrorTrapPop(); // cancel an eventual event posted to begin preedit again GtkSalFrame::getDisplay()->CancelInternalEvent( m_pFrame, &m_aInputEvent, SalEvent::ExtTextInput ); }
