Full screen mode on multi monitor configuration

Bug #1284945 reported by Michael Klimenko on 2014-02-26
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Confirmed
Undecided
Unassigned

Bug Description

My multi monitor system is configured with RandR extension.
All internet browsers I know can't occupy all of my monitors when in full-screen mode (F11). So as Midori. It maximizes on single monitor only.

Michael Klimenko (geekmichael) wrote :

I have a solution for this problem, but it's hard for me to contribute it into Midori project. This solution requires some configuration inside Midori, which is hard for me to think out. Nevertheless I'd like to share it with community.

Ok. The key point of this solutiuon is setting _NET_WM_FULLSCREEN_MONITORS window manager property (http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idp6368280).

I patched "midori-browser.c" file, "_action_fullscreen_activate" function adding following code right after "gtk_window_fullscreen (GTK_WINDOW (browser));" line:

        // Set multi-monitor full screen mode
        GdkDisplay *display = gdk_display_get_default();
        XClientMessageEvent xclient;
        memset(&xclient, 0, sizeof(xclient));
        xclient.type = ClientMessage;
        xclient.message_type = gdk_x11_get_xatom_by_name_for_display(display, "_NET_WM_FULLSCREEN_MONITORS");
        xclient.window = GDK_WINDOW_XID( gtk_widget_get_window (GTK_WIDGET (browser)) );
        xclient.format = 32;
        // FIXME this needs some additional configuration
        xclient.data.l[0] = 0; // top monitor
        xclient.data.l[1] = 1; // bottom monitor
        xclient.data.l[2] = 0; // left monitor
        xclient.data.l[3] = 0; // right monitor
        xclient.data.l[4] = 1; // source indication
        XSendEvent(GDK_WINDOW_XDISPLAY( gtk_widget_get_window (GTK_WIDGET (browser)) ),
                   GDK_WINDOW_XID(gdk_get_default_root_window()),
                   False,
                   SubstructureRedirectMask | SubstructureNotifyMask,
                   (XEvent *) &xclient);

This code made my day but it does not look good enough to me for going into production branch.

Michael Klimenko (geekmichael) wrote :

I can see the following ways to configure monitor IDs (where my FIXME comment is placed):

1. Simple way
Detect all available monitors and set Midori to occupy all of them.

2. Jedi way
Add checkbox "Enable multi-monitor full screen mode" into Settings dialog, which enables additional configuration dialog for selecting "area". This dialog may look like ARandR application (http://christian.amsuess.com/tools/arandr/) where we can drag over monitor which we like to use for full screen mode.

Changed in midori:
milestone: none → 0.5.8
status: New → Confirmed
Changed in midori:
milestone: 0.5.8 → 0.5.9
Changed in midori:
milestone: 0.5.9 → 0.6.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers