Commit graph

282 commits

Author SHA1 Message Date
ARDiDo
380b8b295a clean up view_available_wlr_output 2021-10-20 06:51:30 +01:00
ARDiDo
08286a607f improve view_output 2021-10-20 06:51:30 +01:00
Johan Malm
e7da5f21e9 view: fix build warning 2021-10-18 20:06:47 +01:00
Johan Malm
806fdb08bd view: add view_get_string_prop() 2021-10-18 20:01:10 +01:00
Johan Malm
40da2f34a5 view: check view->impl functions exist before using
Avoids segfault when using disappearing notification in Thunderbird
2021-10-18 19:35:41 +01:00
Joshua Ashton
22d10497ca view: Add 'center' option to SnapToEdge
Similar to fullscreen, but not a separate state, and with gaps.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 23:24:36 +01:00
Johan Malm
bd1e6f3728 view: set inter-view gap correctly in SnapToEdge
When arranging views side-by-side or above-below using SnapToEdge, the gap
between views should be rc.gap rather than 2x rc.gap
2021-10-17 22:23:00 +01:00
Joshua Ashton
8652f97887 view: Add view_min_size helper function
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 19:49:05 +01:00
Joshua Ashton
f12617deea action: Fix crash in move to edge
Fixes a crash in move to edge ( #77 ) when the centre of the window is out of any display regions.

Doesn't fix the expected behaviour that it would work, but much better than the whole compositor dying.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 12:21:49 +01:00
Joshua Ashton
8e3108c032 action: Add 'SnapToEdge'
Implements snap-style edge snapping that works between multiple monitors.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-17 12:19:35 +01:00
Johan Malm
e2ae63a7cf xdg/wayland-shell: handle set_app_id and set_class events 2021-10-16 21:50:56 +01:00
Johan Malm
70144ac113 view: add view_set_activated()
Call wlr_foreign_toplevel_handle_v1_set_activated() from it in support of
issue #73
2021-10-16 19:24:26 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
bi4k8
b7cce58f56 implement ToggleDecorations and ToggleFullscreen actions 2021-09-20 21:14:24 +01:00
Johan Malm
ea3ea49783 Fix more coding style violations 2021-08-25 20:45:39 +01:00
Johan Malm
7bfe350f25 view: fix impl->set_fullscreen() argument bug 2021-08-24 21:53:20 +01:00
Johan Malm
645a8e46a6 Support fullscreen mode (issue #53) 2021-08-23 22:05:30 +01:00
Johan Malm
0aee42473b view: update title width when resizing view 2021-08-22 14:35:34 +01:00
Johan Malm
a6eb29ad33 config: add <core><gap>
Specify the distance in pixels between views and output edges when using
movement actions such as MoveToEdge
2021-08-22 14:32:19 +01:00
Johan Malm
3efcfaf145 view: scale correctly in view_maximize() 2021-08-17 07:25:57 +01:00
Johan Malm
620cd84a8a view: apply output scale in view_center() 2021-08-17 07:24:27 +01:00
Johan Malm
f857aea8f4 ssd: add application title to title bar 2021-08-07 09:35:53 +01:00
Johan Malm
9cf0608aba foreign: handle minimize request 2021-08-05 13:00:34 +01:00
Johan Malm
b4722d988e foreign: handle maximize request 2021-08-05 12:52:42 +01:00
Johan Malm
042ea266a5 Add simple foreign toplevel implementation 2021-08-05 12:18:10 +01:00
Johan Malm
7dc4ae36ca view: initialise x+y variables to handle edge case 2021-08-04 21:43:07 +01:00
Johan Malm
526ab1ae75 view: add view_toggle_maximize() 2021-08-02 16:49:41 +01:00
Johan Malm
22f5073ebd xdg: use "usable_area" when positioning view 2021-07-21 22:04:54 +01:00
Johan Malm
2b9c6a503c view.c: assign struct rather than using memcpy
Suggested-by: @xerpi
2021-07-21 19:25:34 +01:00
Johan Malm
5e83ce6b46 Add view_move_to_edge() to header file 2021-07-20 20:24:39 +01:00
Johan Malm
fa13f8f197 view: remove duplicate code 2021-07-20 20:06:26 +01:00
Johan Malm
49a73befdb action: add 'MoveToEdge'
Currently only moves view to edges of outputs

Example keybind:

<keybind key="A-Left">
  <action name="MoveToEdge">
    <direction>left</direction>
  </action>
</keybind>
2021-07-20 19:54:57 +01:00
Johan Malm
10264110f1 view: add view_output() and view_wlr_output() 2021-07-20 19:40:37 +01:00
Johan Malm
a3ac2f2767 layers: take into account usable area when maximizing views 2021-07-12 21:39:09 +01:00
Johan Malm
cb98f8f197 view: add view_center() 2021-07-09 21:39:20 +01:00
Johan Malm
2a48f2801b Create a linked list of SSD for each view 2021-03-21 21:46:16 +00:00
Johan Malm
f863e1916d view: scale maximize geometry correctly 2021-03-21 21:06:45 +00:00
Johan Malm
fc76100fd5 Add ssd.h 2021-03-21 20:54:55 +00:00
Johan Malm
a262b729df Rename deco.c ssd.c 2021-03-20 14:41:39 +00:00
Johan Malm
15ffee79f9 view: refactor view_maximize() 2021-03-20 14:36:40 +00:00
Johan Malm
8898693160 view: scale view_maximize() 2021-03-20 14:26:32 +00:00
Jan Beich
ad07acc13c xdg: chase swaywm/wlroots@f574ca934c
src/xdg.c:180:2: warning: implicit declaration of function 'wlr_xdg_surface_for_each_popup' is invalid in C99 [-Wimplicit-function-declaration]
        wlr_xdg_surface_for_each_popup(view->xdg_surface, iterator, data);
        ^
ld: error: undefined symbol: wlr_xdg_surface_for_each_popup
>>> referenced by xdg.c:180 (src/xdg.c:180)
>>>               labwc.p/src_xdg.c.o:(xdg_toplevel_view_for_each_popup)

Based on 5438cc158a
2021-03-13 23:23:33 +00:00
Johan Malm
954d1fa54e view: only (un)maximize when required 2021-03-12 21:27:17 +00:00
Johan Malm
d54a998dd8 Handle wlr_surface->events.new_subsurface
Add view-child.c, xdg-popup.c, subsurface.c in order to track damage
associated with new XDG subsurfaces.
2021-03-02 20:37:23 +00:00
Johan Malm
e0067536fc view.c: refactor view_maximize() 2021-03-01 18:15:02 +00:00
Johan Malm
b616bb6842 maximize: choose output based on center of view 2021-03-01 17:59:09 +00:00
Johan Malm
be3fea0c1a view.c: remember unmaximized geometry 2021-02-28 18:12:10 +00:00
Alex Bryan
5e7f2c91a3 Added basic maximize support for xdg and xwayland 2021-02-27 17:10:53 -05:00
Johan Malm
54804fd3df Implement damage tracking 2021-01-09 22:51:20 +00:00
Johan Malm
cb44f047f3 Add view_move() 2020-12-23 18:52:46 +00:00