After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696001 - need to know about tiling
need to know about tiling
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 696002
Blocks:
 
 
Reported: 2013-03-17 16:44 UTC by Matthias Clasen
Modified: 2017-08-30 00:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (7.66 KB, patch)
2013-04-13 23:41 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2013-03-17 16:44:23 UTC
with csd, we switch off window borders when maximized, and we need to do the same when half-tiled, otherwise we get an odd translucent frame around the half-tiled window.

This means that half-tiled needs to be represented in the window state somehow.
Comment 1 Kristian Høgsberg 2013-03-25 16:16:27 UTC
One of the most frequently asked questions about CSD is about tiling and how to support that.  Typically it's a suggestion to have a flag to not draw decorations at all, but that's going back to the MWM approach of describing the appearance of the window.  The idea has always been that instead the compositor will indicate to the application that its tiled on one of more sides.  The application in response should not draw shadows on those sides and adjust the decoration to not have rounded corners on that side, if desired etc.

More subtly, applications that adjust their compositor assigned size (eg, terminals that snap to grid size or window that preserve aspect ration), should disable these adjustments in any orientation where it's tiled of both sides.  For example if an terminal is tiled top and bottom, the application should use all the vertical space assigned by the compositor (eg add padding and center the terminal contents) but can still adjust the space used to grid size while resizing horizontally.
Comment 2 Matthias Clasen 2013-04-13 23:41:40 UTC
Created attachment 241475 [details] [review]
a patch

Here is a quick sketch; it implements a GDK_WINDOW_STATE_TILED for the x11 backend. The implementation uses some implementation details of the current mutter tiling: it only does horizontal half-max tiling, and sets the vert-max state when it does so.

The patch also adds a get_tiled_edges api to GdkWindow, but the csd code makes no use of it currently, it just treats tiled windows like maximized ones.
Comment 3 Matthias Clasen 2013-05-06 19:04:05 UTC
Review of attachment 241475 [details] [review]:

::: gtk/gtkwindow.c
@@ +6376,3 @@
+      priv->tiled =
+        (event->new_window_state & GDK_WINDOW_STATE_TILED) ? 1 : 0;
+      g_print ("tiled state changed, now: %d\n", priv->tiled);

debug spew needs to go before merging
Comment 4 Matthias Clasen 2013-05-26 14:33:30 UTC
I've merged just the tiling state for now.
Comment 5 Daniel Boles 2017-08-30 00:41:45 UTC
This will be obsoleted by the patches in Bug 783669, slated to land in 3.22.20