Commit graph

780 commits

Author SHA1 Message Date
emersion
0c7371221c
rootston: fix segfault when destroying unmapped fullscreen views 2018-10-28 23:15:36 +01:00
emersion
1454d1c8f8
rootston: fix segfault in view_at
Make sure the view is mapped.
2018-10-28 23:14:39 +01:00
Sorcus
7c540aa9fe Fix "variable ‘cursor_default’ set but not used" 2018-10-28 10:58:13 +00:00
Guido Günther
175ccc2517 rootston: Don't let the wlr_output handle the fullscreen view in case of layer-shell overlays
Otherwise the overlays will no tbe drawn.

Closes: #1300
2018-10-17 16:59:06 +02:00
Dorota Czaplejewicz
66a38374ee text-input: Accept disable requests
The disable signal on text-input objects must not be ignored. It is only sent when the previous state was enabled.
2018-10-13 20:46:53 +00:00
Dorota Czaplejewicz
226eedfa2b text-input: fix releasing destroy handlers 2018-10-12 20:09:11 +00:00
Drew DeVault
66e8908e9a
Merge pull request #1203 from dcz-purism/input
Support input method and text input
2018-10-12 13:44:46 +02:00
Dorota Czaplejewicz
585757d6e6 rootston: add support for text input and the basic of input method
The compositor acts as a relay between applications using the text-input protocol and input methods using the input-method protocol.

This change implements the basic but useful support for input-method, leaving out grabs as well as popups.
2018-10-09 09:56:46 +00:00
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
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
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
19f3804548
Merge pull request #1266 from Ongy/xdc_tablet_fix
Fix tablet_tool tilt and send proximity_out
2018-09-27 16:24:35 -05:00
Markus Ongyerth
3e494efc5c Fix tablet_tool tilt and send proximity_out
Originally I asumed tilt_x and tilt_y are very unlikely to change
independent, I was proven wrong.
And while investigating Krita not using the Erasor tool, I found a bug,
which is unrelated though.
2018-09-27 18:31:50 +02:00
emersion
792b1f5cbf rootston: remove broken rotated pointer constraint handling 2018-09-27 10:42:35 +02:00
emersion
dac4f8e19f pointer-constraints: refactoring
* Rename the constraint_create signal to new_constraint for
  consistency
* Move the constraint_destroy signal to the constraint itself
* Use rotate_child_position instead of duplicating logic
* Fix inert constraint resource handling
* Style fixes
2018-09-27 10:25:59 +02:00
emersion
31cc2fa4f9 pointer-constraints: make region not a pointer, add committed bitfield 2018-09-26 23:08:52 +02:00
nyorain
7b52388424 Rework session handling
Sessions can now be retrieved from a backend in a more general manner.
Multi-backend gets back its `session` field that contains the session
if one was created, removing the interfacing from multi backend with the
drm backend directly. This adds the possibility to use sessions even
without the drm backend.

It additionally fixes the bug that 2 session objects got created when
WLR_BACKENDS were set to "libinput,drm".

