summaryrefslogtreecommitdiff
path: root/src/ui/frames.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05ui: Replace inline borders in MetaFrameGeometry with MetaFrameBorderVictor Kareh1-122/+151
... 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 Kareh1-0/+10
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-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 Kareh1-0/+34
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 Kareh1-68/+119
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 Kareh1-3/+5
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 Kareh1-4/+91
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 Kareh1-0/+14
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-05Replace public MetaFrameGeometry with MetaFrameBordersVictor Kareh1-15/+20
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-23ui: always set the frame background to NoneGiovanni Campagna1-112/+0
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-03-28Improve performance by removing unused assignmentsrbuj1-4/+2
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-06frames.c: drop unused variablesPablo Barciela1-3/+0
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-28add support for app-menu button in themeAlberts Muktupāvels1-0/+25
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-28Allow a theme to specify ellipsize width for a titleOwen W. Taylor1-0/+1
It's nice to indicate when a title is truncated with an ellipsis. Because themes may draw a title multiple times to draw a shadow, or may include the window icon within the title area, we can't determine the proper ellipsization width automatically, so add an optional attribute to the <title/> element "ellipsize_width" which, if set, is the width to ellipsize at. This is only enabled if a theme version of 3.1 is required. When it's not set, we keep the old behavior of just letting the title be clipped with a hard edge. https://bugzilla.gnome.org/show_bug.cgi?id=591842 NOTE: Patch copied from mutter and adapted for metacity.
2018-04-25Fix frame geometry to avoid stuck resize cursorVictor Kareh1-5/+0
2018-03-22Use frame window to determine scaleVictor Kareh1-1/+1
2018-03-22Support HiDPI window decorationsVictor Kareh1-28/+71
2017-07-29avoid deprecated gdk_display_get_screenZenWalker1-8/+3
2017-07-15avoid deprecated gdk_screen_get_numberZenWalker1-1/+1
2017-06-27ui: Fix invalid object construction in framesIkey Doherty1-4/+0
This legacy construct was carried over from the gtk2/gtk3 port, and attempts to initialise MetaFrames with a GtkWindow `type` property. This property doesn't actually exist, and will cause marco to completely crash when running with `MARCO_DEBUG=1` for local build testing. Signed-off-by: Ikey Doherty <[email protected]>
2016-10-15move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build optionmonsta1-445/+18
2015-09-14Remove deprecated GTK+ symbols and use accessor functionsinfirit1-6/+22
Direct struct access has been deprecated, so use the appropriate replacements to build with GSEAL enabled.
2015-09-14Don't allow multiline window titlesWilliam Jon McCann1-0/+2
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=683056
2015-09-14Fix typoinfirit1-1/+1
2014-11-25merge metacity(gtk3) changesDenis Gorodnichev1-19/+30
merge metacity(gtk3) changes fix warnings clean up unused variables replace UNUSED_VARIABLE by G_GNUC_UNUSED
2014-11-12buttons: Fix background functions for non-default layoutsinfirit1-14/+0
While the configured layout is taken into account for positioning the buttons, the mapping from button function states to button position states just assumed the default button layout in LTR locales. Do a proper mapping depending on the actual layout instead. Based on metacity commit: 6a52883c2b670ad645257373515d1e704408b93d From: Florian Müllner <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=638700
2014-10-27Fixup Gtk3 Gdk device handlingDenis Gorodnichev1-0/+10
2014-10-25Drop support for Gtk+ < 2.24infirit1-48/+0
2014-10-25Cleanup GTK_CHECK_VERSION and unify where possibleinfirit1-6/+1
gdk_x11_window_lookup_for_display since 2.24 GDK_WINDOW_XID since always gtk_widget_get_visible since 2.18 gtk_widget_set_mapped since 2.20 gdk_event_new since 2.2 gdk_x11_window_lookup_for_display since 2.24 gdk_text_property_to_utf8_list_for_display since 2.2 gtk_widget_get_realized since 2.20 gdk_visual_get_depth since 2.22 gtk_widget_get_window since 2.14 gtk_widget_set_allocation since 2.18
2014-10-24frames.c: don't try to remove source that does not existinfirit1-0/+2
Based on metacity commit: 5ae71b165df2fbaae933de41db11726a79aea820 From: Alberts Muktupāvels <[email protected]>
2014-10-24Fix the resizing of CSD windowsmonsta1-23/+10
2014-06-26Remove all trailing whitespaces in the code treeJoaquín Ignacio Aramendía1-8/+8
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-04-23GTK3 fixesStefano Karapetsas1-0/+4
2014-04-23gtk3: remove always on top square at 0x0-200x200Denis Gorodnichev1-29/+19
Conflicts: src/ui/frames.c
2014-04-23GTK3 fixesStefano Karapetsas1-5/+12
2014-03-22Revert "gtk3: remove always on top square at 0x0-200x200"Stefano Karapetsas1-19/+29
This reverts commit 2425d611fccb0fa43cfd85a967d41d0777ecd353.
2014-03-07gtk3: remove always on top square at 0x0-200x200Denis Gorodnichev1-29/+19
Conflicts: src/ui/frames.c
2014-01-24ui: Improve GTK3 supportStefano Karapetsas1-1/+28
2013-11-16As of 5804817, the call to generate_pixmap():2353 was changed to pass byRyan Doyle1-8/+8
reference. This broke the GTK2 implementation of generate_pixmap(). This commit updates the GTK2 function to work with the changes.
2013-10-26Starting to add GTK3 supportLaszlo Boros1-2/+251
2013-05-15Fix for white line problem. Cribbed from ↵Scott Balneaves1-4/+8
https://git.gnome.org/browse/mutter/commit/?id=ecf812db833db5bf663c5e6b2fa02856f890a47e. Thanks stefano-k
2012-11-18fixed incorrect fsf addresses.Steve Zesch1-2/+2
2012-03-16Change the behavior of the maximize button so that a middle click on it will ↵Benjamin Valentin1-12/+41
maximize the window vertically, a right click horizontally.
2011-12-01moving from https://github.com/perberos/mate-desktop-environmentPerberos1-0/+2940