1
0
Fork 0
Commit graph

148 commits

Author SHA1 Message Date
Bilal Elmoussaoui
d1d2496c99 core: Replace MetaVirtualModifier
By making all the types uses ClutterModifierType instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2407>
2022-12-22 15:13:54 +01:00
Jonas Ådahl
af501ac472 prefs: Make init function private
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1833>
2021-05-17 16:08:42 +00:00
Carlos Garnacho
6011562aa9 backends: Update pointer drag-threshold/double-click settings location
Following recent gsettings-desktop-schemas changes.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1416>
2021-01-14 13:58:16 +00:00
Jonas Ådahl
313e3e771c Make meta_* logging utilities not require line break
Unlike g_* logging utilities, the meta_* counterparts behave like odd
printf() functions. Lets change that so they fit better into how logging
is done everywhere else.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466
2020-10-08 16:38:41 +02:00
Jonas Ådahl
2da27720ca display: Make check-alive timeout configureable
The check-alive feature is there for the user to be able to terminate
frozen applications more easily. However, sometimes applications are
implemented in a way where they fail to be reply to ping requests in a
timely manner, resulting in that, to the compositor, they are
indistinguishable from clients that have frozen indefinitely.

When using an application that has these issues, the GUI showed in
response to the failure to respond to ping requests can become annoying,
as it disrupts the visual presentation of the application.

To allow users to work-around these issues, add a setting allowing them
to configure the timeout waited until an application is considered
frozen, or disabling the check completely.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1080
2020-02-23 17:28:57 +00:00
Robert Mader
92375c75f8 cleanup: Use g_clear_signal_handler() where possible
This is inspired by 98892391d7 where the usage of
`g_signal_handler_disconnect()` without resetting the corresponding
handler id later resulted in a bug. Using `g_clear_signal_handler()`
makes sure we avoid similar bugs and is almost always the better
alternative. We use it for new code, let's clean up the old code to
also use it.

A further benefit is that it can get called even if the passed id is
0, allowing us to remove a lot of now unnessecary checks, and the fact
that `g_clear_signal_handler()` checks for the right type size, forcing us
to clean up all places where we used `guint` instead of `gulong`.

No functional changes intended here and all changes should be trivial,
thus bundled in one big commit.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/940
2019-11-21 15:02:27 +00:00
Olivier Fourdan
ac5d9ec558 keybindings: Do not grab the locate-pointer key if unnecessary
On X11, mutter needs to keep a grab on the locate-pointer key to be able
to trigger the functionality time the corresponding key combo is
pressed.

However, doing so may have side effects on other X11 clients that would
want to have a grab on the same key.

Make sure we only actually grab the key combo for "locate-pointer" only
when the feature is actually enabled, so that having the locate pointer
feature turned off (the default) would not cause side effects on other
X11 clients that might want to use the same key for their own use.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/647
2019-07-18 13:10:32 +00:00
Olivier Fourdan
c53aa89098 keybindings: Small code cleanup
Reuse the name we just set to insert in the hash table, that avoids
duplicating the string.

Suggested-by: Carlos Garnacho <carlosg@gnome.org>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
2019-06-05 09:34:39 +00:00
Olivier Fourdan
851b7d0639 keybindings: Trigger locate-pointer on key modifier
We trigger the "locate-pointer" mechanism when a special key modifier
(defaults to Control_L) key is pressed and released.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
https://gitlab.gnome.org/GNOME/gnome-shell/issues/981
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/merge_requests/19
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/86
2019-06-05 09:34:39 +00:00
Florian Müllner
1574099449 prefs: Change default of show-fallback-app-menu
The app menu always was a GNOME-only thing, so after it was removed this
cycle, assuming that it is not displayed by the environment is a better
default.

https://gitlab.gnome.org/GNOME/mutter/issues/493
2019-03-11 23:30:10 +00:00
Florian Müllner
de76074336 ui: Remove fallback app menu
The app menu is in the process of being retired[0], and the shell
stopped displaying it while applications are in the process of
dropping it. It therefore doesn't make sense to always show a
fallback menu in server-side decorations, applications that still
set the menu can rely on GTK+'s own fallback instead.