To allow vt switching without drm backend (and drm fd) on logind, start
listening to PropertiesChanged signals from dbus and parse the session
"Active" property when no master fd was created (this does not change
current drm backend behaviour in any way).
2018-09-24 23:35:09 +02:00
Las
afa2e399aa Fix implicit conversion of floats to ints in calls to pixman_region32_contains_point
I do not think the conversion is specifically defined, but on my system and SirCmpwn's
the floats are rounded instead of floored, which is incorrect in this case, since
for a range from 0 to 256, any value greater or equal to 0 and less than 256 is valid.
I.e. [0;256[, or 0 <= x < 256, but if x is e.g. -0.1, then it will be rounded to 0, which
is invalid. The correct behavior would be to floor to -1.
2018-09-18 13:05:44 +02:00
Las
fa2e6e7d9d Implement pointer-constraints protocol in wlroots and rootston 2018-09-18 10:14:33 +02:00
Las
437f538772 Make wlr_seat->data in rootston point to the wrapping roots_seat 2018-09-18 10:14:33 +02:00
Las
57690594f4 Remove extraneous indentation and conform to coding style 2018-09-18 10:14:33 +02:00
Las
59dd1dddba Update pointer focus when cycling focus 2018-09-18 10:14:33 +02:00
Las
cf9debf82e Make roots_cursor::pointer_view available even if there is a surface
To find out whether there was a surface or not before a movement, the member
roots_cursor::wlr_surface has been added.
2018-09-18 10:14:33 +02:00
Drew DeVault
0210905eef
Merge pull request #1243 from emersion/layer-shell-suffix
layer-shell: add _v1 suffix
2018-09-14 20:47:42 -04:00
emersion
fc960e5d06 layer-shell: add _v1 suffix 2018-09-14 19:32:33 +02:00
emersion
b3cb22c003 xdg-output: add _v1 suffix 2018-09-14 19:29:08 +02:00
emersion
769a8e9917
Merge pull request #1160 from Ongy/tablet-grabs
Tablet grabs
2018-09-12 19:01:50 +02:00
Dorota Czaplejewicz
e9e65c549a rootston: Keep older anchored layers near anchor points
Layer surfaces are attached to edges of the screen starting with the youngest, causing new ones to always displace existing ones. This changes the order to oldest first, keeping the positions more often.
2018-09-11 11:47:22 +02:00
Drew DeVault
76ad4804bc
Merge pull request #1227 from emersion/rootston-segfault-tablet-destroy
rootston: fix segfault on tablet pad destroy
2018-09-10 21:11:32 -04:00
nyorain
f6168c2afe Fix #1129 and remove sx, sy from wlr_drag_icon
sx, sy used to store the buffer offset of the drag surface which was
then be added (by rootston) to the drag icon position.
Buffer offsets are handled already in surface_intersect_output
(output.c) so they were added twice for dnd surfaces.
2018-09-07 14:48:28 +02:00
Drew DeVault
73423c988c
Merge pull request #1213 from arandomhuman/wlr_log_get_verbosity
Add wlr_log_get_verbosity method
2018-09-03 11:15:12 -04:00
random human
cdf41fa627
Add support for setting log verbosity in rootston 2018-09-03 17:34:07 +05:30
emersion
62af1c630a rootston: fix segfault on tablet pad destroy 2018-09-02 21:40:03 +02:00
emersion
2f0815838d Init dmabuf global in renderer 2018-09-02 08:50:43 +02:00
emersion
472476ebcf Do not modeset disabled outputs 2018-09-01 18:30:41 +02:00
random human
8589ae19de Fix bugs listed by clang's static analyzer
A few pedantic changes and unused variables (1-4), and genuine bugs (5,
6).

The reports with the corresponding files and lines numbers are as
follows.

1. backend/libinput/tablet_pad.c@31,44,57
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'unsigned int',
which is incompatible with sizeof operand type 'int'"

2. types/tablet_v2/wlr_tablet_v2_pad.c@371
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'uint32_t', which
is incompatible with sizeof operand type 'int'"

3. types/wlr_cursor.c@335
"Dead initialization"
"Value stored to 'dx'/'dy' during its initialization is never read"

4. rootston/xdg_shell.c@510
"Dead initialization"
"Value stored to 'desktop' during its initialization is never read"

5. types/tablet_v2/wlr_tablet_v2_pad.c@475
"Dereference of null pointer"
"Access to field 'strips' results in a dereference of a null pointer
(loaded from field 'current_client')"

The boolean logic was incorrect (c.f. the check in the following
function).

6. examples/idle.c@163,174,182
"Uninitialized argument value"
"1st function call argument is an uninitialized value"

If close_timeout != 0, but simulate_activity_timeout >= close_timeout,
the program would segfault at pthread_cancel(t1).
2018-08-31 19:41:18 +02:00
Brian Ashworth
939a4ea60f
Merge pull request #1196 from dcz-purism/surface_move
rootston/surface_layers: fix clicking after surface moved
2018-08-28 22:15:50 -04:00
Scott Anderson
fd3fa760d3 Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""
This reverts commit 9c886f20b9.
2018-08-24 19:35:02 +12:00
Drew DeVault
9c886f20b9 Revert "Merge pull request #1194 from ascent12/meson_feature"
This breaks wlroots when used as a meson subproject.

This reverts commit dea311992e, reversing
changes made to 6db9c4b746.
2018-08-23 21:00:58 -04:00
Dorota Czaplejewicz
f4ae9824f7 rootston/layer_shell: fix clicking after surface moved/resized
Layer surfaces are not notified of cursor position changes if the surface moves, only if the cursor moves. This workaround emits a cursor position event every time a cursor ends up over a newly resized layer surface to make sure the following clicks land in the right place.

This change doesn't address sending leave events when a cursor previously present over the surface becomes away.

There are 2 separate mechanisms in play, because a layer surface gets resized in 2 steps:

1. Layer surface resize & rearrange.
2. Underlying surface resize.

The first step may affect all layer surfaces. The cursor events are sent to cursors placed over all layer surfaces which have moved (not been resized). The second step affects any layer surface whose surface changed size. The cursor event is sent only to that surface.

Together, these events cover all surfaces: those which moves, and those which changed size, as long as each layer surface resize is accompanied by an immediate surface resize.
2018-08-23 11:29:03 +02:00
Scott Anderson
560e96aa57 Update rootston to use new option 2018-08-22 20:41:25 +12:00
Scott Anderson
784c20c82f Use new options for X11 backend and Xwayland 2018-08-22 20:27:37 +12:00
emersion
24212df830 rootston: fix again FreeBSD build
Had an outdated copy of wlroots, so missed that one.
2018-08-16 11:22:42 +01:00
emersion
d66d33f5a2
Merge pull request #1188 from emersion/freebsd-fixes
Fix build on FreeBSD
2018-08-16 11:02:21 +01:00
emersion
f86f1daf9a Fix build on FreeBSD 2018-08-16 10:54:45 +01:00