Commit graph

5545 commits

Author SHA1 Message Date
Drew DeVault
a22311ec76
Merge pull request #1400 from emersion/xcursor-fixes
xcursor: port a few fixes
2018-11-28 07:42:44 -05:00
Drew DeVault
3033f33a1d
Merge pull request #1399 from emersion/fix-wl-backend-zero-vla
backend/wayland: fix zero-length VLA
2018-11-28 07:41:55 -05:00
Louis Taylor
b3f51e39f8 view_at: remove unused variable 2018-11-27 21:36:24 -05:00
Cosimo Cecchi
14f45c056f
xcursor: Support XDG user data dir location
Nowadays ~/.icons is not used anymore as the preferred location for custom
user icon themes; XDG_DATA_HOME/icons (aka ~/.local/share/icons) is what
toolkits like GTK prefer. Prepend that location to the default xcursor path, so
that cursor themes installed there can be used by apps and toolkits that use
libXcursor.

Port of https://cgit.freedesktop.org/xorg/lib/libXcursor/commit/src?id=2263c196cb0dcb8547b378df7b35f83b8b99c01e
2018-11-27 23:21:07 +01:00
Philipp Ludwig
e7fba556a8
xcursor: fix crash when encountering cursor themes with circular dependencies
Port of https://cgit.freedesktop.org/xorg/lib/libXcursor/commit/src?id=f64a8cc1a65dcad4294e2988b402a34175019663
2018-11-27 23:19:26 +01:00
emersion
408e2a77e9
backend/wayland: fix zero-length VLA 2018-11-27 23:18:12 +01:00
emersion
658b590567
gtk-primary-selection: fix segfault when no focus 2018-11-27 21:09:41 +01:00
emersion
bfa7f4ee0d
gtk-primary-selection: use impl pattern for sources 2018-11-27 20:16:55 +01:00
emersion
cbe42d1006
gtk-primary-selection: remove offer struct
We don't need it, we can use the device instead.
2018-11-27 19:45:39 +01:00
emersion
f001f98cef
gtk-primary-selection: refactor everything, untie from seat
This commits completely refactors wlr_gtk_primary_selection. The goal is to
remove gtk-primary-selection state from the seat and better handle inert
resources where it makes sense.

wlr_seat_client.primary_selection_devices has been removed and replaced by
wlr_gtk_primary_selection_device. This allows us to make offers inert when the
current selection is replaced.

wlr_seat_set_primary_selection has been removed because it relied on wlr_seat
instead of wlr_gtk_primary_selection_device_manager. A new function,
wlr_gtk_primary_selection_device_manager_set_selection (candidate for the
longest function name in wlroots) has been added. It doesn't take a serial
anymore as serial checking only makes sense for set_selection requests coming
from Wayland clients (serial checking is now done in the Wayland interface
implementation).

Since wlr_gtk_primary_selection_device_manager is now required to set the
selection, a new function wlr_xwayland_set_gtk_primary_selection_device_manager
(candidate number two for longest function name) has been added.

Devices are now made inert when the seat goes away.

Future work includes removing the last primary selection bits from the seat,
mainly wlr_seat.primary_selection_source and wlr_seat.events.primary_selection,
replacing those with new fields in wlr_gtk_primary_selection_device. Or maybe
we could keep those in the seat and replace them with a re-usable interface
(for future zwp_primary_selection_v1 support). We need to think how we'll sync
these three protocols (GTK, X11 and wayland-protocols).

See https://github.com/swaywm/wlroots/issues/1388
2018-11-27 18:57:26 +01:00
Louis Taylor
b1d820c492 Correct WLR_BUTTON_PRESSED to WLR_KEY_PRESSED
This worked since it was the same value, but results in compile
warnings.
2018-11-26 21:09:23 -05:00
Drew DeVault
05bb440786
Merge pull request #1387 from emersion/rename-gtk-primary-selection
Rename wlr_primary_selection to wlr_gtk_primary_selection
2018-11-26 18:36:23 -05:00
Drew DeVault
a2b8d47ff2
Merge pull request #1384 from emersion/data-multiple-devices
data-device: allow multiple devices for the same seat
2018-11-26 18:25:59 -05:00
Drew DeVault
ed1ffddba8
Merge pull request #1396 from emersion/fix-destroyed-subsurface
surface: fix destroyed subsurfaces handling
2018-11-26 18:24:23 -05:00
emersion
a5b8ea90d2
surface: fix destroyed subsurfaces handling
wlr_subsurface_from_wlr_surface can return NULL if the wl_surface is still
alive and if the wl_subsurface has been destroyed. Make sure we check for NULL.

Fixes https://github.com/swaywm/sway/issues/3195
2018-11-26 23:17:52 +01:00
emersion
4423f88fac
data-device: never cancel the source when offer is destroyed
The source could be used in another offer.
2018-11-26 12:35:49 +01:00
emersion
5d26da9d15
data-device: allow multiple devices for the same seat
This commit makes it possible for a single client to have multiple data devices
for the same seat. This fixes issues with Firefox.

This mainly removes wlr_data_source.offer. We make sure we create one data
offer per device. We now make the offer inert when the source is destroyed.