[0] https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-01-30 18:39:42 +00:00
Florian Müllner
6e1b14b26b x11: Remove hide-titlebar-when-maximized support
It's a UI pattern that has been superseded by client-side decorations,
apps that used to set the hint have generally moved on to headerbars.
Given that and the limitation to server-side decorated X11 windows,
GTK4 removed the client-side API for setting the hint, it's time to
follow suite and retire the feature.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/221
2018-11-26 13:12:18 +00:00
Jonas Ådahl
2f4a68c8c3 Clean up include macros mess
The order and way include macros were structured was chaotic, with no
real common thread between files. Try to tidy up the mess with some
common scheme, to make things look less messy.
2018-11-06 17:17:36 +01:00
Florian Müllner
3d75b48d50 prefs: Remove override system
With the support for per-desktop default values in GSettings, we
no longer need the mutter-specific override mechanism.

https://bugzilla.gnome.org/show_bug.cgi?id=786496
2018-07-31 18:38:53 +00:00
Jonas Ådahl
e2464660bc x11-display: Set the correct default Xcursor theme size
Under Xorg the cursor size preference was pre-scaled originating from
gtk, while with Wayland it came directly from GSettings remaining
unscaled. Under Xwayland this caused the X11 display code to set the
wrong size with HiDPI configurations, which was often later overridden
by the equivalent code in gtk, but not always.

Fix this by always having the cursor size preference unscaled, scaling
the size correctly where it's used, depending on how it's used.

https://bugzilla.gnome.org/show_bug.cgi?id=759538
2018-07-06 19:47:17 +02:00
Armin Krezović
de5e7a7175 Don't use gtk_settings callback to set shell_shows_app_menu
GTK+ won't be initialized if X11 is not available

Instead, when setting gtk-shell-shows-app-menu,
meta_prefs_set_show_fallback_app_menu should be
called as well.

https://bugzilla.gnome.org/show_bug.cgi?id=759538
2018-07-06 19:47:16 +02:00
Jonas Ådahl
14d8aec4b8 prefs: Allow no-op listener removal
Allow removing a prefs handler that was already removed. This allows us
to remove prefs from the dispose function without having to keep track
of it in every place.
2018-07-06 19:47:16 +02:00
Cosimo Cecchi
4c1fe4c30d prefs: fix a couple of typos
It's "threshold", not "trheshold". Also, make sure to add the enum value
to the documentation section.

https://bugzilla.gnome.org/show_bug.cgi?id=767805
2017-07-31 15:21:06 +01:00
Florian Müllner
ffd95c2ad5 theme: Complete removal of "fringe" titlebar button support
We have been ignoring those buttons since 3.16 after they had been
broken in the default theme for a couple of versions. As nobody
appears to miss them, it's time to remove them for good.
2015-10-16 04:13:14 +02:00
Jonas Ådahl
130807a308 wayland: Don't pre-multiply root cursor sizes with primary monitor scale
We cannot use the XSETTINGS value for cursor theme size because
gnome-settings-daemon already multiplies it by the primary monitor's
scale.

https://bugzilla.gnome.org/show_bug.cgi?id=755099
2015-10-04 14:17:14 +08:00
Florian Müllner
25a796afc6 Fix constness warnings 2015-09-24 03:01:51 +02:00
Giovanni Campagna
a13f906ed1 prefs: connect to changed:: before reading the value of a setting
Otherwise glib might skip registering to change notifications

https://bugzilla.gnome.org/show_bug.cgi?id=746509
2015-03-27 13:15:30 -07:00
Jasper St. Pierre
9abcf424b8 prefs: Remove per_window flag from MetaKeyPref
It's unused.
2015-01-09 14:15:17 -08:00
Jasper St. Pierre
cc7af83f8a prefs: Correct the MetaPreference value for workspace names 2015-01-09 14:15:17 -08:00
Jasper St. Pierre
13acf9e35d keybindings: Have meta_accelerator_parse take a MetaKeyCombo 2015-01-06 19:11:57 -08:00
Jasper St. Pierre
7bccd4f22f prefs: Don't parse modifiers for the overlay-key
We don't actually accept modifiers for the overlay key.
2015-01-06 18:46:32 -08:00
Jasper St. Pierre
36454542ae prefs: Fix minor code style issues 2015-01-06 17:58:42 -08:00
Florian Müllner
5e9db422c9 Remove all support for the metacity format
Rest in peace you magnificent format, love-child of arcane X11 drawing
API and markup craze, you will not be missed.
We do remember however the bravery of a many men and women, who fearlessly
descended into the guts of your intrinsics and turned ugliness into beauty;
their work will still be spoken of when you will long have been forgotten.

