Markus Ongyerth
9313ac1068
propagate rename to rootston code
2018-07-14 09:51:26 +02:00
Markus Ongyerth
d9e978e1b3
rename wlr_tablet_tool to wlr_tablet
...
The previous naming was based on the input-device capability names from
libinput.
With code that uses the libinput_tablet_tool and mapping into tablet-v2,
this is confusing, so the name is changed to follow the names used in
the protocol.
2018-07-14 09:49:58 +02:00
Markus Ongyerth
b84288af16
Remove unused tablet_pad list from tools
2018-07-14 09:48:57 +02:00
Markus Ongyerth
101080a382
Another feedback pass
2018-07-14 09:48:57 +02:00
Markus Ongyerth
48e2cba9b6
Handle relative motion for mouse tools
2018-07-14 09:48:57 +02:00
Markus Ongyerth
2c12011472
Send all tablet tool axis events
2018-07-14 09:47:16 +02:00
Markus Ongyerth
6a40561e4c
Fix clang build errors
2018-07-14 09:47:16 +02:00
Markus Ongyerth
b79d11395c
Hook up set_cursor in rootston
2018-07-14 09:47:16 +02:00
Markus Ongyerth
31cec36b74
1st feedback pass
...
Rename make_ functions to _create
Implement set_cursor and set_feedback
2018-07-14 09:43:16 +02:00
Markus Ongyerth
15870ceb4b
Fix segfaultiness
2018-07-14 09:40:39 +02:00
Markus Ongyerth
5c7a37f309
Add tool buttons
2018-07-14 09:40:39 +02:00
Markus Ongyerth
391eef6ea9
Propagate most axis events to clients
2018-07-14 09:40:39 +02:00
Markus Ongyerth
f375246657
Implement basic tablet_pad handling (bound to keyboard focus)
2018-07-14 09:40:39 +02:00
Markus Ongyerth
e235f7d336
Basic tablet_v2 object lifetime
2018-07-14 09:40:39 +02:00
emersion
7cbef15206
util: add wlr_ prefix to log symbols
2018-07-09 22:49:54 +01:00
Drew DeVault
be54278207
Merge pull request #1095 from agx/output-add-mode
...
Allow to add additional modes to outputs
2018-07-07 08:58:17 -07:00
Guido Günther
60a83e99f4
rootston: use wl_list_empty instead of wl_list_length > 0
2018-07-07 17:31:42 +02:00
Guido Günther
709d7dd722
rootston: Handle modeline parameter
...
This allows to pass custom modes.
2018-07-07 17:31:42 +02:00
emersion
78555abba3
surface: move position and scale out of wlr_surface_state
2018-07-04 19:12:17 +01:00
emersion
233bfe2f4f
surface: do not monkey-patch state damage
2018-07-04 19:12:17 +01:00
emersion
3c0d672ebd
surface: make pending and current embedded structs
2018-07-04 19:12:17 +01:00
emersion
8c2b4244a1
Fix damage tracking debug mode
2018-07-04 15:37:04 +01:00
emersion
73755ad348
screencopy-v1: add basic implementation
2018-06-30 22:17:59 +01:00
Dominique Martinet
1e17f4deb6
rootston: fix leak in handle_layer_shell_surface
...
Found through static analysis
2018-06-30 11:38:21 +09:00
Tony Crisci
356e466d5a
use seat function to end grab
2018-06-24 18:18:30 -04:00
Tony Crisci
e8c0996b93
Merge branch 'master' into cancel-grab-on-focus-change
2018-06-24 18:16:42 -04:00
emersion
57548b557a
Merge branch 'master' into screencontent
2018-06-17 14:49:18 +01:00
emersion
0378d143d9
surface: remove wlr_surface.texture
...
The texture is managed by the surface's wlr_buffer now. In
particular, the buffer can destroy the texture early if it becomes
invalid.
2018-06-13 19:38:10 +01:00
Genki Sky
28d718c0dd
rootston: Cancel existing keyboard grab when changing focus
...
It's possible that a non-default keyboard grab exists when we are trying
to change focus. For example, say there is an XDG popup when we click on
a different window. This popup's keyboard grab will swallow any
keyboard_notify_enter(), meaning the newly-clicked window won't receive
keyboard input.
So, we cancel any existing grabs in roots_seat_set_focus(). Before this
fix, a window would have been set as active but not receive keyboard
entry.
Fixes #233 .
Signed-off-by: Genki Sky <sky@genki.is>
2018-06-10 21:47:49 -04:00
emersion
3a81afed0e
rootston: destroy xwayland before all clients
...
Destroying all clients disconnects the xwayland client, and
xwayland automatically restarts when disconnected.
2018-06-08 09:29:55 +01:00
Tony Crisci
5d3e95f833
dont damage drag icon after update_position
2018-06-06 12:02:01 -04:00
Tony Crisci
7c888a39c6
update drag position at the right times
2018-06-05 23:45:03 -04:00
Tony Crisci
9333acd68e
handle drag icon map in rootston
2018-06-05 23:01:43 -04:00
Tony Crisci
1c75d4e54a
rename drag-icon map to unmap
2018-06-05 18:17:42 -04:00
Markus Ongyerth
3994762ae0
Add wlr_surface_get_geometry
...
This function defaults and clips the xdg-surface geometry to the
bounding box of the surface + its subsurfaces, as specified by the
protocol spec.
2018-06-01 15:21:18 +02:00
emersion
21928cbe61
Merge branch 'master' into screencontent
2018-05-31 12:33:27 +01:00
Genki Sky
32013abae6
rootston: xdg-shell*: Fix get_size() for newly-mapped views
...
The user-visible issue is that newly-mapped xdg-shell* windows would
sometimes start with their top-left-corner, rather than their center, in
the center of the screen. This is because get_size() would
conservatively fall back on (width, height) == (0, 0) if both
set_window_geometry() had not been called, and it found
view->wlr_surface to be NULL.
But, view->wlr_surface is only set to non-NULL in view_map(). We call
get_size() before this. Fortunately, the wlr_surface in question is
accessible via view->xdg_shell{,_v6}->surface, so always fall back on
that. We can assert its presence instead of further falling back on
(width, height) == (0, 0).
Signed-off-by: Genki Sky <sky@genki.is>
2018-05-30 20:21:19 -04:00
emersion
f9ad63c5cb
rootston: use wl_display_destroy_clients
2018-05-29 22:50:26 +01:00
emersion
7901740f94
rootston: enable export-dmabuf
2018-05-29 18:47:17 +01:00
emersion
e1f56538a8
Merge pull request #999 from dcz-purism/virtual-keyboard
...
Support virtual keyboard protocol
2018-05-29 18:22:44 +01:00
Dorota Czaplejewicz
5334ee8bfd
virtual-keyboard: add support for the virtual-keyboard-v1 protocol
2018-05-28 10:05:55 +02:00
emersion
6eb4b5b54d
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
...
render: bind wl_drm in renderer
2018-05-25 13:54:16 +01:00
Ilia Bozhinov
24cf70ae96
backends: implement custom EGL and renderer initialization
...
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.
Fixes #987
2018-05-25 14:56:52 +03:00
Dorota Czaplejewicz
a94c56a828
rootston: Keep focus unchanged when non-focusable element clicked
...
Before this change, a view would lose focus after clicking something that's not keyboard-interactive. This would lead to edge cases with layer-shell windows like input methods, which are pointer-only-interactive, but are not intended to change the state of any focus.
2018-05-24 16:10:29 +02:00
Dorota Czaplejewicz
fa13493ad5
rootston: Disable keyboard focus on inactive views
...
After clicking on something non-interactive, the current view was getting deactivated, but still received keyboard events. roots_seat_set_focus now changes both together in this case.
2018-05-24 16:05:12 +02:00
emersion
41130fe54b
render: bind wl_drm in renderer
2018-05-21 19:07:08 +01:00
emersion
e849a68e6e
output: correctly clear screen when fullscreened
2018-05-20 13:44:18 +01:00
emersion
db84379242
Send axis source event
2018-05-12 13:53:21 +01:00
emersion
0b58579564
Add support for discrete axis values
2018-05-12 13:34:58 +01:00
emersion
8e831cd416
Merge pull request #959 from VincentVanlaer/xwayland-lazy
...
Add the option to start Xwayland only when a client connects
2018-05-08 23:04:26 +01:00
Vincent Vanlaer
6936be984f
Document xwayland rootston config changes
2018-05-08 22:54:45 +02:00
Vincent Vanlaer
ef1a24430a
Make lazy xwayland start default in rootston
2018-05-08 22:43:31 +02:00
emersion
6436ce6300
rootston: remove outdated comment
2018-05-08 15:51:21 +01:00
Markus Ongyerth
8931452e1d
add wlr_layer_surface_surface_at
...
Adds wlr_layer_surface_surface_at, this is consistent with the other
shell implementations, and simplifies handling in compositors.
2018-05-08 16:03:10 +02:00
Vincent Vanlaer
dbf4f9a231
Make startup command no longer wait for xwayland
2018-05-06 23:41:29 +02:00
Vincent Vanlaer
31861b3a7a
Add option to rootston to start xwayland lazy
2018-05-06 23:41:29 +02:00
Vincent Vanlaer
c80bf1591e
Allow xwayland to start lazily
...
Makes the xwayland startup process two phased.
The first phase just initialises the X11 sockets.
The second phase starts the Xwayland server itself.
When starting xwayland lazily the second phase will be postponed until
a client has connected to the X11 socket.
Changes in behaviour:
The DISPLAY environment is now set immediately after the X11 sockets
are created.
When the Xwayland server is killed or crashes, the sockets will not be
recreated, but reused.
Fixes #849 : Start up Xwayland lazily
2018-05-06 23:41:25 +02:00
emersion
393f7aaeff
Fix a rootston crash when a client creates non-topmost popups
2018-05-04 09:27:55 +01:00
Ilia Bozhinov
54bf3a36ca
rootston: remove mode and transform signals when output is destroyed
2018-05-03 11:57:54 +03:00
emersion
9e7a997433
rootston: map input devices with wlr_input_device.output_name
2018-04-29 14:30:13 +01:00
emersion
6e7c0b57f6
cursor: use NAN for unspecified axes, refactor absolute warping code
2018-04-28 09:24:38 +01:00
Guido Günther
b1bd0e2557
layer-shell: Fix crash when cursor is intially outside any output
...
On the X11 backend the cursor position might be outside the output
window so no output is returned leading to the assert to trigger. Use
sane fallback instead of crashing.
2018-04-26 14:08:30 +02:00
Guido Günther
24fa07565d
layer-shell: use output_damage_{whole,from}_local_surface on map/unmap
...
These handle rotation and scaling
2018-04-24 13:11:42 +02:00
Guido Günther
c4dff67e00
layer-shell: use output_damage_{whole,from}_local_surface for popups
...
Reuse what already handles rotation and scaling. This unbreaks popups
on rotated or scaled outputs.
2018-04-24 13:11:42 +02:00
Guido Günther
57cc4c319d
rootston: Send frame_done for popups too
...
Thanks @emersion
2018-04-23 11:24:31 +02:00
Guido Günther
ad22e02310
rootston: Damage layer-shell popups
2018-04-23 11:24:31 +02:00
Guido Günther
d4cb33c9fc
rootston: Let layer_surface_at look at popups
...
This allows them to receive input as well.
2018-04-23 11:24:31 +02:00
Drew DeVault
0a0627f5d0
Finish forward-porting @acrisci's positioner work
2018-04-23 11:24:06 +02:00
Drew DeVault
278aa84619
Basic layer popup rendering
2018-04-23 11:24:06 +02:00
Drew DeVault
edbf4a2f60
Implement output auto-selection in rootston
2018-04-22 19:15:49 +02:00
emersion
fa84b267e0
Remove wlr_surface::subsurface
2018-04-21 18:40:25 +01:00
emersion
70d820be25
Add wlr_renderer_init_wl_shm to advertize supported renderer formats
2018-04-20 23:58:30 +01:00
Guido Günther
47e1eda669
rootston: don't crash on shutdown
...
When e.g. running rootston under X11 it would otherwise crash when
closing rootston like:
#0 0x00007f0197da7327 in wl_list_remove () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#1 0x000056306fcee7fb in handle_destroy (listener=0x5630723a2948, data=0x5630723a5d20) at ../rootston/layer_shell.c:273
#2 0x00007f019800a552 in wlr_signal_emit_safe (signal=0x5630723a5e30, data=0x5630723a5d20) at ../util/signal.c:29
#3 0x00007f0197fef808 in layer_surface_destroy (surface=0x5630723a5d20) at ../types/wlr_layer_shell.c:169
#4 0x00007f0197ff0001 in client_handle_destroy (resource=0x56307229c4c0) at ../types/wlr_layer_shell.c:371
#5 0x00007f0197da2f30 in () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#6 0x00007f0197da77f9 in () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#7 0x00007f0197da301d in wl_client_destroy () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#8 0x00007f0197da30d8 in () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#9 0x00007f0197da4c12 in wl_event_loop_dispatch () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#10 0x00007f0197da344a in wl_display_run () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#11 0x000056306fcef069 in main (argc=3, argv=0x7ffd22032528) at ../rootston/main.c:83
since the output_destroy got already removed in handle_output_destroy.
2018-04-16 15:51:03 +02:00
Drew DeVault
63763d3279
Merge pull request #862 from emersion/renderer-scissor-upside-down
...
Make wlr_renderer_scissor take normal coords instead of upside-down ones
2018-04-13 09:32:41 -04:00
emersion
bcf5da5cd7
Merge pull request #866 from emersion/xwayland-unmapped-on-create
...
xwayland: emit new_surface when unmapped
2018-04-13 08:48:01 -04:00
emersion
fa02e30adf
xwayland: emit new_surface when unmapped
2018-04-13 14:37:13 +02:00
Dominique Martinet
555206cf60
Fix gcc string truncation warnings
2018-04-13 14:37:53 +09:00
emersion
1b802d9251
Make wlr_renderer_scissor take normal coords instead of upside-down ones
2018-04-12 19:38:33 -04:00
Drew DeVault
7efd9885b6
Merge pull request #853 from emersion/xwayland-client-timeout
...
Add wlr_xwayland_surface_ping
2018-04-08 16:30:45 -04:00
emersion
17d0440b75
Add wlr_xwayland_surface_ping
2018-04-08 16:28:01 -04:00
Drew DeVault
902d859c67
Fix syntax errors
...
Build before you commit, dumbass
2018-04-08 12:50:52 -04:00
Drew DeVault
7bb8512afb
Fix assertions with side-effects
...
Fixes #1725
2018-04-08 12:49:48 -04:00
Drew DeVault
bef5c1fd56
Merge pull request #850 from emersion/remove-backend-egl
...
backend: remove wlr_backend_get_egl
2018-04-08 11:21:21 -04:00
emersion
d2ebbd103c
backend: remove wlr_backend_get_egl
2018-04-08 11:00:56 -04:00
Bruno
ba5c0903f9
rootston: fix compilation without XWayland support
2018-04-07 23:29:04 +01:00
emersion
285cf12e37
Remove rootston surface iterator
2018-04-05 14:18:21 -04:00
emersion
4a9a9eae9a
Add surface iterators
2018-04-05 14:18:17 -04:00
Drew DeVault
da73b4f60b
Merge pull request #830 from swaywm/xdg-output
...
Add wlr_xdg_output_manager
2018-04-05 13:58:01 -04:00
Tancredi Orlando
74a4b1702b
Initialize rootston _surface
2018-04-05 19:13:21 +02:00
Drew DeVault
abfe7923c4
Add wlr_xdg_output_manager
2018-04-05 12:40:30 -04:00
emersion
3ea425d4e2
Fix xdg-shell popups, add wlr_xdg_surface_surface_at
2018-04-04 17:45:24 -04:00
emersion
c9d21106b4
Add wlr_xdg_surface_v6_surface_at and wlr_wl_shell_surface_surface_at
2018-04-04 17:42:16 -04:00
emersion
1a8b24bdd2
rootston: fix view_at
2018-04-04 17:16:35 -04:00
emersion
d16127b3cb
Fix wlr_surface_subsurface_at, change it to be wlr_surface_surface_at
2018-04-04 16:48:23 -04:00
emersion
f7539b9d14
rootston: send enter event for layer surfaces
2018-04-03 20:18:04 -04:00
Drew DeVault
56deff41b6
Implement input inhibit in rootston
2018-04-03 15:09:53 -04:00
Drew DeVault
3a8c7f283d
Add input-inhibitor example client
2018-04-03 14:06:52 -04:00
Drew DeVault
d88f3c1eb3
Fix segfault when clicking rootston desktop
2018-04-03 11:30:37 -04:00
Drew DeVault
9ce53d7dc4
Merge pull request #804 from swaywm/keyboard-layers
...
Add keyboard input to layer surfaces
2018-04-02 20:45:39 -04:00
Drew DeVault
333ab59902
Add wlr_surface_is_*_surface
...
And wlr_*_surface_from_wlr_surface
2018-04-02 20:42:02 -04:00
Drew DeVault
9ae861c416
Address review feedback
2018-04-02 18:54:16 -04:00
Drew DeVault
37036df822
Handle layer surfaces below shell surfaces
2018-04-02 18:44:06 -04:00
Danilo Spinella
046d909e7a
Change meson option names to use hypen
...
Replace underscore with hypen in meson option names, following style
recommendations.
http://mesonbuild.com/Style-guide.html#naming-options
2018-04-02 23:35:03 +02:00
Drew DeVault
a94f4d0edc
Always give keyboard focus to the topmost layer
2018-04-02 15:48:22 -04:00
Drew DeVault
883d8d306c
Identify topmost interactive layer surface
2018-04-02 15:16:14 -04:00
Drew DeVault
d466cc117f
Don't reset exclusive between layer shell passes
...
This is not the intended behavior of exclusive zones, the second pass is
meant to respect the usable area.
2018-04-02 14:55:17 -04:00
Drew DeVault
937362b552
FIx crash on touch down
2018-03-31 09:55:41 -04:00
Orestis Floros
3f6823092a
Initialize roots_output to fix -Wmaybe-uninitialized
...
With -O2:
../rootston/desktop.c: In function ‘desktop_surface_at’:
../rootston/desktop.c:714:18: error: ‘roots_output’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ((surface = layer_surface_at(roots_output,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ox, oy, sx, sy))) {
~~~~~~~~~~~~~~~
2018-03-31 12:57:12 +03:00
emersion
692f1746cf
xwayland: specify xwm cursor stride in bytes
2018-03-31 00:22:58 -04:00
Drew DeVault
e19ee6d469
Add wlr_surface_point_accepts_input
...
Ref https://github.com/swaywm/sway/pull/1674
2018-03-30 23:02:11 -04:00
Drew DeVault
746e3759b7
Address review feedback
2018-03-30 20:34:00 -04:00
Drew DeVault
168f65fb7a
Minor bugfixes
2018-03-30 18:28:21 -04:00
Drew DeVault
e3eb487dc2
Add pointer support to layer shell example
2018-03-30 18:23:57 -04:00
Drew DeVault
dc412c514b
Find layer surfaces for input events
2018-03-30 17:27:10 -04:00
Drew DeVault
662f40b8ae
Refactor cursor event passhtrough
2018-03-30 17:27:10 -04:00
emersion
865b0aa123
xwayland: rename map_notify to map for consistency
2018-03-30 11:01:23 -04:00
Drew DeVault
b887af9a60
Fix maximized windows interaction with layer shell
...
If there were no layer surfaces the usable area of the output would be
an empty box.
2018-03-29 12:18:50 -04:00
emersion
a316396eab
Merge pull request #720 from acrisci/xdg-positioner
...
xdg-positioner
2018-03-29 01:02:40 -04:00
Tony Crisci
2e63d1a0ca
toplevel_box to toplevel_sx_box
2018-03-28 23:24:39 -04:00
Tony Crisci
27f450ac0e
add todo for rotated unconstrained popup
2018-03-28 22:26:56 -04:00
Tony Crisci
71da20dbde
add comment for output box in toplevel coords
2018-03-28 20:51:25 -04:00
Tony Crisci
67c8aec77f
popup constraint handle empty output layout
2018-03-28 18:36:48 -04:00
Tony Crisci
0bfcce50a9
xdg-positioner: honor constraint flags
2018-03-28 16:55:16 -04:00
Tony Crisci
dbffda7549
xdg-positioner wlr abstractions
2018-03-28 16:27:08 -04:00
Tony Crisci
c5cd805098
positioner rootston cleanup and bugfix
2018-03-28 12:46:41 -04:00
Tony Crisci
e2c4e1ef54
fix xdg-positioner left constrain bug
2018-03-28 12:12:00 -04:00
Drew DeVault
ac219cbda6
Remove width_mm from tablet events
2018-03-28 12:05:37 -04:00
Tony Crisci
738f5e3344
cleanup xdg-positioner rootston code
2018-03-28 11:42:01 -04:00
Drew DeVault
324b9d910d
Remove width_mm from wlr_touch events
2018-03-28 11:04:40 -04:00
Drew DeVault
a35a5786b0
Remove width_mm from wlr_pointer events
2018-03-28 10:46:50 -04:00
Tony Crisci
41e54ba632
Merge branch 'master' into xdg-positioner
2018-03-28 00:20:39 -04:00
Drew DeVault
3e5131e664
Address further review feedback
2018-03-27 21:28:22 -04:00
Drew DeVault
a1d5d20914
Address some more feedback
2018-03-27 18:51:41 -04:00
Drew DeVault
52fe2688ea
Address @emersion's feedback
2018-03-27 18:51:41 -04:00
Drew DeVault
776b81d499
Fix surface layer damage tracking
2018-03-27 18:50:32 -04:00
Drew DeVault
0e318df13d
Add margin animation to the example demo
2018-03-27 18:50:32 -04:00
Drew DeVault
86ca4bea6d
Fix layer rendering/layout bugs
2018-03-27 18:50:32 -04:00
Drew DeVault
097e87ca9f
Handle usable area for maximized windows
...
Also fixes some bugs
2018-03-27 18:50:32 -04:00
Drew DeVault
ab6c2bf584
Reset exclusivity after shell layer
...
Also fixes an issue which was applying exclusivity to all edges
2018-03-27 18:50:32 -04:00
Drew DeVault
df9dbf3170
Fix rebase issues; rearrange layers on destroy
2018-03-27 18:50:32 -04:00
Drew DeVault
11c57d22b0
Use 0 for default width/height (rather than -1)
2018-03-27 18:50:32 -04:00
Drew DeVault
d1c0e6fe2c
Add layer_surface.close
2018-03-27 18:50:32 -04:00
Drew DeVault
b73c4f48c1
Fix exclusive zone among other layers
2018-03-27 18:50:32 -04:00
Drew DeVault
8c98c18880
Gracefully deal with outputs being removed
2018-03-27 18:50:32 -04:00
Drew DeVault
f444a0d14c
Implement layer surface damage
2018-03-27 18:50:32 -04:00
Drew DeVault
4bf936360d
Arrange & render layer surfaces
2018-03-27 18:50:09 -04:00
Drew DeVault
fcf8c6c8a2
Fix issues preventing layer from getting allocated
...
Now all of the steps to get rootston a reference to the layer surface
are correctly wired up.
2018-03-27 18:50:09 -04:00
Drew DeVault
b31ce4220c
Add broken test client and rootston stubs
2018-03-27 18:50:09 -04:00
Drew DeVault
88eec637a4
Address feedback
2018-03-27 18:50:09 -04:00
Drew DeVault
f29d8b55ae
Initial scaffolding of layer shell
2018-03-27 18:50:09 -04:00