summaryrefslogtreecommitdiff
path: root/src/core/constraints.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-04Remove multiple empty linesrbuj1-2/+0
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 'N;/^\n$/D;P;D;' {} \;
2020-08-04Remove trailing spaces/tabsrbuj1-3/+3
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/[[:space:]]*$//' {} \; find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/\t*$//' {} \;
2020-05-26Use rounded values instead of truncate themrbuj1-3/+4
If the decimal value is from .1 to .5, round(arg) returns the integer value less than the argument. Otherwise, if the decimal value is from .6 to .9, it returns the integer value greater than the arg.
2020-02-06window: handle legacy fullscreen requestsrcaridade1451-23/+0
https://gitlab.gnome.org/GNOME/metacity/commit/1fafd279006ece8cf664fd777143cdfafbefad6d window: handle legacy fullscreen requests Doing this on the actual resize requests makes more sense than handling it as a window-manager imposed constraints, so move the code accordingly. Adapted from mutter patch by Florian Müllner: https://git.gnome.org/browse/mutter/commit/?id=fba022cc06b8c7e80ef36f48d6577a251384cc4b https://bugzilla.gnome.org/show_bug.cgi?id=781946 Bug 781946 - Non-native decorated windows stuck maximised on secondary screen with Marco/Metacity
2019-06-05Account for invisible borders when constraining modal dialogsVictor Kareh1-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=656619 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/4674358f
2019-06-05constraints: fix mem leak in meta_window_constrain()Victor Kareh1-3/+10
MetaFrameBorders leaked when orig_borders != NULL and window->fullscreen == TRUE https://bugzilla.gnome.org/show_bug.cgi?id=679153 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/7e7f25f4
2019-06-05constraints: initialize window->user_rect in initial placementVictor Kareh1-0/+1
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/67ddadf3
2019-06-05Replace public MetaFrameGeometry with MetaFrameBordersVictor Kareh1-54/+51
There were actually *two* MetaFrameGeometry structs: one in theme-private.h, one in frame.h. The latter public struct was populated by a mix of (void*) casting and int pointers, usually pulling directly from the data in the private struct. Remove the public struct, replace it with MetaFrameBorders and scrap all the pointer hacks to populate it, instead relying on both structs being used in common code. This commit should be relatively straightforward, and it should not do any tricky logic at all, just a sophisticated find and replace. https://bugzilla.gnome.org/show_bug.cgi?id=644930 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/72224a165 NOTE: Patch copied from metacity and adapted for marco.
2019-03-06Do not judge whether the window is decorated or notzhuyaliang1-1/+0
2018-08-28Optionally attach modal dialogsMaxim Ermilov1-0/+47
Add a preference /apps/mutter/general/attach_modal_dialogs. When true, instead of having independent titlebars, modal dialogs appear attached to the titlebar of the parent window and are moved together with the parent window. https://bugzilla.gnome.org/show_bug.cgi?id=612726 NOTE: Patch copied from mutter and adapted for metacity.
2018-01-15Small bugfix for the move_to_X keybindsOmar Zeidan1-1/+1
2017-12-20Allow horizontal and vertical resizing when corner tiledOmar Zeidan1-25/+103
2017-12-20Implemented simple corner tiling by mouse dragOmar Zeidan1-4/+4
2017-08-30Store a window flag when user resizes from tiledVictor Kareh1-1/+7
Use that flag to retain the correct window size when performing other operations. Reset when re-tiling.
2017-08-29Allow tiled windows to be resized horizontallyVictor Kareh1-2/+31
Determine whether the user is initiating a resize action on a tiled window. If the user is trying to grab the window for resizing horizontally from the edge that's farther away from the screen edge, allow the resize to occur. Otherwise maintain the current tile geometry. Also modified the window hints to allow resizing from the window menu. Fixes #250
2015-10-26constraints: take into account _GTK_FRAME_EXTENTSmonsta1-26/+78
ported from https://git.gnome.org/browse/metacity/commit/?id=8f699b71bd7e5581ec2f2804ea9650597618dfe1
2014-11-12Unconditionally reset minimize_after_placement on placementinfirit1-3/+2
GTK+ has now started using _NET_WM_STATE_HIDDEN for iconified windows. For windows iconified at creation time, this causes metacity to set minimize_after_placement, which then causes the window to become minimized immediately after the first time it has been activated by the user. This happens because: (1) minimize_after_placement is reset after placing the window (2) if a window is minimized, placement is deferred Reset minimize_after_placement unconditionally in place_window_if_needed() to solve the issue. Reported and tested by Daniel Drake <[email protected]> Based on metacity commit: b0700e20b79896de7d28d2ff2bb18be324d8e19f From: Florian Müllner <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=684741
2014-10-27Rework tiling code based off Consortiuminfirit1-2/+4
Taken from https://github.com/SolusOS-discontinued/consortium/commit/b463e03f5bdeab307ceee6b969c681f29537c76d
2014-10-24Fix identification of CSD windows when checking whether to force fullscreeninfirit1-1/+1
We try to exempt CSD windows from being forced fullscreen if they are undecorated and the size of the screen; however, we also catch almost all windows that *do* need to be forced fullscreen in this check, since they also have decorations turned off. Identify actual CSD windows by checking whether _GTK_FRAME_EXTENTS is set - GTK+ will always set this on CSD windows even if they have no invisible borders or shadows at the current time. Based on metacity commit: 41dd72bc5dd08d7d0cb136f694a6d9a30e38b341 From: Owen W. Taylor <[email protected]> Metacity gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=723029
2014-06-26Remove all trailing whitespaces in the code treeJoaquín Ignacio Aramendía1-36/+36
Just run: $ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i $ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
2014-01-24Merge branch '1.7.0-window-snapping'Stefano Karapetsas1-3/+62
2014-01-15constraints: don't apply fullscreen workarounds for CSD windowsinfirit1-1/+7
If you maximize a CSD window on a monitor without struts, it ends up taking the whole monitor size, but it doesn't mean that the application wants to fullscreen. Gnome Bug: https://bugzilla.gnome.org/show_bug.cgi?id=708718 Gnome Commit: https://git.gnome.org/browse/mutter/commit/src/core/constraints.c?id=4eeeb1557a3a0caff6ef1debd92aeb541ae1b556
2013-05-31Implement side-by-side tilingStefano Karapetsas1-3/+62
Patch by Florian Müllner for Metacity https://bugzilla.gnome.org/show_bug.cgi?id=607694 When dragging a window over a screen edge and dropping it there, maximize it vertically and scale it horizontally to cover the corresponding half of the current monitor. Whenever a "hot area" which triggers this behavior is entered, an indication of window's target size is displayed after a short delay to avoid distraction when moving a window between monitors.
2012-11-18fixed incorrect fsf addresses.Steve Zesch1-2/+2
2011-12-01moving from https://github.com/perberos/mate-desktop-environmentPerberos1-0/+1382