https://bugzilla.gnome.org/show_bug.cgi?id=741917
2014-12-29 08:46:37 -08:00
Jasper St. Pierre
93b7137c62 Allow raise_on_click to be set independent of focus_mode
Based on a patch by Thomas Jaeger <ThJaeger@gmail.com>
2014-12-28 22:36:27 -08:00
Jasper St. Pierre
cd4206764e Remove a few more guards for frees 2014-12-28 19:51:22 -08:00
Jasper St. Pierre
5e249ad5eb prefs: Don't leak the variant value for unknown properties 2014-09-29 17:54:20 -06:00
Florian Müllner
f10cb02cbf prefs: Show fallback app menu based on XSetting
Going through GSD's settings was done in context of patches that
did not land; it is simpler and more consistent with GTK+ to use
the corresponding XSetting instead.
2014-09-17 05:37:53 +02:00
Jasper St. Pierre
d20dae3553 prefs: Don't listen to the cursor-size key
It will only confuse the code if somebody changes
it. gnome-settings-daemon already listens to this, so just use that.
2014-09-14 23:26:06 -06:00
Adel Gadllah
493c0f71d2 prefs: Update cursor size based on xsettings
We shouldn't scale the cursor size in mutter we g-s-d exports
the correct size on hidpi so use gtk-cursor-theme-size.

This way we also catch changes on resolution updates.

https://bugzilla.gnome.org/show_bug.cgi?id=729337
2014-09-14 10:21:46 +02:00
Adel Gadllah
ab40dfdd51 Revert "prefs: Scale the root window cursor by the scale factor"
This reverts commit 4fe66ce0a9.

This is wrong ... we should not scale the cursor size but read
the cursor xsettings that gets exported by gsd. Also this won't update on
resolution changes.

https://bugzilla.gnome.org/show_bug.cgi?id=729337
2014-09-14 10:21:46 +02:00
Jasper St. Pierre
1445903a34 prefs: Don't crash when we get a preference changed we don't know about
We commonly used the generic, undetailed signal 'changed' to track
changes to preferences. Since we crash on unknown preference types,
this can be dangerous if somebody adds a new setting that has a
type we're unfamiliar with, and something else changes it.

Instead of crashing, just fizzle out doing nothing.
2014-08-19 14:07:55 -04:00
Jasper St. Pierre
0b98fbab0a Remove a few extra "ui.h" includes 2014-08-17 23:02:15 -04:00
Jasper St. Pierre
5b8dc37c31 prefs: Fix indentation 2014-08-17 23:00:05 -04:00
Jasper St. Pierre
f42258327b util: Move the text direction stuff out of MetaUI
GTK+ doesn't need to be initialized to get locale direction,
which means we can do this without bringing up MetaUI at all.
2014-08-17 22:59:43 -04:00
Christophe Fergeau
20a6243c85 Remove use of META_KEY_BINDING_REVERSES
Now that the internal mutter bindings and gnome-shell stopped using
META_KEY_BINDING_REVERSES, and after moving the 'adding shift reverses
the keybinding action' logic to gnome-control-center, we can remove
META_KEY_BINDING_REVERSES from mutter.

Plugin API is broken as this constant is removed from the exported
headers. ABI is broken as using this flag is now a noop.

https://bugzilla.gnome.org/show_bug.cgi?id=732385
2014-08-17 19:29:43 +02:00
Jasper St. Pierre
e0c92befd5 prefs: Actually insert the SCHEMA_MOUSE settings 2014-08-15 20:24:11 -04:00
Jasper St. Pierre
67be4e2bf3 window: Don't use GTK+ to fetch the drag threshold
Just look it up in GSettings ourselves.
2014-08-15 18:35:20 -04:00
Jasper St. Pierre
4fe66ce0a9 prefs: Scale the root window cursor by the scale factor
This fixes small cursors on HiDPI displays.
2014-07-27 18:09:12 +02:00
Florian Müllner
d7e99a3f86 prefs: Queue change notification when app menu visibility changed
Toggling the option should have an immediate effect, not only on
frame/state changes.
2014-06-11 23:34:09 +02:00
Florian Müllner
d380d30ef4 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 21:55:03 +02:00
Florian Müllner
c2ea650b3c Add support for app-menu button in window decorations
We want to synchronize the button layouts of our server side
decorations and GTK+'s client side ones. However each currently
may contain buttons not supported by the other, which makes this
unnecessarily tricky.
So add support for a new "appmenu" button in the layout, to display
the fallback app menu in the decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:05 +02:00
Jasper St. Pierre
8640982e68 Convert window menus to a compositor implementation 2014-05-17 15:16:23 -04:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Rico Tzschichholz
ca75513880 prefs: Add center-new-windows setting 2014-04-25 15:26:24 +02:00
Bastien Nocera
d53e04f4c8 Name all timeouts and idles
Better names can be used once we make more use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=727979
2014-04-10 18:59:46 +02:00