summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05build everything as libraryVictor Kareh1-23/+11
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/d982d0a5
2019-06-05Allow raise_on_click to be set independent of focus_modeVictor Kareh2-6/+2
Based on a patch by Thomas Jaeger <[email protected]> upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/03e8e63d
2019-06-05window: initialize few variablesVictor Kareh1-0/+2
upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/5b880ff3
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 Kareh2-1/+4
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-05core: Update frame style when _GTK_THEME_VARIANT changesVictor Kareh1-0/+2
When the _GTK_THEME_VARIANT property changes, rather than just updating the window's theme_variant property, update its frame style as well, so that the window decoration reflects the requested variant. As the initial properties of a window may be read before its frame is created, there will be cases where the change is not picked up initially. https://bugzilla.gnome.org/show_bug.cgi?id=645355 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/8a779ab9
2019-06-05ui: Add meta_ui_update_frame_style()Victor Kareh4-0/+25
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-05core: Allow retrieving the theme variant via core_get()Victor Kareh2-0/+4
To associate frames with the correct style variant, the UI will need access to the window's theme variant property. https://bugzilla.gnome.org/show_bug.cgi?id=645355 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/5c7403cc
2019-06-05window: Parse _GTK_THEME_VARIANT propertyVictor Kareh4-0/+27
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-05MetaFrameBorders: Add meta_frame_borders_clearVictor Kareh7-34/+49
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 Kareh18-358/+295
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 > 1osch3-15/+28
2019-06-03alt+tab popup: follow mouse while mouse button is pressedosch2-1/+26
2019-06-03Handle mouse clicks in Alt+Tab Popuposch3-18/+110
2019-06-03Allow use of up/down arrow keys in alt+tab popuposch4-12/+87
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-05-29fix window type for splashWu Xiaotian1-1/+1
2019-05-24Fix Could not parse desktop file marco.desktoprbuj1-1/+1
mate-session[1210]: WARNING: Could not parse desktop file /usr/share/applications/marco.desktop: El fitxer de claus no conté una clau «Name» en el grup «Desktop Entry» mate-session[1210]: GLib-GObject-CRITICAL: object GsmAutostartApp 0x7f158800ede0 finalized while still in-construction mate-session[1210]: GLib-GObject-CRITICAL: Custom constructor for class GsmAutostartApp returned NULL (which is invalid). Please use GInitable instead. mate-session[1210]: WARNING: could not read /usr/share/applications/marco.desktop
2019-05-16Migrate from intltool to gettextWu Xiaotian6-90/+90
2019-04-23ui: always set the frame background to NoneGiovanni Campagna5-156/+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-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-23Limit icon size to 480osch2-2/+2
2019-04-23scale icon down if icon is larger than alt+tab preview thumbnailosch1-4/+18
2019-04-23Limit icon size to 1024osch3-2/+5
2019-04-23description for icon size preference correctedosch1-1/+1
2019-04-23reload icons if icon size preference changedosch6-7/+69
2019-04-23make icon size configurableosch8-10/+39
2019-04-15Remove unnecessary GClosureNotify methodsrbuj1-17/+2
Fixes double free of menu_data introduced in b0df98a
2019-04-11Replace meta_free_gslist_and_elements with g_slist_free_fullrbuj3-10/+2
Use g_slist_free_full
2019-04-11Replace meta_rectangle_free_list_and_elements with g_list_free_fullrbuj4-70/+55
Use g_list_free_full
2019-04-08Remove GDestroyNotify function cast for g_object_unrefrbuj1-1/+1
2019-03-28delete: remove old codeJasper St. Pierre1-28/+0
It doesn't compile Signed-off-by: rbuj <[email protected]>
2019-03-28Fix -Werror=cast-function-typerbuj9-34/+40
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 assignmentsrbuj9-27/+8
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-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-03-09boxes: avoid false positive warning in Clang static analyzerPablo Barciela1-0/+3
avoid Clang static analyzer warning: core/boxes.c:412:15: warning: Use of memory after it is freed if (meta_rectangle_contains_rect (a, b)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-06Do not judge whether the window is decorated or notzhuyaliang1-1/+0
2019-03-06screen: Fix use of memory after it is freedPablo Barciela1-2/+1
Fixes Clang static analyzer warning: core/screen.c:754:16: warning: Use of memory after it is freed result = g_list_prepend (result, info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-06boxes: Actually check for rectangle containmentPablo Barciela1-1/+1
Fixes condition duplicated: /* If a contains b, just remove b */ if (meta_rectangle_contains_rect (a, b)) { delete_me = other; } /* If b contains a, just remove a */ else if (meta_rectangle_contains_rect (a, b)) { delete_me = compare; }
2019-03-05[Security] Use 'g_strlcpy' instead of 'strcpy'Pablo Barciela2-4/+5
Fixes Clang static analyzer warnings: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
2019-03-05compositor-xrender: Fix memory leakPablo Barciela1-0/+2
Fixes Clang static analyzer warning: compositor/compositor-xrender.c:587:10: warning: Potential leak of memory pointed to by 'data' return ximage; ^~~~~~
2019-01-31screen: Remove get_current_monitor in favor of get_current_xineramaVictor Kareh4-56/+10
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 Kareh6-41/+96
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-15screen: avoid 'NULL' in 'meta_error_trap...' functionsPablo Barciela1-2/+4
Fixes https://github.com/mate-desktop/marco/issues/445