1
0
Fork 0
mutter-performance-source/src/wayland
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
..
protocol wayland/pointer-gestures: Send error on protocol version mismatch 2015-08-22 00:04:33 +08:00
meta-wayland-buffer.c wayland: Seal SHM buffers before access 2015-01-09 16:39:37 -08:00
meta-wayland-buffer.h wayland: Move some buffer manipulation functions to meta-wayland-buffer 2014-10-07 20:42:27 -07:00
meta-wayland-data-device-private.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-data-device.c wayland: GObject:ify surface roles 2015-09-13 21:24:58 +08:00
meta-wayland-data-device.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-wayland-keyboard.c Avoid declaring variables in for loop to avoid upsetting older GCC 2015-09-03 16:13:50 -04:00
meta-wayland-keyboard.h Nested X11: use KeymapNotify events to fix key state on FocusIn 2015-09-03 16:02:25 -04:00
meta-wayland-outputs.c wayland: Don't crash if wl_output resource is destroyed after being removed 2015-07-15 14:55:55 +08:00
meta-wayland-outputs.h wayland: Send wl_surface.enter and wl_surface.leave 2015-07-15 14:55:55 +08:00
meta-wayland-pointer-gesture-pinch.c wayland: Implement the wl_pointer_gesture_pinch interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gesture-pinch.h wayland: Implement the wl_pointer_gesture_pinch interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gesture-swipe.c wayland: Implement the wl_pointer_gesture_swipe interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gesture-swipe.h wayland: Implement the wl_pointer_gesture_swipe interface 2015-08-10 17:23:23 +02:00
meta-wayland-pointer-gestures.c wayland/pointer-gestures: Send error on protocol version mismatch 2015-08-22 00:04:33 +08:00
meta-wayland-pointer-gestures.h wayland: Implement wl_pointer_gestures 2015-08-10 17:30:12 +02:00
meta-wayland-pointer.c Support scaling of cursor sprites given what output they are on 2015-09-13 21:26:22 +08:00
meta-wayland-pointer.h Support scaling of cursor sprites given what output they are on 2015-09-13 21:26:22 +08:00
meta-wayland-popup.c wayland: Fail clients who try to create or destroy a not-top-most popup 2015-02-17 22:14:47 +08:00
meta-wayland-popup.h wayland: Fail clients who try to create or destroy a not-top-most popup 2015-02-17 22:14:47 +08:00
meta-wayland-private.h wayland: Implement wl_pointer_gestures 2015-08-10 17:30:12 +02:00
meta-wayland-region.c wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-region.h wayland: Make the MetaWaylandRegion type opaque 2014-10-07 20:44:19 -07:00
meta-wayland-seat.c wayland: Move cursor surface role to meta-wayland-pointer.c 2015-09-13 21:26:22 +08:00
meta-wayland-seat.h wayland: Move cursor surface role to meta-wayland-pointer.c 2015-09-13 21:26:22 +08:00
meta-wayland-surface.c wayland: Move cursor surface role to meta-wayland-pointer.c 2015-09-13 21:26:22 +08:00
meta-wayland-surface.h wayland: Move cursor surface role to meta-wayland-pointer.c 2015-09-13 21:26:22 +08:00
meta-wayland-touch.c configure: Conditionalize libinput and gbm too 2014-08-27 09:57:43 -04:00
meta-wayland-touch.h wayland: Handle window drags for touch events 2014-07-24 18:05:56 +02:00
meta-wayland-types.h MetaWaylandPointer: Put client resources in its own struct 2015-08-10 17:23:23 +02:00
meta-wayland-versions.h wayland/pointer-gestures: Send error on protocol version mismatch 2015-08-22 00:04:33 +08:00
meta-wayland.c Nested X11: use KeymapNotify events to fix key state on FocusIn 2015-09-03 16:02:25 -04:00
meta-wayland.h Nested X11: use KeymapNotify events to fix key state on FocusIn 2015-09-03 16:02:25 -04:00
meta-window-wayland.c wayland: GObject:ify surface roles 2015-09-13 21:24:58 +08:00
meta-window-wayland.h wayland: Take scale into account when placing windows relatively 2015-07-16 11:54:14 +08:00
meta-xwayland-private.h xwayland: Implement wayland-to-X11 DnD 2015-05-29 11:27:53 +02:00
meta-xwayland-selection-private.h wayland: Make MetaWaylandDataSource ownership protocol specific 2015-06-30 11:23:40 +08:00
meta-xwayland-selection.c xwayland: Add missing include 2015-09-07 14:13:48 +01:00
meta-xwayland.c wayland: GObject:ify surface roles 2015-09-13 21:24:58 +08:00
meta-xwayland.h xwayland: Switch to the new Xwayland DDX 2014-04-02 13:24:57 -04:00