Drew DeVault
ca695482ec
Merge pull request #2292 from emersion/update-cursor-on-focus
...
Update cursor on focus change
2018-07-17 19:53:12 -07:00
Ryan Dwyer
8ce7e3b44e
Merge branch 'master' into destroy-output-destroy-empty-workspaces
2018-07-18 09:32:03 +10:00
emersion
03d49490cc
Update cursor on focus change
...
This allows to send wl_pointer.enter when switching between views
in a split/tabbed layout for instance. This (1) updates the cursor
image accordingly (2) makes it unnecessary to move the mouse before
scrolling. It's harmless to always call cursor_send_pointer_motion
because in case the focused surface hasn't changed this is a no-op.
The `last_focus != NULL` condition is required otherwise
cursor_send_pointer_motion will crash when sway starts up (the
sway_output doesn't yet have a workspace).
2018-07-17 23:04:55 +01:00
frsfnrrg
3931cb85b2
Fix memory leak in sway/desktop/idle_inhibit_v1.c
2018-07-17 11:35:24 -04:00
frsfnrrg
37471ac649
Fix memory leak in handle_layer_shell_surface
2018-07-17 11:35:24 -04:00
frsfnrrg
600676688a
Free individual criteria in free_config
...
Also free cmd_list when cleaning up a struct criteria.
2018-07-17 11:35:00 -04:00
frsfnrrg
b3014f7b16
Fix uninitialized pointer in view_unmap
...
Otherwise, sway crashes due to uninitialized pointer
dereference when AddressSanitizer is active.
2018-07-17 10:42:48 -04:00
Brian Ashworth
10fc7a5b49
Merge branch 'master' into default-floating-border
2018-07-16 22:12:29 -04:00
Drew DeVault
db3a363734
Revert "config: free include path on successful load"
...
This reverts commit 92450883d7
.
2018-07-16 21:02:13 -04:00
Ryan Dwyer
9cbff272cb
Remove superfluous IPC urgent events
...
When an xwayland view is mapped, the IPC urgent event was being sent on
every surface commit.
I had intentionally ommitted the check because I figured an urgent
surface could update its urgent timestamp by sending urgent a second
time. But that's not how it works in xwayland's case, and it makes for
more complicated code.
2018-07-17 10:27:03 +10:00
Ryan Dwyer
75c699db62
Implement default_floating_border command and adjust CSD behaviour
2018-07-17 10:14:33 +10:00
Drew DeVault
d6bd314dff
Merge pull request #2276 from RyanDwyer/urgency
...
Implement urgency base functionality
2018-07-16 15:39:08 -07:00
Ryan Dwyer
e2f28c023c
Focus view before running criteria when mapping
2018-07-16 22:27:11 +10:00
Ryan Dwyer
fc2484095a
Implement no_focus command
2018-07-16 22:18:12 +10:00
Ryan Dwyer
af5f736277
Render containers as urgent if they have an urgent child
2018-07-16 18:22:27 +10:00
Ryan Dwyer
9ca5cb7faf
Fix tab split focus bug
...
Fixes a bug where if you have a tab containing a split, then switch from
a non-split tab to the split tab, focus is not changed properly.
2018-07-16 18:09:35 +10:00
Ryan Dwyer
be28c18ad5
Mark containers as urgent in IPC if they have urgent views
2018-07-16 14:30:31 +10:00
Ryan Dwyer
5f0a4bb6a4
Update workspace urgent state when views close or move workspaces
2018-07-16 13:15:35 +10:00
Ryan Dwyer
560627437b
Make container_for_each_descendant_dfs descend into floating views
2018-07-16 12:45:20 +10:00
Ryan Dwyer
64e3bc3ab0
Fix crash in ipc_json_describe_view
...
I didn't expect a function called ipc_json_describe_view to be passed a
container which wasn't a view :\
2018-07-16 11:55:53 +10:00
Ryan Dwyer
a211daf9e6
Add documentation for urgent command
2018-07-16 10:15:18 +10:00
Ryan Dwyer
e3f90f00fe
Implement xwayland urgency hint
2018-07-16 08:42:34 +10:00
Ryan Dwyer
f86087d78f
Fix urgency IPC events
2018-07-16 08:19:25 +10:00
Ryan Dwyer
315d5311b2
Implement urgency base functionality
...
Introduces a command to manually set urgency, as well as rendering of
urgent views, sending the IPC event, removing urgency after focused for
one second, and matching urgent views via criteria.
2018-07-16 08:19:25 +10:00
Ian Fan
9559e3e2af
config output: free command string if unused
2018-07-15 21:51:00 +01:00
Ian Fan
92450883d7
config: free include path on successful load
2018-07-15 21:48:39 +01:00
Ian Fan
ba8981e44b
bar: free old position when changing
2018-07-15 21:47:22 +01:00
Ian Fan
011d43746f
Add error handling for getting config file size
2018-07-15 15:36:51 +01:00
Ian Fan
e6209afcd6
Fix config buffer overflow and logic
2018-07-15 14:59:54 +01:00
Ryan Dwyer
a120d4c79f
Make focus part of transactions
...
Rather than maintain copies of the entire focus stack, this PR
transactionises the focus by introducing two new properties to the
container state and using those when rendering.
* `bool focused` means this container has actual focus. Only one
container should have this equalling true in its current state.
* `struct sway_container *focus_inactive_child` points to the immediate
child that was most recently focused (eg. for tabbed and stacked
containers).
2018-07-15 22:08:26 +10:00
Drew DeVault
53e3f35ba3
Merge pull request #2272 from RyanDwyer/simplify-transactions
...
Simplify transactions by using a dirty flag on containers
2018-07-15 05:01:25 -07:00
Drew DeVault
806c06fdfb
Merge pull request #2266 from emersion/remove-orbital-screenshooter
...
Remove orbital screenshooter
2018-07-15 05:00:38 -07:00
Drew DeVault
b1afcc69fa
Add extended debugging flags
...
We currently have several ways of setting debug flags, including command
line arguments, environment variables, and compile-time macros. This
replaces the lot with command line flags.
2018-07-14 20:44:32 -04:00
Ryan Dwyer
6b2dc7e63b
Set signature to void
2018-07-15 10:41:10 +10:00
Ryan Dwyer
2032f85d94
Simplify transactions by utilising a dirty flag on containers
...
This PR changes the way we handle transactions to a more simple method.
The new method is to mark containers as dirty from low level code
(eg. arranging, or container_destroy, and eventually seat_set_focus),
then call transaction_commit_dirty which picks up those containers and
runs them through a transaction. The old methods of using transactions
(arrange_and_commit, or creating one manually) are now no longer
possible.
The highest-level code (execute_command and view implementation
handlers) will call transaction_commit_dirty, so most other code just
needs to set containers as dirty. This is done by arranging, but can
also be done by calling container_set_dirty.
2018-07-14 23:14:55 +10:00
Brian Ashworth
13c6627ddb
Implement tap_button_map for input devices
2018-07-14 01:01:47 -04:00
Ryan Dwyer
0584ecec0a
Force min/max size when resizing floating containers
2018-07-14 10:00:39 +10:00
Ryan Dwyer
5940682f40
Implement resize grow|shrink <direction> <amount> or <amount>
2018-07-14 10:00:39 +10:00
Ryan Dwyer
558ca9fc28
Implement resize command for floating views
...
Implements the following for floating views:
* resize set <width> <height>
* resize <grow|shrink> <width|height|up|down|left|right> <amount>
2018-07-14 10:00:39 +10:00
emersion
efda33b285
Simplify popup_unconstrain
...
Just use the parent output.
2018-07-13 21:17:31 +01:00
emersion
82c978d34b
Remove orbital screenshooter
2018-07-13 19:29:44 +01:00
emersion
d88f1d2196
Fix output_has_opaque_lockscreen
2018-07-13 12:26:20 +01:00
Drew DeVault
bcdf04d79c
Merge pull request #2252 from rkubosz/scroll-button-option
...
feature: scroll button option for input devices
2018-07-13 04:07:11 -07:00
Robert Kubosz
f8bc928b2d
add error handling for scroll button out of range
...
user will be informed if the scroll button indentifier values causes
underflow or overflow.
2018-07-13 11:39:39 +02:00
Ryan Dwyer
53133fdefb
Merge branch 'master' into xwayland-floating-borders
2018-07-13 08:17:45 +10:00
Robert Kubosz
89db5b5716
expanded error detection for scroll button option
...
Now the scroll_button will not accept:
- letters on string beginning;
- negative numbers.
What is tolerated:
- letters after number;
- rational numbers: the fraction after dot will be omitted.
2018-07-12 23:50:34 +02:00
Drew DeVault
da8149c066
Merge pull request #2253 from Hello71/issue2249
...
config.c: fix current_config uninit warning (#2249 )
2018-07-12 12:49:11 -07:00
emersion
a96f1c22fe
Add xdg-positioner support
2018-07-12 20:31:55 +01:00
emersion
9b16227ec3
Don't disable borders for xwayland floating views
2018-07-12 20:01:33 +01:00
Alex Xu
fbecfc2d35
config.c: fix current_config uninit warning ( #2249 )
2018-07-12 13:00:57 -04:00
Robert Kubosz
094edcbea2
rm constraint for max value of button identifier
...
updated error message to be more adequate for current contraint
2018-07-12 15:50:42 +02:00
Robert Kubosz
20d6c7c2e4
add paragraph to sway-input man page
...
The added paragraph describes how to get button identifier and set it in
config.
2018-07-12 15:35:14 +02:00
Robert Kubosz
08edaf4e76
increase maximum value of button identifier
...
and also cleanup spaces
2018-07-12 12:08:53 +02:00
Ryan Dwyer
ee0e1b170e
Fix crash in seat code
...
Container will be NULL if launching swaylock.
2018-07-12 14:43:08 +10:00
emersion
60fdb71a1f
Updates for swaywm/wlroots#1116
2018-07-11 18:37:17 -04:00
Drew DeVault
2bc18d8cf7
Merge pull request #2248 from Dudemanguy911/fix_crash_on_floating_windows
...
fix crash on floating windows
2018-07-11 15:26:47 -07:00
Robert Kubosz
41b80c28df
add scroll button option
...
This commit introduces a scroll_button option, which is intended to be
used with scroll_method. Now user can edit his sway config and add an
scroll_button option to device section.
2018-07-11 22:03:06 +02:00
dudemanguy
600c126150
fix crash on floating windows
2018-07-11 12:24:06 -05:00
Ryan Dwyer
f2d1cf3ceb
Implement floating_minimum_size and floating_maximum_size
2018-07-11 22:16:48 +10:00
emersion
73084c5fa6
Merge pull request #2243 from RyanDwyer/use-fullscreen-saved-buffer
...
Use saved buffer when fullscreen view is in a transaction
2018-07-11 13:04:06 +01:00
Ryan Dwyer
3b50a2a3af
Use saved buffer when fullscreen view is in a transaction
...
Fixes #2237 .
2018-07-11 20:33:36 +10:00
Ryan Dwyer
15dc5286e2
Move floating windows to front when focused
2018-07-11 19:50:02 +10:00
russ morris
6ae1004cd1
removed unnecessary parens
2018-07-10 20:57:05 -07:00
russ morris
c06266e12d
fix line lengths
2018-07-10 20:34:51 -07:00
russ morris
b9d8ecc548
tabs instead of spaces
2018-07-10 20:24:57 -07:00
russ morris
89c25dd149
fix tabbed titlebar widths
2018-07-10 17:59:00 -07:00
Ian Fan
23c1c26c3f
Add get_config message type to ipc
2018-07-10 12:37:37 +01:00
Ian Fan
5fd36164a0
Add get_binding_modes message type to ipc
2018-07-10 12:03:46 +01:00
Ryan Dwyer
56ad148403
Merge branch 'master' into fix-stacked-layout
2018-07-10 20:41:02 +10:00
Drew DeVault
6fd9a2bfd6
Merge branch 'master' into focus-mode-toggle
2018-07-09 16:28:37 -07:00
emersion
63b4bf5000
Update for swaywm/wlroots#1126
2018-07-09 22:54:30 +01:00
Konstantin Pospelov
9dd54f934e
Fix titlebar rendering for nested stacked containers
2018-07-10 00:33:13 +03:00
emersion
b755639ca8
Document focus floating|tiling
2018-07-09 22:22:23 +01:00
emersion
48c98b676f
Implement focus mode_toggle
2018-07-09 22:22:17 +01:00
emersion
ebcdce457a
Merge pull request #2223 from RyanDwyer/floating-move
...
Implement some floating move commands
2018-07-09 19:04:45 +01:00
Ryan Dwyer
b0fc7e9850
Remove duplicate function declaration and add assertion
2018-07-09 23:41:00 +10:00
Ryan Dwyer
ab8a86369c
Implement some floating move commands
...
This implements the following for floating containers:
* move <direction> <amount>
* move [absolute] position <x> <y>
* move [absolute] position mouse
2018-07-09 23:38:29 +10:00
vilhalmer
4e7ef1dd39
No need to walk to workspace, recursive will
2018-07-09 08:26:39 -04:00
vilhalmer
47c20f8ea4
Regroup signal
2018-07-09 08:25:32 -04:00
vilhalmer
ce626a0708
Replace empty workspace with moved workspace
2018-07-08 22:55:50 -04:00
vilhalmer
621d2666b1
Destroy empty workspace when destroying its output
2018-07-08 21:55:24 -04:00
emersion
f9625d1d56
Split renderer
2018-07-07 10:30:52 +01:00
Ryan Dwyer
0046eed969
Fix titles when container titles contain UTF-8 characters
...
The title and marks textures would have their height set from the
config's computed max font height, but the textures were not regenerated
when the config's max font height changed which made a gap appear.
Rather than making it regenerate the title textures every time the
config font height was changed, I've changed it to just make the
textures the height of the title itself and fill any gap when rendering.
Also, the title_width and marks_width variables have been renamed to
make it more obvious that they are in output-buffer-local coordinates.
Fixes #1936 .
2018-07-07 15:49:51 +10:00
emersion
9a9d9116be
Make view_update_* update live props as well
2018-07-06 19:33:10 +01:00
emersion
47d56306c3
Fix xwayland floating views unclickable
...
Some xwayland views are first configured with a 1x1 size, and then
resized. Since the view size isn't updated, they are unclickable.
Fixes #2195
2018-07-06 19:31:44 +01:00
Drew DeVault
817e847749
Merge pull request #2206 from martinetd/leaks
...
Fix a bunch of leaks
2018-07-06 08:43:33 -07:00
emersion
b3c55dd909
Merge branch 'master' into leaks
2018-07-06 16:22:13 +01:00
Ryan Dwyer
464d4d5889
Translate surface by its geo when doing opaque box check
2018-07-07 01:18:54 +10:00
Ryan Dwyer
9480781229
Don't clear when using opaque lockscreen
2018-07-07 00:21:39 +10:00
Ryan Dwyer
3b842f4eed
Detect opaque lockscreen when using a solid color
2018-07-07 00:17:08 +10:00
Ryan Dwyer
f1fadef923
Use pixman_region32_contains_rectangle
2018-07-07 00:03:49 +10:00
Ryan Dwyer
839c3a5500
Use opaque region to determine if frame done should be sent
2018-07-07 00:03:49 +10:00
Ryan Dwyer
58befcf2cd
Don't send frame done to surfaces behind lockscreen
...
Also, when rendering, don't descend into the tree if the lockscreen is
active. Just render the lockscreen's surfaces.
2018-07-07 00:03:49 +10:00
Drew DeVault
3d2595b102
Merge branch 'master' into remove-input-fix
2018-07-06 06:28:01 -07:00
Ian Fan
f63b209d51
Attach destroy handler earlier
...
This prevents it from being bypassed when the device has no seat configuration
2018-07-06 14:13:45 +01:00
Drew DeVault
a06d45a14d
Merge pull request #2217 from RedSoxFan/fix-663
...
Implement mode --pango_markup
2018-07-06 04:57:46 -07:00
Brian Ashworth
c833ae64bc
Fix pointer button events for layer surfaces
2018-07-05 23:01:35 -04:00
Brian Ashworth
78c08fb0a2
Implement mode --pango_markup
2018-07-05 18:12:14 -04:00
emersion
84109431f7
Merge pull request #2185 from swaywm/update-wlroots-1076
...
Updates per wlroots#1076
2018-07-05 22:23:15 +01:00
Thomas Plaçais
ab5c8c31a0
Escape underscore in sway-input(5) man page to avoid invalid colors
2018-07-05 14:31:52 +02:00