[virt-tools-list] [PATCH virt-viewer] Fullscreen displays on wrong monitors in Wayland

Christophe Fergeau cfergeau at redhat.com
Tue Oct 16 08:27:17 UTC 2018


On Mon, Oct 15, 2018 at 03:33:27PM -0500, Jonathon Jongsma wrote:
> On Mon, 2018-10-15 at 10:42 +0200, Christophe Fergeau wrote:
> > On Fri, Oct 12, 2018 at 02:51:19PM -0500, Jonathon Jongsma wrote:
> > > In fullscreen mode, we attempt to enable a guest display for each
> > > client
> > > monitor and then place a fullscreen window for each display on the
> > > appropriate monitor. Previously, we were using gtk_window_move() to
> > > move
> > > the window to the proper monitor, and then calling
> > > gtk_window_fullscreen() to enter fullscreen mode on that monitor.
> > > However, under wayland, gtk_window_move() no longer has any effect
> > > for
> > > toplevel windows, so all displays were showing up on top of
> > > eachother on
> > > the same client monitor.
> > > 
> > > Fortunately, Gtk+ 3.18 added a new
> > > gtk_window_fullscreen_on_monitor()
> > > API that works on Wayland. In theory this allows us to remove the
> > > call
> > > to gtk_window_move() from the code. But to avoid potentially
> > > changing
> > > behavior on xorg or older systems, I left the existing logic.
> > 
> > Any plans to remove the gtk_window_move() call later on? Or do you
> > think
> > we should keep it forever? Apart from that,
> 
> It's hard to say. The thing we gain by moving and then fullscreening is
> that when that window gets un-fullscreened, it stays on the same
> monitor that it was fullscreened on. On the other hand, if you just
> call gtk_window_fullscreen_on_monitor() without moving the window to
> that monitor first, when that window gets un-fullscreened, it can be
> restored to a different monitor (e.g.the one that had the active focus
> when the application was launched). As far as I can tell, there's
> nothing we can do to prevent this on Wayland. 
> 
> Eventually this will become a moot point since the future is wayland
> and gtk_window_move() does nothing on wayland. But until then there is
> at least some minor benefit to leaving the _move() call in the code for
> those still running under X.

Ah indeed, I thought it was a noop after this patch, but it actually is
not (and maybe gtk_window_move will keep working on Windows?).

Thanks for the additional details,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20181016/cd504a90/attachment.sig>


More information about the virt-tools-list mailing list