Hello, I'm the author of page window manager [1] and couple of year ago I started to look on how to add the support of wayland protocol to my window manager. I did several experiment, and now I'm trying libmutter.
libmutter is currently my easiest option which support both X11 and wayland. I fairly satisfied about it because I managed to produce a working draft of page in couple of weeks. The current quick&dirty draft, available here [2], implement 90% of the feature I already have in current page version, 5% of missing feature look strain forward to implement; but I still have 5% to tackle. I will list open issues that I meet during the development of my draft. I look for advises to solve them. I will also provide feedback about my implementation and workaround that I use, maybe to start discussion to improve libmutter. The first issue: window placement. Page is a tilling window manager, that mean I need to place some window to specific location, but the meta_window_move_resize_frame has an unpredictable placement in the point of view of the libmutter user. In particular, if the window have scale/size constraint from NormalHint. The documentation of this function in that regard look wrong. If I try to place 'mpv' for example, I can have a window to be bigger than the requested area. Second issue: Shadows and invisible frame border. This issue is linked to the window placement, windows when placed has invisible border that go beyond than the requested frame location. Event setting "no-shadow" property to the MetaWindowActor does not fix the issue. A solution would be to turn the window into maximized state and place it. This is how I do in the current page: the client think that he is maximized and draw the gui accordingly. I tried this workaround but it seems that maximizing the window override the frame location and the window is automatically grow to cover the monitor. This bring us to the next issue. Third issue: Fullscreen and Maximized window placement. At this moment I didn't found how I can move a client in fullscreen or in maximized state. That's conclude the open issues, let's provide workaround & feedback. The first workaround: window move initiated by client. LibMutter handle automatically the move/resize of window when you click on titlebar or alt-click the window. The workaround is to listen the "position-changed", "size-changed" signals of MetaWindow and cancel/revert the change to the desired location of the window. I use this workaround for tiles. This behavior forbid myself to implement my own move behavior, for examples tile can move from tile to tile and has not free move. Maybe signals like "move-request", "start-move-request" or "start-resize-request" with a boolean to indicate if the request is handled or not would be a better approach. The second workaround: Window placement taking in account the shadow. To solve the issue of shadow I basically added a margin around the frame. This is quite dirty but that in most case do the job. Third workaround: windows stacking. At the moment I must listen all "raised" signal from MetaWindow and re- stack all window to maintain my desired stacking order. In my tiling window manager, floating windows must stay above tiled window in any case, otherwise the user can loose a window under tiled windows. That's says, please let me know if I missed some aspect of libmutter and provide advises. I also available to contribute some code that may improve or solve the above issues. Thank to libmutter community, libmutter is already awesome ;) Best regards. [1] https://www.hzog.net/index.php/About [2] https://github.com/gschwind/page-mutter-compositor -- Benoit Gschwind (blocage) _______________________________________________ gnome-shell-list mailing list gnome-shell-list@gnome.org https://mail.gnome.org/mailman/listinfo/gnome-shell-list