vcl/unx/gtk/gtksalframe.cxx | 7 ++++--- vcl/unx/gtk/xid_fullscreen_on_all_monitors.c | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit abcfe9bef8f2d545106ce495cd0f7ca419de8e8e Author: Caolán McNamara <caol...@redhat.com> Date: Fri Nov 17 09:58:24 2017 +0000 Resolves: tdf#112549 use gtk3 to set gtk2 window fullscreen... for current monitor mode as well as all-monitors mode Change-Id: I9de864dc0b416d18937f6ee90f432a8254fe987f Reviewed-on: https://gerrit.libreoffice.org/44873 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index f352af4fdf19..e171c2ba51bc 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3021,8 +3021,8 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame ) GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); //Spawn off a helper program that will attempt to set this fullscreen - //window to span all displays. - if (pThis->m_bFullscreen && pThis->m_bSpanMonitorsWhenFullscreen) + //window either to span all displays or the current monitor + if (pThis->m_bFullscreen) { GdkWindow* gdkwin = widget_get_window(pThis->m_pWindow); if (gdkwin) @@ -3033,7 +3033,8 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame ) if (osl::FileBase::getSystemPathFromFileURL(sProgramURL, sProgram) == osl::File::E_None) { OString sFinalProgram(OUStringToOString(sProgram, osl_getThreadTextEncoding()) - + " " + OString::number((int)GDK_WINDOW_XID(gdkwin))); + + " " + OString::number((int)GDK_WINDOW_XID(gdkwin)) + + " " + OString::number((int)pThis->m_bSpanMonitorsWhenFullscreen)); OString sDisplay(getDisplayString()); if (!sDisplay.isEmpty()) { diff --git a/vcl/unx/gtk/xid_fullscreen_on_all_monitors.c b/vcl/unx/gtk/xid_fullscreen_on_all_monitors.c index 00554b1df021..558ede597a48 100644 --- a/vcl/unx/gtk/xid_fullscreen_on_all_monitors.c +++ b/vcl/unx/gtk/xid_fullscreen_on_all_monitors.c @@ -37,6 +37,7 @@ int main(int argc, char *argv[]) GdkEvent *event; GdkWindow *window; int windowid; + int spanmonitors; handle = dlopen("libgtk-3.so.0", RTLD_LAZY); if( NULL == handle ) @@ -75,6 +76,7 @@ int main(int argc, char *argv[]) gtk_init(&argc, &argv); windowid = atoi(argv[1]); + spanmonitors = atoi(argv[2]); window = gdk_x11_window_foreign_new_for_display(gdk_display_get_default(), windowid); if (!window) @@ -83,7 +85,7 @@ int main(int argc, char *argv[]) return -1; } - gdk_window_set_fullscreen_mode(window, GDK_FULLSCREEN_ON_ALL_MONITORS); + gdk_window_set_fullscreen_mode(window, spanmonitors ? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR); gdk_window_fullscreen(window); while ((event = gdk_event_get()) != NULL)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits