summaryrefslogtreecommitdiff
path: root/src/ui
AgeCommit message (Collapse)AuthorFilesLines
2019-06-07Make alt+tab max columns configurable and consider window label widthosch1-13/+43
2019-06-05theme: Fix window state when tiling from maximizedVictor Kareh1-0/+2
2019-06-05frames: include invisible area in cacheVictor Kareh1-11/+11
GTK+ theme might use this area to paint box-shadow. Also use CAIRO_CONTENT_COLOR_ALPHA for cairo surfaces. upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/13137b1d
2019-06-05frames: Rename layout to text_layoutVictor Kareh2-25/+19
... to differentiate PangoLayout from MetaFrameLayout. https://bugzilla.gnome.org/show_bug.cgi?id=741917 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/8e5781bc
2019-06-05theme: fix warningVictor Kareh1-0/+1
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/3a3c47e3
2019-06-05frames: again change meta_frames_applet_shapesVictor Kareh2-64/+29
With compositing manager: 1. Apply only client shape. Without compositing manager: 1. Apply client shape. 2. Apply shape around visible frame. upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/3913dcf1
2019-06-05Fix scaling overcorrection when caching frame bordersVictor Kareh1-18/+16
2019-06-05frames: apply shapes in different wayVictor Kareh2-4/+53
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/cd383e72
2019-06-05frames: add dest_kind to apply_cairo_region_to_windowVictor Kareh1-3/+4
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/94c8d620
2019-06-05frames: Fall back to title bar if nothing else matchedVictor Kareh1-1/+4
The condition got removed in eeb2efe01001fef7655b2ba95ca1456f7fe9214b but that had a side effect of adding a couple of rows of dead pixels so add it back. https://bugzilla.gnome.org/show_bug.cgi?id=658069 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/37e1fa8c
2019-06-05theme-viewer: Fix invisible bordersVictor Kareh2-10/+11
https://bugzilla.gnome.org/show_bug.cgi?id=662895 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/6836a621
2019-06-05theme: don't add invisible borders for windows that can't be resizedVictor Kareh1-7/+14
Invisible borders are all about resizing -- in the case that a window cannot be resized, it makes no sense to add them. https://bugzilla.gnome.org/show_bug.cgi?id=659854 Based on mutter commit: https://git.gnome.org/browse/mutter/commit/?id=be9f7d77292c1dfd868640fe95f7223fbbfd4273 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/64615667
2019-06-05theme: Don't add any bottom border to shaded windowsVictor Kareh1-4/+4
Shaded windows are assumed to be reduced to the titlebar: the current code enforces a visible bottom border of 0 and only takes the size of the title bar (+ invisible top border) into account when resizing the frame. However, we still add an invisible border at the bottom, which is than subtracted from the title bar, resulting in shaded windows being cut off. Fix by forcing both visible and invisible bottom borders to 0. https://bugzilla.gnome.org/show_bug.cgi?id=659266 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/7a80fcfd
2019-06-05ui: Replace inline borders in MetaFrameGeometry with MetaFrameBorderVictor Kareh3-172/+198
... and start compensating for invisible borders in all of the math. https://bugzilla.gnome.org/show_bug.cgi?id=644930 NOTE: Updated for marco... upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/daf6bc08
2019-06-05MetaFrameBorders: add invisible bordersVictor Kareh2-0/+20
This just adds the invisible border field and populates it with data but doesn't use it in any way. Based on mutter commit: https://git.gnome.org/browse/mutter/commit/?id=a1a2527c75ab0c135f89396ea036336fb67ac538 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/bf02c7c3
2019-06-05theme: add invisible_border to metacity themeVictor Kareh1-0/+5
This adds 'invisible_border' to be used for resize cursor area.
2019-06-05MetaFrames: factor out MetaUIFrame accessors for borders, corner radiusesVictor Kareh1-15/+38
This makes it a bit simpler for other functions on a MetaUIFrame to get this information. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758 Reviewed-by: Jasper St. Pierre <[email protected]> Signed-off-by: Simon McVittie <[email protected]> upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/79384de0
2019-06-05frame: Add "get_corner_radiuses" chainVictor Kareh3-0/+55
https://bugzilla.gnome.org/show_bug.cgi?id=628195 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/3994d7a0
2019-06-05Only shadow ARGB windows with a frame outside the frameVictor Kareh3-68/+135
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-05Fix XShapeVictor Kareh1-1/+1
Commit https://gitlab.gnome.org/GNOME/metacity/commit/c3a04bf unintentionally broke XShape handling. By studying the code extremely carefully, I found this inconsistency with the code that was there before. https://bugzilla.gnome.org/show_bug.cgi?id=635268 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/2b1c6443
2019-06-05theme: Make meta_frame_draw_theme take a GtkStyleContext instead of a widgetVictor Kareh5-56/+21
The style context of the widget is rarely what we want. We won't fix this to be a MetaFrames style context yet; this just changes the internal API. https://bugzilla.gnome.org/show_bug.cgi?id=690317 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/76aa0704
2019-06-05frames: Explicitly initialize style contextsVictor Kareh1-0/+1
We were relying on GTK+ emitting GtkWidget::style-updated during widget initialization to create the GtkStyleContexts used for window decorations. A recent GTK+ update broke this assumption, so do the necessary initialization ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=671796 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/e4fde7b0
2019-06-05fix a crash-on-exitVictor Kareh1-0/+9
meta_frames_destroy() was not safe to be called multiple times, which was causing a crash on exit due to something else changing somewhere that makes it get called multiple times. https://bugzilla.gnome.org/show_bug.cgi?id=654489 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/e35be641
2019-06-05ui-frame: Add support for style variantsVictor Kareh2-4/+93
Rather than sharing a single style context between all frames, use a default style and one style per encountered variant. The value of the _GTK_THEME_VARIANT property should determine which style is attached to a particular frame, though for the time being the default style is used for every frame, as the window property cannot be accessed at the time the style is attached. This will be fixed in a later commit. https://bugzilla.gnome.org/show_bug.cgi?id=645355 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/04d8135f
2019-06-05ui-frames: Delay attaching the style to new framesVictor Kareh1-1/+0
Like the setting of new frames' background is delayed until the frame is associated with its window, delay attaching the initial style, so that the correct style variant is picked. https://bugzilla.gnome.org/show_bug.cgi?id=645355 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/ee056853
2019-06-05ui: Add meta_ui_update_frame_style()Victor Kareh3-0/+23
This method allows forcing a style update of a particular frame from the core, so that it can pick up style variants. https://bugzilla.gnome.org/show_bug.cgi?id=645355 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/97554dc4
2019-06-05MetaFrameBorders: Add meta_frame_borders_clearVictor Kareh4-34/+10
Just a quick little commit to help clean things up for when we add invisible borders. Additionally, do a little housekeeping in preview-widget as well. https://bugzilla.gnome.org/show_bug.cgi?id=644930 NOTE: Patch copied from metacity and adapted for marco. upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/7d519b3f
2019-06-05Replace public MetaFrameGeometry with MetaFrameBordersVictor Kareh8-133/+96
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-06-03alt+tab popup: bugfix mouse click handling for scale factor > 1osch1-5/+5
2019-06-03Handle mouse clicks in Alt+Tab Popuposch1-0/+40
2019-06-03Allow use of up/down arrow keys in alt+tab popuposch1-2/+51
2019-06-01libmetacity: use cairo to render gradientVictor Kareh2-58/+99
upstream commits: https://gitlab.gnome.org/GNOME/metacity/commit/71d5decc https://gitlab.gnome.org/GNOME/metacity/commit/127638ca https://gitlab.gnome.org/GNOME/metacity/commit/fc1a21ea https://gitlab.gnome.org/GNOME/metacity/commit/431e0418
2019-06-01gradient: sync code with mutter before it was removedVictor Kareh2-225/+280
upstream commits: https://gitlab.gnome.org/GNOME/metacity/commit/3932dca0 https://gitlab.gnome.org/GNOME/metacity/commit/10240013 https://gitlab.gnome.org/GNOME/metacity/commit/3fa97193
2019-04-23ui: always set the frame background to NoneGiovanni Campagna3-136/+12
This way the xserver never paints the frame background, even if the client window is destroyed. This allows us to have clean destroy window animation. There is no problem with interactive resizing because applications are using the XSync protocol, so we're not painting unless the client has redrawn. https://bugzilla.gnome.org/show_bug.cgi?id=734054 origin commit: https://gitlab.gnome.org/GNOME/metacity/commit/78c283c
2019-04-23theme-viewer: avoid deprecated gtk_widget_override_background_colorAlberts Muktupavels1-3/+23
origin commit by: https://gitlab.gnome.org/GNOME/metacity/commit/542a2b4
2019-04-23reload icons if icon size preference changedosch1-3/+6
2019-04-23make icon size configurableosch2-3/+3
2019-04-15Remove unnecessary GClosureNotify methodsrbuj1-17/+2
Fixes double free of menu_data introduced in b0df98a
2019-04-08Remove GDestroyNotify function cast for g_object_unrefrbuj1-1/+1
2019-03-28Fix -Werror=cast-function-typerbuj2-6/+25
Bump glib-2 required version to 2.58: G_SOURCE_FUNC https://gitlab.gnome.org/GNOME/glib/commit/039fa6897bb4c5cd30caec8ee3add1a4ef612f76 Build & install:i export CC=gcci export CFLAGS=-Werror=cast-function-type ./autogen.sh --prefix=/usr make clean make sudo make install
2019-03-28Improve performance by removing unused assignmentsrbuj3-11/+5
2019-03-10frames: avoid deprecated 'gtk_widget_set_double_buffered'Pablo Barciela1-6/+17
based in the mutter commits: https://gitlab.gnome.org/GNOME/mutter/commit/b8b0dc5c78008647f5833f63d88456025f17bd08 https://gitlab.gnome.org/GNOME/mutter/commit/669c9da2a48d9a5573edee09065b8558c1d07035
2019-01-31screen: Remove get_current_monitor in favor of get_current_xineramaVictor Kareh1-14/+4
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-31Increase icon size on tab and workspace popupsVictor Kareh3-33/+47
Alt+Tab and Workspace popups should be sized relative to the monitor size. This way they look nice and large regardless of the display resolution. Also, given much larger modern resolutions, icon sizes should be larger by default.
2019-01-06frames.c: drop unused variablesPablo Barciela1-3/+0
2018-08-29theme: revert theme format version 3.6Alberts Muktupāvels1-3/+1
Shadow and padding was never part of theme. This format was created by mutter, and it is an incompatible change.
2018-08-28Convert frame region handling to cairo regionsOwen W. Taylor1-43/+79
It's useful to get frame shapes and manipulate them within Mutter, for example so that the compositor can use them to clip drawing. For this, we'll need the regions as cairo regions not X regions, so convert frame shaping code to work in terms of cairo_region_t. https://bugzilla.gnome.org/show_bug.cgi?id=635268
2018-08-28theme: add invisible_border to metacity themeAlberts Muktupāvels3-1/+11
This adds 'invisible_border' to metacity theme. This invisible border will be used for resize cursor area.
2018-08-28add support for app-menu button in themeAlberts Muktupāvels5-3/+56
Add app-menu button support in themes. This is done only to support metacity theme format 3.5 version. Marco will not show this button! Based on metacity commit: https://gitlab.gnome.org/GNOME/metacity/commit/6a2cc159
2018-08-28theme: replace mutter/metacity with marcoVictor Kareh3-3/+3