Fixes the second half of https://github.com/swaywm/wlroots/issues/1041
2018-11-26 12:35:48 +01:00
Ryan Dwyer
eaa852ed77
Merge pull request #1395 from emersion/text-input-log-newline
text-input-v3: remove newline in log message
2018-11-26 21:28:56 +10:00
emersion
27d1910bec
text-input-v3: remove newline in log message 2018-11-26 12:15:34 +01:00
Drew DeVault
b5093a940b
Merge pull request #1392 from emersion/disable-static-analysis
Disable Clang static analysis
2018-11-25 17:31:01 -05:00
Drew DeVault
90f1a34d2c
Merge pull request #1375 from emersion/tablet-segfault
tablet-v2: fix segfault on display destroy
2018-11-25 17:30:31 -05:00
emersion
18e26cba78
Disable Clang static analysis 2018-11-25 20:09:02 +01:00
emersion
9e50e19374
Merge pull request #1391 from buffet/fix-loc-count
Fixed loc count in readme
2018-11-24 23:29:59 +01:00
buffet
443dece7d5 Fixed loc count in readme 2018-11-24 21:24:29 +01:00
emersion
88994b18d5
Merge pull request #1390 from ammen99/fix-preferred-read-format
output: add wlr_output_preferred_read_format()
2018-11-24 14:53:20 +01:00
Ilia Bozhinov
fb5691b6cc output: add wlr_output_preferred_read_format()
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
2018-11-24 10:54:25 +01:00
emersion
811a4d997b
Rename wlr_primary_selection to wlr_gtk_primary_selection 2018-11-23 11:58:56 +01:00
emersion
c70b8f64b7
Merge pull request #1385 from atomnuker/master
Fix interlaced mode rejection
2018-11-22 19:17:08 +01:00
Rostislav Pehlivanov
91513c89cd Fix interlaced mode rejection 2018-11-22 17:52:52 +00:00
emersion
42e8e3ed0a
Merge pull request #1380 from emersion/gtk-primary-selection-multiple-devices
gtk-primary-selection: support multiple devices
2018-11-21 22:29:36 +01:00
emersion
b20f4cd495
Merge pull request #1382 from atomnuker/master
Skip interlaced modes during drm mode detection
2018-11-21 20:48:56 +01:00
Rostislav Pehlivanov
dc9fdd6385 Skip interlaced modes during drm mode detection
Fixes #3167
A better solution could be made if there's a need to.
2018-11-21 19:23:48 +00:00
emersion
eaafd65a12
gtk-primary-selection: track resources 2018-11-21 11:16:31 +01:00
emersion
b9a2e4ba4c
gtk-primary-selection: support multiple devices
When a client was creating multiple data devices for the same seat, we were
only creating one resource. This is a protocol error.

Instead, create one offer per data device.

This commit also makes offers inert when their source is destroyed.

Fixes part of https://github.com/swaywm/wlroots/issues/1041
Supersedes https://github.com/swaywm/wlroots/pull/1113
2018-11-21 11:16:25 +01:00
Drew DeVault
040d62de00
Merge pull request #1366 from emersion/render-software-cursors
Render software cursors in compositor
2018-11-13 14:47:32 -05:00
emersion
1b9ebcf645
output: make wlr_egl flip the damage 2018-11-13 16:55:33 +01:00
emersion
ca770995cc
output: add wlr_output_render_software_cursors
Rendering in wlr_output_swap_buffers has unfortunate side-effects.
2018-11-13 16:55:33 +01:00
emersion
57307b7aa7
output: remove wlr_output_set_fullscreen_surface
This wasn't using direct scan-out. Direct scan-out will probably
work differently with @ascent12's work anyway.
2018-11-13 16:55:33 +01:00
emersion
df7d4a71fb
Merge pull request #1368 from ascent12/x11_backend
X11 backend improvements
2018-11-13 07:53:43 +01:00
Scott Anderson
d3ee69f76b backend/x11: Hide cursor with Xfixes 2018-11-13 10:55:03 +13:00
Scott Anderson
70ae76304e backend/x11: Remove old input functions
This also allows us to remove xcb-xkb, since Xinput will now give us the
appropriate XKB modifiers with each event.
2018-11-13 10:55:03 +13:00
Scott Anderson
d89e868cc9 backend/x11: Add new Xinput events 2018-11-13 10:42:02 +13:00
Scott Anderson
88b2d6fe25 backend/x11: Check for xinput extension 2018-11-13 10:41:37 +13:00
Scott Anderson
9c1b87f210 backend/x11: Move atom initilisation earlier
There isn't any real reason to delay this until the backend is started.
2018-11-13 10:40:52 +13:00
Scott Anderson
ab2c57984b backend/x11: Make header order consistent 2018-11-13 10:40:52 +13:00
Scott Anderson
51a283cbe4 backend/x11: Rename xcb_conn to xcb
When the Xlib connection is removed, this _conn suffix is going to be
pointless. I'm removing this preemtively for that.
2018-11-13 10:39:24 +13:00
Drew DeVault
4aff85cc8e
Merge pull request #1373 from emersion/fix-teardown-segfaults
xdg-shell: don't destroy xdg role state on role destroy
2018-11-12 16:15:36 -05:00
Drew DeVault
77dfac4fa4
Merge pull request #1372 from emersion/config10
Use #if instead of #ifdef for wlroots config data
2018-11-12 16:14:18 -05:00
Drew DeVault
d2d8372cdc
Merge pull request #1369 from ascent12/wayland_backend
Wayland backend improvements
2018-11-12 16:13:18 -05:00
emersion
89ec624f81
tablet-v2: fix segfault on display destroy 2018-11-12 20:05:13 +01:00