From 8d5822983e9b6a1e04874ce4d2c807fd0cf1ee04 Mon Sep 17 00:00:00 2001 From: Caolán McNamara <caolanm@redhat.com> Date: Mon, 14 Dec 2015 11:36:50 +0000 Subject: Related: rhbz#1290014 gtk3: use gtk_window_set_modal on modal dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit which makes modal dialogs (which are most of them) place correctly under wayland. Modeless ones are still uselessly shoved far to the left, but this makes things near usable and gives the same "graying into the bg" effect for the main window as other gtk apps Change-Id: If1486feb7631c5a0c2aa6efac3a6b9dd1b215daf Reviewed-on: https://gerrit.libreoffice.org/20699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> --- vcl/inc/salframe.hxx | 4 ++++ vcl/inc/unx/gtk/gtkframe.hxx | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'vcl/inc') diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 8cb731c46287..7638fd91ade2 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -239,6 +239,10 @@ public: // done setting up the clipregion virtual void EndSetClipRegion() = 0; + virtual void SetModal(bool /*bModal*/) + { + } + // Callbacks (indepent part in vcl/source/window/winproc.cxx) // for default message handling return 0 void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc ); diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 4b09426b35f9..dc5cd191d5e0 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -447,6 +447,10 @@ public: // done setting up the clipregion virtual void EndSetClipRegion() override; +#if GTK_CHECK_VERSION(3,0,0) + virtual void SetModal(bool bModal) override; +#endif + static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); virtual Window GetX11Window() override; -- cgit