summaryrefslogtreecommitdiff
path: root/src/core/window.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05MetaWindow: Repurpose get_outer_rect and add get_input_rectVictor Kareh1-10/+48
get_outer_rect now returns the visible region, and a new get_input_rect method returns the boundaries of the full frame, including the possible invisible regions. When undecorated, both do the samething. https://bugzilla.gnome.org/show_bug.cgi?id=644930 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/dfedc7df
2019-06-05MetaWindow: Compensate for invisible border changesVictor Kareh1-20/+20
https://bugzilla.gnome.org/show_bug.cgi?id=644930 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/85e15225
2019-06-05Only shadow ARGB windows with a frame outside the frameVictor Kareh1-6/+39
An ARGB window with a frame is likely something like a transparent terminal. It looks awful (and breaks transparency) to draw a big opaque black shadow under the window, so clip out the region under the terminal from the shadow we draw. Add meta_window_get_frame_bounds() to get a cairo region for the outer bounds of the frame of a window, and modify the frame handling code to notice changes to the frame shape and discard a cached region. meta_frames_apply_shapes() is refactored so we can extract meta_frames_get_frame_bounds() from it. https://bugzilla.gnome.org/show_bug.cgi?id=635268 NOTE: Applied only partially, compositor part is still missing... upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/0f2e32d1
2019-06-05window: initialize few variablesVictor Kareh1-0/+2
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/5b880ff3
2019-06-05window: Parse _GTK_THEME_VARIANT propertyVictor Kareh1-0/+2
Since version 3.0, GTK+ has support for style variants. At the moment, themes may provide a dark variant, which can be requested by applications via GtkSettings. The requested variant is exported to X11 via the _GTK_THEME_VARIANT property - support this property, in order to pick up the correct style variant in the future. https://bugzilla.gnome.org/show_bug.cgi?id=645355 NOTE: Patch is adapted for marco. upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/341d0945
2019-06-05Replace public MetaFrameGeometry with MetaFrameBordersVictor Kareh1-35/+34
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-04-23window: set atom__NET_WM_STATE_FOCUSED for meta_window_appears_focusedraveit651-1/+1
2019-04-23window: make docks and spashscreens appear focusedraveit651-1/+9
Set the NET_WM_STATE_FOCUSED property on windows of type dock or spashscreen so that they don't get the state GTK_STATE_FLAG_BACKDROP set by default. Based on: https://gitlab.gnome.org/GNOME/metacity/commit/b3ef887 origin xfwm4 commit: https://git.xfce.org/xfce/xfwm4/commit/?id=0feb29e78bb3
2019-04-23make icon size configurableosch1-1/+4
2019-04-11Replace meta_free_gslist_and_elements with g_slist_free_fullrbuj1-2/+2
Use g_slist_free_full
2019-03-28Improve performance by removing unused assignmentsrbuj1-8/+1
2019-03-13window: avoid clang warning: garbage valuePablo Barciela1-9/+15
avoid Clang static analyzer warning: core/window.c:3580:34: warning: The right operand of '+' is a garbage value new_w = window->rect.width + fgeom.left_width + fgeom.right_width; ^ ~~~~~~~~~~~~~~~~
2019-01-31screen: Remove get_current_monitor in favor of get_current_xineramaVictor Kareh1-2/+2
Since xinerama already contains information on the monitor and its rectangle, there is no need to go through Gdk to get this information again.
2019-01-07'meta_error_trap_push' instead 'meta_error_trap_push_with_return'Pablo Barciela1-5/+5
both functions have the same code
2018-08-28theme: replace mutter/metacity with marcoVictor Kareh1-2/+2
2018-08-28Optionally attach modal dialogsMaxim Ermilov1-0/+71
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-08-28Add meta_window_get_transient_for() methodDavyd Madeley1-0/+23
NOTE: Patch copied from mutter and adapted for metacity.
2018-04-29Correct resize popup position on HiDPI displaysVictor Kareh1-2/+5
2018-02-26window: add _NET_WM_STATE_FOCUSED hint to _NET_WM_STATEmonsta1-5/+18
ported from: https://github.com/GNOME/metacity/commit/4ccb99a50c54f345c4c7d9ac77f1ea76bc6c7c74
2018-01-15Bugfix for monitors of different sizesOmar Zeidan1-12/+20
2018-01-15Restructured monitor keybinds and adjust save_rectOmar Zeidan1-0/+58
2018-01-02Fix wrong result in meta_window_titlebar_is_onscreen() for windows without a ↵Björn Weber1-1/+1
frame
2018-01-02Add support for gtk3 _GTK_SHOW_WINDOW_MENU eventBjörn Weber1-0/+21
2018-01-02Implemented a setting to disable top tilingOmar Zeidan1-6/+7
2017-12-30Reset tile_resized to false when fullscreeningOmar Zeidan1-1/+6
After resizing a tiled window, tile_resized gets set to true. Since it never got set back to false when fullscreening, it lead to weird behavior when unfullscreening the window.
2017-12-20Fixes windows not going to save_rect when unmaximimizingOmar Zeidan1-0/+2
2017-12-20Allow horizontal and vertical resizing when corner tiledOmar Zeidan1-71/+88
2017-12-20Implemented simple corner tiling by mouse dragOmar Zeidan1-25/+85
2017-08-30Store a window flag when user resizes from tiledVictor Kareh1-0/+6
Use that flag to retain the correct window size when performing other operations. Reset when re-tiling.
2015-12-31window: remove excessive initializationmonsta1-1/+0
2015-12-11add a missing line from metacitymonsta1-0/+1
line is taken from https://github.com/GNOME/metacity/commit/632d3983fbc402432c6ceae05bea8903ad2f11c0 was forgotten in https://github.com/mate-desktop/marco/commit/ad9db61aabc2cbf743a1157ddc42ff76127f3fab
2015-11-08Revert "Merge pull request #115 from Samsagax/animation-fix-clean"Monsta1-108/+75
This reverts commit 567890a8a1884247de29e9f97cf9cd8110247c04, reversing changes made to a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.
2015-10-26window: initialize fullscreen to FALSEAlberts Muktupāvels1-0/+1
This fix random bug when applications without reason opens in fullscreen mode.
2015-10-26window: initialize custom_frame_extentsAlberts Muktupāvels1-0/+6
2015-09-16Add manual and by-pointer window placementFaidon Liambotis1-0/+8
This adds a window placement preference: the existing behavior is now called "automatic" and is the default. Two new modes are being introduced: "pointer", which means that windows are placed according to the mouse pointer position; and "manual" which means that the user must manually place the new window with the mouse or keyboard. This is a straight port from muffin, commit 3257671.
2015-09-14window: load NET_WM_USER_TIME from the right windowAlberts Muktupāvels1-1/+9
On subsequent changes, if there is a NET_WM_USER_TIME_WINDOW, then read the property from that rather than from the main window. (Fix an accidental regression: the right Window was being computed but no longer passed in.) Original patch author - Owen Taylor: https://bugzilla.gnome.org/show_bug.cgi?id=585979
2015-08-01window menu: make minimize item insensitive when window should notMonsta1-2/+2
be minimized (e.g. delete confirmation dialog, logout dialog...)
2015-07-31Allow programmatic minimization without MWM_FUNC_MINIMIZEStefan Dösinger1-2/+1
This fixes switching out of fullscreen Direct3D applications running in Wine. See issue 166 for more details.
2015-06-10Merge pull request #160 from micove/add-tile-keybindsMartin Wimpress1-16/+2
Add tile keybinds (Fix #104, #127)
2015-06-09fix uninitialized data field for sending _NET_WM_SYNC_REQUEST eventSebastian Gerhardt1-0/+1
If this field is left uninitialized, a client may mistake Marco to support more than the single update request counter described in EWMH 1.5.
2015-01-01BugFix: Can't retile to a different corner with keybindings.Miguel A. Colón Vélez1-1/+1
has_maximize_func implies window->has_resize_func !window->fullscreen window->has_resize_func implies (window->size_hints.min_width < window->size_hints.max_width) || (window->size_hints.min_height < window->size_hints.max_height) A tiled window implies that it could be tiled. A maximized window implies that it could be tiled. . Therefore simplify the if and add window->shaded to make it equivalent to the macro but allowing to tile already maximized/tiled windows. . If this commit causes a regression it probably means that a call to meta_window_recalc_features is missing. . This bug already existed but can only be triggered by the new keybindings.
2015-01-01BugFix: Can't unmaximize a tiled window.Miguel A. Colón Vélez1-15/+1
The removed code did not allow tiled windows to be unmaximized. The code was trying to retile a tiled window when it was asked to unmaximize it. The only thing it did was turn a maximized window into a tiled window but that is not the normal expected behaviour of unmaximization. . I also reset window->tile_mode to ensure we always unmaximize correctly. Some duplicate code was also removed. . This bug affects tiling with: - tile-to-side-w - tile-to-side-e - Mouse dragging to the west corner - Mouse dragging to the east corner . Therefore it's an old bug unrelated to the new keybindings.
2014-11-25merge metacity(gtk3) changesDenis Gorodnichev1-20/+2
merge metacity(gtk3) changes fix warnings clean up unused variables replace UNUSED_VARIABLE by G_GNUC_UNUSED
2014-11-12Allow explicit raises from same client, not just same appinfirit1-1/+22
We currently allow XRaiseWindow when the same application (defined by the window group) is focused, but the kind of old applications that XRaiseWindow are frequently not setting the window group. Expand the check to allow the same X client (defined by the looking at client ID) to raise windows above the focus window. Based on metacity commit: 632d3983fbc402432c6ceae05bea8903ad2f11c0 From: "Owen W. Taylor" <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=567528
2014-10-27Rework tiling code based off Consortiuminfirit1-42/+124
Taken from https://github.com/SolusOS-discontinued/consortium/commit/b463e03f5bdeab307ceee6b969c681f29537c76d
2014-10-24Fix new window focusinfirit1-7/+12
Based on metacity commit: cd481d37ec2551e98db758ff640d02f3745259db From: Alberts Muktupāvels <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=534752
2014-10-24use force_save_user_rect=TRUE for maximized windows tooinfirit1-2/+0
Force to save user rect for maximized windows too, otherwise when launching maximized application on non left monitor it will be moved to left monitor. Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/727928 Based on metacity commit: fbfcbc5e35e35063c8ff71b399a0bf72a31852e7 From: Alberts Muktupāvels <[email protected]>
2014-10-24don't show shadow for maximized windowsinfirit1-0/+10
based on metacity commit: 72d1c6a6b9a85391444bb5ff8c5de1e3aabd3fd9 From: Alberts Muktupāvels <[email protected]>
2014-10-24Fix identification of CSD windows when checking whether to force fullscreeninfirit1-0/+18
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-10-24add support for _GTK_FRAME_EXTENTSinfirit1-1/+12
Support for _GTK_FRAME_EXTENTS are based on mutter. Based on metacity commit: e132e2a700c4b50c93eae064d8fd1769b67baf06 By: Alberts Muktupāvels <[email protected]>