1
0
Fork 0
mutter-performance-source/src/backends/x11
Jonas Ådahl 79c86ae890 Support scaling of cursor sprites given what output they are on
This commits refactors cursor handling code and plugs in logic so that
cursor sprites changes appearance as it moves across the screen.
Renderers are adapted to handle the necessary functionality.

The logic for changing the cursor sprite appearance is done outside of
MetaCursorSprite, and actually where depends on what type of cursor it
is. In mutter we now have two types of cursors that may have their
appearance changed:

 - Themed cursors (aka root cursors)
 - wl_surface cursors

Themed cursors are created by MetaScreen and when created, when
applicable(*), it will extend the cursor via connecting to a signal
which is emitted everytime the cursor is moved. The signal handler will
calculate the expected scale given the monitor it is on and reload the
theme in a correct size when needed.

wl_surface cursors are created when a wl_surface is assigned the
"cursor" role, i.e. when a client calls wl_pointer.set_cursor. A
cursor role object is created which is connected to the cursor object
by the position signal, and will set a correct texture scale given what
monitor the cursor is on and what scale the wl_surface's active buffer
is in. It will also push new buffers to the same to the cursor object
when new ones are committed to the surface.

This commit also makes texture loading lazy, since the renderer doesn't
calculate a rectangle when the cursor position changes.

The native backend is refactored to be triple-buffered; see the comment
in meta-cursor-renderer-native.c for further explanations.

* when we are running as a Wayland compositor

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
..
nested Support scaling of cursor sprites given what output they are on 2015-09-13 21:26:22 +08:00
meta-backend-x11.c backends/x11: Draw our own cursor sprite when running nested 2015-09-13 21:26:22 +08:00
meta-backend-x11.h x11: Add simple cursor renderer 2014-05-17 13:27:16 -04:00
meta-barrier-x11.c barriers: Separate implementation from public API 2015-01-17 17:22:57 -08:00
meta-barrier-x11.h barrier: Fix type cast macros 2015-01-18 13:32:28 -08:00
meta-cursor-renderer-x11.c Support scaling of cursor sprites given what output they are on 2015-09-13 21:26:22 +08:00
meta-cursor-renderer-x11.h x11: Add simple cursor renderer 2014-05-17 13:27:16 -04:00
meta-idle-monitor-xsync.c idle-monitor-xsync: Clean up includes 2014-04-23 13:27:11 -04:00
meta-idle-monitor-xsync.h backends: Start on an initial MetaBackend object 2014-04-21 20:25:21 -04:00
meta-input-settings-x11.c input-settings-x11: check properties for correctness before changing them 2015-07-14 16:42:33 -05:00
meta-input-settings-x11.h backends/x11: Implement X11-specific MetaInputSettings 2015-01-18 13:32:28 -08:00
meta-monitor-manager-xrandr.c monitor-manager-xrandr: don't set underscan property when not supported 2015-07-01 18:22:48 -07:00
meta-monitor-manager-xrandr.h monitor-manager: Expose MetaMonitorManager to introspection 2015-01-30 13:13:49 -05:00