1
0
Fork 0
A repository that has original sources for patches used in the Arch User Repository package called "mutter-performance". https://aur.archlinux.org/packages/mutter-performance
Find a file
Jonas Dreßler ef1f65a013 clutter/text: Emit cursor-changed right after setting cursor position
ClutterText has a bit of a mess around its signalling of changes to the
cursor position: There's the position (deprecated) and cursor-position
property, and  there's the cursor-changed and cursor-event (deprecated)
signal. The two properties are supposed to be notified when the cursor
position changes, and the two signals are notified when the cursor
position or size changes.

Now the properties notifications and the signals get fired in two very
different places: The two properties are notified in
clutter_text_set_cursor_position(), while the signals are fired during
the paint cycle when we figured out the final cursor position. The
latter is a pretty bad idea, nobody expects such a signal to be fired
during painting, and also changes to the text that are done in the
signal handler will only be applied on the next paint.

Now StEntry listens to cursor position changes via cursor-changed and
invalidates its text shadow, but since the signal is only notified
during the paint, the old text shadow will still get applied. To fix
this, also emit the cursor-changed signal when we notify the
cursor-position property.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1757>
2021-03-05 18:58:44 +00:00
.gitlab/issue_templates gitlab: Add missing < in markdown comment tag 2020-02-14 03:10:28 +00:00
.gitlab-ci ci: Install Xwayland from git 2021-01-25 15:14:35 +00:00
clutter clutter/text: Emit cursor-changed right after setting cursor position 2021-03-05 18:58:44 +00:00
cogl cogl: Stop using GSlice 2021-02-22 13:51:30 +01:00
data data: Updated exposed keybindings 2021-02-04 00:09:57 +01:00
doc Add MetaGravity and replace X11 equivalent with it 2020-02-29 21:01:50 +00:00
meson build: Add postinstall script 2019-08-27 09:57:54 +00:00
po Update Basque translation 2021-02-28 18:55:03 +00:00
src backend/native: Add tests for refresh rate calculation 2021-03-05 14:37:48 +00:00
subprojects build: bump ABI to sysprof-capture-4 2020-07-28 11:13:30 -07:00
tools tools: Remove obsolete ppa-magic.py 2018-11-30 11:12:12 +08:00
.gitignore build: bump ABI to sysprof-capture-4 2020-07-28 11:13:30 -07:00
.gitlab-ci.yml ci: Update ci-fairy image 2021-03-04 11:13:41 +00:00
config.h.meson xwayland: Check for listenfd option 2021-01-22 11:40:30 +01:00
COPYING Updated obsolete FSF postal address in COPYING 2014-01-12 08:44:30 +07:00
meson.build Post-release version bump 2021-02-22 15:52:04 +01:00
meson_options.txt xwayland: Check X11 clients prior to terminate Xwayland 2021-01-18 17:52:22 +01:00
mutter.doap mutter.doap: Add marge-bot as a maintainer 2020-11-16 11:59:45 +01:00
NEWS Tag release 40.beta 2021-02-22 15:44:43 +01:00
README.md README: Elaborate coding style and commit message guidelines 2020-10-28 07:28:55 +00:00

Mutter

Mutter is a Wayland display server and X11 window manager and compositor library.

When used as a Wayland display server, it runs on top of KMS and libinput. It implements the compositor side of the Wayland core protocol as well as various protocol extensions. It also has functionality related to running X11 applications using Xwayland.

When used on top of Xorg it acts as a X11 window manager and compositing manager.

It contains functionality related to, among other things, window management, window compositing, focus tracking, workspace management, keybindings and monitor configuration.

Internally it uses a fork of Cogl, a hardware acceleration abstraction library used to simplify usage of OpenGL pipelines, as well as a fork af Clutter, a scene graph and user interface toolkit.

Mutter is used by, for example, GNOME Shell, the GNOME core user interface, and by Gala, elementary OS's window manager. It can also be run standalone, using the command "mutter", but just running plain mutter is only intended for debugging purposes.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/mutter.

It can be useful to look at the documentation available at the Wiki.

Coding style and conventions

The coding style used is primarily the GNU flavor of the GNOME coding style with some additions:

  • Use regular C types and stdint.h types instead of GLib fundamental types, except for gboolean, and guint/gulong for GSource ids and signal handler ids. That means e.g. uint64_t instead of guint64, int instead of gint, unsigned int instead of guint if unsignedness is of importance, uint8_t instead of guchar, and so on.

  • Try to to limit line length to 80 characters, although it's not a strict limit.

  • Usage of g_autofree and g_autoptr are encouraged. The style used is

  g_autofree char *text = NULL;
  g_autoptr (MetaSomeThing) thing = NULL;

  text = g_strdup_printf ("The text: %d", a_number);
  thing = g_object_new (META_TYPE_SOME_THING,
                        "text", text,
                        NULL);
  thinger_use_thing (rocket, thing);
  • Declare variables at the top of the block they are used, but avoid non-trivial logic among variable declarations. Non-trivial logic can be getting a pointer that may be NULL, any kind of math, or anything that may have side effects.

  • Instead of boolean arguments in functions, prefer enums or flags when they're more expressive.

  • Use g_new0() etc instead of g_slice_new0().

  • Initialize and assign floating point variables (i.e. float or double) using the form floating_point = 3.14159 or ratio = 2.0.

Git messages

Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit. Try to always prefix commit subjects with a relevant topic, such as compositor: or clutter/actor:, and it's always better to write too much in the commit message body than too little.

License

Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.