Commit Graph

3537 Commits

Author SHA1 Message Date
emersion 3a181ab430 rootston: export XCURSOR_SIZE and XCURSOR_THEME
These can be used by toolkits (currently Qt) to choose a default
cursor theme and size. Note that this isn't a perfect solution:

- Per-seat configuration isn't possible
- It's not possible to set the default image
- Live config reload isn't possible

But it's easy to implement and simple. To fix these remaining
issues a separate protocol would be needed.
2018-10-08 16:02:53 +02:00
ixru 8d0997a5e7 Better placement of visibility check 2018-10-08 15:58:24 +02:00
emersion 97049576f7
Merge pull request #1292 from n3rdopolis/patch-3
meson.build: require logind v237
2018-10-08 09:00:13 +02:00
n3rdopolis cf7323a831
meson.build: require logind v237
Commit 7b52388424 uses a function added in logind v237
2018-10-07 18:26:35 -04:00
ixru 6a9995d18c Fix cursor visibility on surface commit 2018-10-07 21:26:38 +02:00
emersion f44003f04b data-device: remove wlr_data_source.seat_client
Since the source doesn't always come from a client, this field
doesn't make sense. It is replaced by a new "finalized" field in
wlr_client_data_source. This is used to make sure set_actions is
not sent after start_drag has been sent.

A check in data_offer_choose_action has been removed: if an offer
has been sent then start_drag has been called, no need to check.

I also wanted to add a check for wl_data_source.offer, but it
turns out (1) this isn't in the spec (2) it breaks GTK+.

This is some preliminary work for Firefox on Wayland compatibility.
2018-10-07 16:01:57 +02:00
Drew DeVault fb5572db5a
Merge pull request #1286 from emersion/drm-no-crtc
backend/drm: better handle GPUs without CRTCs
2018-10-07 16:00:39 +02:00
emersion 37de179013 backend/drm: fix zero-length VLAs 2018-10-07 13:04:52 +02:00
emersion 776008da69 backend/drm: properly handle GPUs without CRTCs 2018-10-07 12:59:00 +02:00
Scott Anderson eb44d18cdd
Merge pull request #1284 from emersion/schedule-frame
output: don't trigger a frame immediately in schedule_frame
2018-10-05 20:15:09 +02:00
emersion 5afaccedfc output: fix busy loop when backend doesn't implement schedule_frame 2018-10-05 16:26:40 +02:00
emersion ba91422747 output: don't trigger a frame immediately in schedule_frame
This desynchronizes our rendering loop with the vblank cycle.

In case a compositor doesn't swap buffers but schedules a frame,
emitting a frame event immediately enters a busy-loop.

Instead, ask the backend to send a frame when appropriate. On
Wayland we can just register a frame callback on our surface. On
DRM we can do a no-op pageflip.

Fixes #617
Fixes swaywm/sway#2748
2018-10-05 16:18:37 +02:00
Drew DeVault 4e89a21397
Merge pull request #1283 from swaywm/revert-1282-fix-idle-frame
Revert "Prevent excessive frame events when compositor doesn't swap buffers"
2018-10-05 13:56:42 +02:00
Drew DeVault 1e70b4cea2
Revert "Prevent excessive frame events when compositor doesn't swap buffers" 2018-10-05 07:37:41 -04:00
Drew DeVault 1280b4920d
Merge pull request #1282 from RyanDwyer/fix-idle-frame
Prevent excessive frame events when compositor doesn't swap buffers
2018-10-05 13:10:22 +02:00
Ryan Dwyer b7b781ff44 Prevent excessive frame events when compositor doesn't swap buffers
When we send an output frame event, we should not assume that the
compositor is going to call wlr_output_swap_buffers in response to it.
If the compositor does not swap the buffers, the idle event source still
exists and is executed every time the Wayland event loop becomes idle,
which means we send frame events repeatedly until the buffers are
swapped.

