Commit graph

6289 commits

Author SHA1 Message Date
Ian Fan 317217f2c8 ipc: add window::mark event 2018-08-01 16:57:15 +01:00
Ian Fan dd6debf367 ipc: add barconfig_update event on config reload 2018-08-01 16:57:14 +01:00
Ian Fan 686c084cec ipc: add workspace::empty event 2018-08-01 16:57:14 +01:00
Ian Fan 4f8f363dda ipc: add window::title event 2018-08-01 16:57:14 +01:00
Ian Fan dd1d6255f0 ipc: add window::focus event 2018-08-01 16:57:14 +01:00
Ian Fan f0310933c8 ipc: add window::close event 2018-08-01 16:57:14 +01:00
Ian Fan 87ccf18964 ipc: add workspace::init event 2018-08-01 16:57:14 +01:00
Ian Fan e8b179e313 ipc: add shutdown event 2018-08-01 16:57:14 +01:00
Drew DeVault f078f7fdfa
Merge pull request #2397 from chr0me-sh/hide-cursor-if-no-pointer
XCursor is not configured if no pointer device is available
2018-08-01 11:45:36 -04:00
chr0me 77d74dd34f XCursor is not configured if no pointer device is available 2018-08-01 23:27:36 +08:00
Ryan Dwyer d10ccc1eb1 Correctly track saved surfaces during multiple transactions
Fixes #2364.

Suppose a view is 600px wide, and we tell it to resize to 601px during a
resize operation. We create a transaction, save the 600px buffer and
send the configure. This buffer is saved into the associated
instruction, and is rendered while we wait for the view to commit a
601px buffer.

Before the view commits the 601px buffer, suppose we tell it to resize
to 602px. The new transaction will also save the buffer, but it's still
the 600px buffer because we haven't received a new one yet.

Then suppose the view commits its original 601px buffer. This completes
the first transaction, so we apply the 601px width to the container.
There's still the second (now only) transaction remaining, so we render
the saved buffer from that. But this is still the 600px buffer, and we
believe it's 601px. Whoops.

The problem here is we can't stack buffers like this. So this commit
removes the saved buffer from the instructions, places it in the view
instead, and re-saves the latest buffer every time the view completes a
transaction and still has further pending transactions.

As saved buffers are now specific to views rather than instructions, the
functions for saving and removing the saved buffer have been moved to
view.c.

The calls to save and restore the buffer have been relocated to more
appropriate functions too, favouring transaction_commit and
transaction_apply rather than transaction_add_container and
transaction_destroy.
2018-08-01 16:24:15 +10:00
Ryan Dwyer f91fd78b99
Merge pull request #2395 from RedSoxFan/create-mouse-binding-list
Create list for mouse bindings when creating new mode
2018-08-01 14:21:18 +10:00
Brian Ashworth 00a00aacef Create list for mouse binds when creating new mode 2018-07-31 23:49:42 -04:00
Ryan Dwyer 7a59508da4 Close popups when changing focus
Also reverts the send frame done changes from the previous commit.
2018-07-31 19:58:34 +10:00
Ryan Dwyer de86d65627 Fix popups
Fixes the render and container_at order for popups.

Fixes #2210

For rendering:

* render_view_surfaces has been renamed to render_view_toplevels
* render_view_toplevels now uses output_surface_for_each_surface (which
is now public), as that function uses wlr_surface_for_each_surface which
doesn't descend into popups
* Views now have a for_each_popup iterator, which is used by the
renderer to render the focused view's popups
* When rendering a popup, toplevels (xdg subsurfaces) of that popup are
also rendered

For sending frame done, the logic has been updated to match the
rendering logic:

* send_frame_done_container no longer descends into popups
* for_each_popup is used to send frame done to the focused view's popups
and their child toplevels

For container_at:

