Commit Graph

2862 Commits

Author SHA1 Message Date
emersion 8e2f3056f8
layer-shell: fix small memory leak 2018-04-24 22:40:48 +01:00
Drew DeVault c40f86d27f
Merge pull request #900 from emersion/cursor-wrap-absolute-zero
cursor: allow to call wlr_cursor_wrap_absolute with zero
2018-04-24 21:18:08 +02:00
emersion bc0bfde5ee
cursor: allow to call wlr_cursor_wrap_absolute with zero 2018-04-24 19:46:29 +01:00
Drew DeVault a6790d45b2
Merge pull request #895 from agx/layer-shell-popup-damage
layer-shell: use output_damage_{whole,from}_local_surface
2018-04-24 13:16:44 +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
emersion 09b491f36c
Merge pull request #893 from emersion/fix-subsurface-recreate
Fix protocol error when a client destroys and re-creates a subsurface
2018-04-24 09:01:48 +01:00
emersion 38064f1d18
Fix protocol error when a client destroys and re-creates a subsurface 2018-04-23 21:50:15 +01:00
Drew DeVault c0831344aa
Merge pull request #891 from agx/layer-shell-popup-grab
examples/layer-shell: take grab on the popup
2018-04-23 18:21:51 +02:00
Guido Günther 67a10cc1f6 examples/layer-shell: take an explicit grab on the popup
This demonstrates popups can be closed by clicking on the area outside
the popup and parent.
2018-04-23 18:11:47 +02:00
Drew DeVault e2ed7be0ba
Merge pull request #877 from agx/layer-popups
Layer popups: work on top of PR 867
2018-04-23 13:00:57 +02:00
Guido Günther 32e043f996 examples: Allow to close the popup
So we can the xdg_popup_destroy path.
2018-04-23 12:52:05 +02:00
Guido Günther 5209c79702 examples: Handle input entering popup in layer-shell
Change the cursor when entering the popup and make mouse buttons change
the red component of the square. This makes sure we can handle input
correctly.
2018-04-23 11:24:31 +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 421652a450 examples: Animate popup in layer-shell 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
Guido Günther d1e82a8ede examples: Drop unused variable 2018-04-23 11:24:31 +02:00
Drew DeVault 941f88ce23 Fix popup positioning & double popups 2018-04-23 11:24:06 +02:00
Drew DeVault 52baf3dd8a Move get_geometry call back to xdg-shell 2018-04-23 11:24:06 +02:00
Drew DeVault 0a0627f5d0 Finish forward-porting @acrisci's positioner work 2018-04-23 11:24:06 +02:00
Drew DeVault 2e3d901ac5 Forward-port xdg-shell-v6 positioner improvements 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 d3cdb00208 Add (shitty) support for popups to layer example 2018-04-23 11:24:06 +02:00
Drew DeVault 6b7b64ec1e Generalize xdg-shell popups and add to layer-shell 2018-04-23 11:22:23 +02:00
Drew DeVault da944cccb3
Merge pull request #887 from swaywm/layer-optional-output
Update layer shell with optional wl_output
2018-04-23 11:11:41 +02:00
Drew DeVault 625bc7b8b3 assert(surface->output); after new_surface emit 2018-04-23 10:45:48 +02:00
Drew DeVault 4575f27932 Update layer shell example -o behavior 2018-04-22 19:19:22 +02:00
Drew DeVault edbf4a2f60 Implement output auto-selection in rootston 2018-04-22 19:15:49 +02:00
Drew DeVault 177b548b15 Update layer shell with optional wl_output 2018-04-22 18:57:45 +02:00
Drew DeVault 12bf39a715
Merge pull request #885 from emersion/remove-surface-subsurface
Remove wlr_surface::subsurface, add wlr_subcompositor
2018-04-22 10:54:15 +02:00
emersion 704bc490a7
Merge pull request #886 from n3rdopolis/patch-2
xwayland: preserve the PATH variable
2018-04-22 08:44:45 +01:00
n3rdopolis a470f101c1
xwayland: preserve the PATH variable
Some systems don't have xwayland in /usr/bin, but in other paths. 
wlroots was unable to find Xwayland binaries outside of standard locations
2018-04-21 19:19:25 -04:00
emersion 3bce5dfc9f
Fix segfaults in wlr_surface_is_* 2018-04-21 19:04:48 +01:00
emersion bfcd3f3707
Add wlr_subcompositor 2018-04-21 19:02:39 +01:00
emersion fa84b267e0
Remove wlr_surface::subsurface 2018-04-21 18:40:25 +01:00
Drew DeVault 4b2f56cc01
Merge pull request #883 from atomnuker/master
Do not advertize *RGB8888 as supported shm formats
2018-04-21 16:17:27 +02:00
Rostislav Pehlivanov 12298ce88c Do not advertize *RGB8888 as supported shm formats
They're always available and supported, and are added automatically.
Adding them again just duplicates them.
2018-04-21 14:58:25 +01:00
Drew DeVault b116414bd5
Merge pull request #880 from emersion/advertize-renderer-formats
Advertize supported renderer formats
2018-04-21 14:45:09 +02:00
Drew DeVault 5e16bc96b1
Merge pull request #881 from emersion/prefixed-unexported-symbols
Remove a few local prefixed symbols
2018-04-21 12:11:39 +02:00
emersion f2eef670d1
Use tabs instead of spaces in symbols file 2018-04-21 10:22:51 +01:00
emersion 1588094b99
Remove a few local prefixed symbols 2018-04-21 10:20:33 +01:00
emersion 70d820be25
Add wlr_renderer_init_wl_shm to advertize supported renderer formats 2018-04-20 23:58:30 +01:00
Drew DeVault c18afd6731
Merge pull request #875 from Ongy/keyboard_order
reorder xkb state handling in wlr_keyboard
2018-04-18 08:38:26 -04:00
Markus Ongyerth c8ccb1bef3 reorder xkb state handling in wlr_keyboard
wlr_keyboard manages the xkb-common state of the compositor.
It used to update the state, update the modifiers, then notify the
compositor.
When [Shift_L] was pressed and released, this resulted in an event chain:
  Modifiers: Shift
  Key: Shift_L (Pressed)

  Modifiers:
  Key: Shift_L (Release)

The xkb-docs state that the state should be updated *after* the key was
handled [1], to prevent the new state from influencing the actual key
generated.

To achieve this, the event to the compositor is emitted, *before*
wlroots handles the xkb and internal keyboard state.

With this patch applied, the emitted events ill be:
  Modifiers:
  Key: Shift_L (Pressed)

  Modifiers: Shift
  Key: Shift_L (Release)

[1] https://xkbcommon.org/doc/current/group__state.html#gac554aa20743a621692c1a744a05e06ce
2018-04-18 11:54:59 +02:00
Drew DeVault dbdc63ddde
Merge pull request #873 from emersion/output-dont-emit-mode-twice
output: don't emit the mode event if it hasn't changed
2018-04-17 21:08:27 -04:00
emersion 94fa6c88f4
output: don't emit the mode event if it hasn't changed
This also fixes #535.
2018-04-18 00:15:25 +01:00
emersion 7c8c81c3a4
Merge pull request #871 from agx/layer-shell-crash
rootston: don't crash on shutdown
2018-04-16 15:10:38 +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 72411a7a7c
Merge pull request #870 from psychon/x11_needs_swap
x11 backend: Expose events mean "needs swap"
2018-04-15 09:35:29 -04:00