This moves the removal of the idle event source out of
wlr_output_swap_buffers and into wlr_output_send_frame, where it is
guaranteed to be removed.
2018-10-05 20:14:34 +10:00
Drew DeVault 24a48d4858
Merge pull request #1272 from emersion/presentation-time
Implement presentation-time
2018-10-04 22:18:19 +02:00
emersion eac7c2ad2f output: add presentation refresh prediction 2018-10-04 22:00:24 +02:00
emersion abd3e995ab rootston: send presentation events 2018-10-04 22:00:23 +02:00
emersion ba63d77ec1 rootston: add output_for_each_surface 2018-10-04 22:00:23 +02:00
emersion 0aafd6e234 rootston: add layer_for_each_surface 2018-10-04 22:00:23 +02:00
emersion b0635bf3e7 Rename get_present_clock to get_presentation clock, use it 2018-10-04 22:00:22 +02:00
emersion abddfc99f2 output: fix clock_gettime return value handling 2018-10-04 21:58:17 +02:00
emersion 54e1287f30 backend: add get_present_clock 2018-10-04 21:58:17 +02:00
emersion 9203bfdd4f output: document signals 2018-10-04 21:56:38 +02:00
emersion 26b9d6dbb1 output: send present event from all backends 2018-10-04 21:56:38 +02:00
emersion 78389fe722 output: add present event 2018-10-04 21:56:38 +02:00
emersion 3aad9fd6a9 presentation-time: add protocol implementation 2018-10-04 21:55:31 +02:00
emersion f5a147b739 backend/drm: add support for the link-status property 2018-10-04 21:54:27 +02:00
emersion c67ce71fdd
Merge pull request #1281 from aereaux/edid-sizes
Update sizes for new EDID database.
2018-10-04 18:13:58 +02:00
Drew DeVault 841d04db99
Merge pull request #1262 from nyorain/session_fix
Improve session handling
2018-10-04 17:36:39 +02:00
Aidan Epstein 0036161867 Update sizes for new EDID database. 2018-10-04 08:11:09 -07:00
Drew DeVault 0d23fb7b6d
Merge pull request #1279 from emersion/update-edid-manufacturers
backend/drm: update EDID manufacturers database
2018-10-04 16:37:16 +02:00
nyorain b4d46aa9c2 Use sd_bus_get_property_trivial & remove numbering 2018-10-04 14:04:06 +02:00
emersion 7ab37bf152 backend/drm: update EDID manufacturers database 2018-10-04 10:58:45 +02:00
random human 3e0a0f3c3a
wlr_surface: add wlr_surface_get_effective_damage
This calculates and returns the effective damage of the surface in
surface coordinates, including the client damage (in buffer
coordinates), and damage induced by resize or move events.
2018-10-04 02:19:09 +05:30
Scott Anderson 43af104fa3
Merge pull request #1277 from emersion/reset-gamma
backend/drm: reset gamma table on VT switch
2018-10-03 13:16:59 +02:00
emersion e88db9a3fb backend/drm: reset gamma table on VT switch 2018-10-03 10:53:35 +02:00
emersion 2beb68007e output: make gamma size a size_t and gamma table const 2018-10-03 10:36:33 +02:00
Drew DeVault 1dd523c34c
Merge pull request #1275 from linkmauve/fix-xdg-decoration-destroy-crash
Fix a crash on zxdg_decoration_manager_v1 destroy
2018-10-01 15:01:16 +02:00
Emmanuel Gil Peyrot 130bf15cfa Fix a crash on zxdg_decoration_manager_v1 destroy
When this request was called from a client, the unimplemented callback
was NULL and thus was crashing rootston.
2018-10-01 14:45:17 +02:00
emersion 890bbd7b5c
Merge pull request #1271 from emersion/gamma-control-destroy
gamma-control-v1: add missing destroy handler
2018-09-30 09:45:52 +02:00
emersion f5ff702a69 gamma-control-v1: add missing destroy handler 2018-09-29 14:30:41 +02:00
emersion 0347d542ee
Merge pull request #1265 from sghctoma/conditional-b_lundef
Set b_lundef to false on FreeBSD in meson.build
2018-09-28 16:37:09 +02:00
sghctoma 65359718c4 Use == to check system instead of a prefix match 2018-09-28 15:35:33 +02:00
sghctoma 1d017c1cc1 Set minimum Meson version to 0.48.0
This commit sets the required Meson version to >=0.48.0, and removes the
comment about building on FreeBSD requires an extra flag.
2018-09-28 14:40:15 +02:00
Drew DeVault 936ec02266
Merge pull request #1268 from emersion/drm-connector-disappeared
backend/drm: don't free connector immediately
2018-09-28 04:23:10 -05:00
emersion 132f08175d
Merge pull request #1269 from ivyl/remove_xcb_image
xwayland/xwm: Stop including xcb_image.h
2018-09-28 11:17:39 +02:00
Arkadiusz Hiler ae7c3f3d1c xwayland/xwm: Stop including xcb_image.h
It's not used (XCB_IMAGE_FORMAT_Z_PIXMAP comes from xproto.h) and we
don't even have a pkg-config dependency on xcb-image, making the build
to fail on that inclusion on systems without the package.
2018-09-28 11:47:50 +03:00
emersion 79dd9ba151 backend/drm: don't free connector immediately
When a pageflip is pending, we'll get a DRM event for the connector
in the future. We don't want to free the connector immediately
otherwise we'll use-after-free in the pageflip handler.

This commit adds a new state, "DISAPPEARED". This asks the pageflip
handler to destroy the output after it's done pageflipping.
2018-09-28 10:00:40 +02:00