* floating_container_at is now static, which means it had to be moved
higher in the file.
* container_at now considers popups for the focused view before checking
containers.
* tiling_container_at has been introduced, so that it doesn't call
container_at recursively (it would check popups recursively if it did)
2018-07-31 18:41:30 +10:00
Drew DeVault f19add2702
Merge pull request #2390 from emersion/fix-fullscreen-segfault
Fix segfault with fullscreen
2018-07-30 14:54:08 -04:00
emersion 15c19572cf Fix segfault with fullscreen 2018-07-30 19:44:07 +01:00
Drew DeVault cbd0c3ec40
Merge pull request #2367 from emersion/iterator-redesign
Refactor surface iterators
2018-07-30 13:12:22 -04:00
Drew DeVault 878d1ddd07
Merge pull request #2387 from 1ace/feature/bash-completion
bash completion
2018-07-30 13:11:20 -04:00
Drew DeVault 6c30b3fcc8
Merge pull request #2381 from frsfnrrg/key-repeat
Implement key repeat for keybindings
2018-07-30 13:10:56 -04:00
emersion c1bf8d04be
Merge pull request #2388 from 1ace/fix/delete-swaygrab
delete references to swaygrab
2018-07-30 17:25:41 +01:00
Eric Engestrom 52a27f1529 delete references to swaygrab 2018-07-30 16:24:46 +01:00
emersion 4985667826
Merge pull request #2385 from 1ace/fix/include
util.h: add missing include
2018-07-30 15:57:11 +01:00
Eric Engestrom b9d531b318 meson: install bash completion 2018-07-30 15:56:50 +01:00
Eric Engestrom c4b4da5dc4 bash: add completion for swayidle 2018-07-30 15:56:15 +01:00
Eric Engestrom 4a8a19d21f bash: add completion for swaylock 2018-07-30 15:56:15 +01:00
Eric Engestrom 21609f8af2 bash: add completion for swaymsg 2018-07-30 15:56:15 +01:00
Eric Engestrom 27e89cf61d bash: add completion for sway 2018-07-30 15:56:15 +01:00
emersion a0dc8032e1
Merge pull request #2384 from 1ace/fix/zsh-completion
zsh: fix sway completion
2018-07-30 15:31:53 +01:00
Eric Engestrom 9f59885928 zsh: fix sway completion 2018-07-30 15:22:15 +01:00
Eric Engestrom c6a6faaeae util.h: add missing include
parse_boolean() takes and returns a `bool`
2018-07-30 15:21:52 +01:00
Drew DeVault 5f8676f214
Merge pull request #2383 from RedSoxFan/fix-title-scale
Fix title textures on scale change
2018-07-30 08:05:14 -04:00
Brian Ashworth b8efdeae29 Fix title textures on scale change 2018-07-30 01:59:20 -04:00
Drew DeVault 8dacd0639c Enable unstable wlroots features 2018-07-29 19:33:54 -04:00
frsfnrrg 8dbbfa5965 Bindings use advised keyboard repeat parameters
Now 'repeat_delay' and 'repeat_rate' control the initial delay
and rate (per second) of repeated binding invocations.

If the repeat delay is zero, binding repetition is disabled.
When the repeat rate is zero, the binding is repeated exactly
once, assuming no other key events intervene.
2018-07-29 19:15:10 -04:00
frsfnrrg e33dfbfa75 Implement key repeat for pressed key bindings
Each sway_keyboard is provided with a wayland timer event source.
When a valid keypress binding has been found, a callback to
handle_keyboard_repeat is set. Any key event will either clear
the callback or (if the new key event is a valid keypress binding)
delay the callback again.
2018-07-29 19:15:02 -04:00
Drew DeVault ca8f177e14
Merge pull request #2379 from emersion/xwayland-unmanaged
Don't give focus if xwayland window has a type hint
2018-07-29 13:49:58 -04:00
emersion 9a7e436fad Don't give focus if xwayland window has a type hint 2018-07-29 17:28:21 +01:00
emersion 0ad865f0b7 Make output_surface_for_each_surface_iterator static 2018-07-29 14:34:48 +01:00
emersion 9951b2ec33 Remove unused output_from_wlr_output 2018-07-29 14:33:26 +01:00
emersion fe0750fec1 Remove output_surface_for_each_surface from header 2018-07-29 14:33:26 +01:00
emersion 8d5cc8625c Completely switch over to new iterators 2018-07-29 14:33:26 +01:00
emersion e9d674cfd2 wip: redesign output_view_for_each_surface iterator 2018-07-29 14:33:26 +01:00
emersion a0dd977617 wip: redesign output_layer_for_each_surface iterator 2018-07-29 14:33:26 +01:00
emersion dbf6dd0dae wip: redesign output_drag_icons_for_each_surface iterator 2018-07-29 14:33:26 +01:00
emersion d2172bd331 wip: redesign output_unmanaged_for_each_surface iterator 2018-07-29 14:33:26 +01:00
Ryan Dwyer 8fcf0505d0
Merge pull request #2380 from mariusor/tap-button-map-man-fix
Escaping underscores in tap_button_map
2018-07-29 23:12:01 +10:00
Ryan Dwyer b2f58af46c
Merge branch 'master' into tap-button-map-man-fix 2018-07-29 23:01:59 +10:00
emersion 5af776e734
Merge pull request #2376 from swaywm/virtual-keyboard
Add virtual keyboard protocol
2018-07-29 13:59:54 +01:00
Marius Orcsik 7b9aee5451
Escaping underscores in tap_button_map 2018-07-29 14:47:53 +02:00