Commit graph

386 commits

Author SHA1 Message Date
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
2e4f931469 rcxml: allow <theme><font> without place="" attribute
The construct below will set the font for all supported places. Currently
that's only ActiveWindow, but is likely to include InactiveWindow,
MenuHeader, MenuItem and OnScreenDisplay at some point.

<theme>
  <font>
    <name></name>
    <size></size>
  </font>
</theme>
2021-07-19 20:46:32 +01:00
Johan Malm
ec2c67338a rcxml.c: survive incorrect keybind 2021-07-19 07:07:33 +01:00
Johan Malm
3bc379cc08 desktop: handle missing output safely 2021-07-19 07:06:36 +01:00
Johan Malm
b31c1c4b75 rcxml: change <lab><xdg_shell_server_side_deco> to <core><decoration> 2021-07-16 17:38:17 +01:00
Johan Malm
a9b46131ab rcxml: use root-node <labwc_config> 2021-07-16 17:30:07 +01:00
Johan Malm
e50bb45890 Move corner textures from ssd.c to theme.c
It makes more sense to just keep one set of corner textures for server
side view decorations, rather than storing a set for each view. This also
keeps the code simpler when when changing theme parameters.
2021-07-16 17:07:00 +01:00
Johan Malm
c668fd9b07 action: add "ToggleMaximize" 2021-07-13 21:54:22 +01:00
Johan Malm
69f0f68cc2 Open new views on output where cursor is 2021-07-13 21:50:02 +01:00
Johan Malm
eaed1a3cab action: add "Close" to close top-most view 2021-07-12 21:47:27 +01:00
Johan Malm
a3ac2f2767 layers: take into account usable area when maximizing views 2021-07-12 21:39:09 +01:00
Johan Malm
743803de3b cursor: initialize view_area
...to avoid inadvertantly triggering close/minimize/maximize
2021-07-12 19:59:19 +01:00
Johan Malm
ee15a5fe56 cursor: handle button press on layer-surface (issue #41) 2021-07-12 16:44:30 +01:00
Johan Malm
97a5695ccb cursor: do not pass _press_ to client when alt held 2021-07-09 22:29:48 +01:00
Johan Malm
b194881ac2 cursor: handle alt + mouse button (issue #40)
Move view on alt + left mouse button
Resize view on alt + right mouse button
2021-07-09 21:58:54 +01:00
Johan Malm
b19eecbbd4 keyboard: remove printf() debug message 2021-07-09 21:49:44 +01:00
Johan Malm
c6ae0b5694 xwayland-shell: unmaximize on first map
...to ensure consistency with xdg-shell implementation and to avoid
padding/margin complications.
2021-07-09 21:47:51 +01:00
Johan Malm
08429c5ba3 xwayland-shell: center view on first map 2021-07-09 21:45:38 +01:00
Johan Malm
3034da776b xdg-shell: center view on first map
...and take into account output layout co-ordinates.

Previously xdg-shell views were just positioned at (0, 0) on first map
regardless of output co-ordinates.

Fix issue #39
2021-07-09 21:43:27 +01:00
Johan Malm
cb98f8f197 view: add view_center() 2021-07-09 21:39:20 +01:00
Johan Malm
6ad8252de9 menu/theme: use wlr_texture_destroy() 2021-07-01 19:21:09 +01:00
Johan Malm
a7dfa965d1 action: stop showing alt-tab info messages 2021-07-01 18:02:25 +01:00
Johan Malm
5f0c2d75b5 keyboard: catch C-A-F1 to C-A-F12 to switch tty
Fix issue #34 item 4
2021-07-01 17:53:47 +01:00
Johan Malm
238fab1518 output: assert instead of quiet return 2021-06-30 20:12:58 +01:00
Johan Malm
afe666fd6e action: expand shell variables before execvp()
Expanding shell variables, including tilde, enables the following type
of keybind:

<keyboard>
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <command>bash ~/mute-script.sh</command>
      </action>
    </keybind>
</keyboard>

Fixes issue #32
2021-06-30 19:56:31 +01:00
Johan Malm
018593c824 rcxml: do not try to use theme Clearlooks-3.4
If no theme is specified in rc.xml, just use built-in theme
2021-06-28 20:48:55 +01:00
Johan Malm
be27bb30a3 server: remove wl_display_init_shm()
This function is called by wlroots in wlr_renderer_init_wl_display(), so
no need to call it again. This stops Qt apps segfaulting when run with
"-platform wayland"

Fixes issue #34 item 2
2021-06-28 20:42:41 +01:00
Johan Malm
e05a3c5f65 cairo: Replace <cairo/cairo.h> by <cairo.h>
See sway@d45623c2
2021-06-26 18:28:27 +01:00
Jan Beich
874cc9e637 xdg: chase swaywm/wlroots@9e58301df7
src/xdg.c:269:48: error: no member named 'subsurfaces' in 'struct wlr_surface'
                wl_list_for_each(subsurface, &view->surface->subsurfaces,
                                              ~~~~~~~~~~~~~  ^
/usr/include/wayland-util.h:443:30: note: expanded from macro 'wl_list_for_each'
        for (pos = wl_container_of((head)->next, pos, member);  \
                                    ^~~~
/usr/include/wayland-util.h:409:32: note: expanded from macro 'wl_container_of'
        (__typeof__(sample))((char *)(ptr) -                            \
                                      ^~~

Based on 3162766eef
2021-06-03 19:27:33 +01:00
Johan Malm
3c9f6c0551 rcxml: fix typo 2021-05-28 21:31:02 +01:00
Mikhail Kshevetskiy
00db22e44f focus: add basic follow mouse support 2021-05-28 21:25:19 +01:00
Johan Malm
892e93dd84 output: access texture width/height directly
wlr_texture_get_size() is removed in wlroots@6369f709 so we have to
access width and height directly.
2021-05-17 19:55:57 +01:00
Johan Malm
985ffd3691 xdg: fix subsurface damage bug
Create struct view_child for each wlr_surface subsurface on first view
map. Firefox doesn't damage properly without this.
2021-04-15 20:37:57 +01:00
Johan Malm
2f5a44d34d theme: move title_height to theme struct
title_height is a derived variable which needs both config and theme
variables (font height and title padding). The code is tidier calling
post_processing() for this from theme_init()
2021-04-15 20:13:49 +01:00
Johan Malm
85c775c3b1 theme: update built-in theme colors
Use #dddad6 for active title/border and #f6f5f4 for inactive.
It matches default GTK colors reasonably well.
2021-04-10 19:30:39 +01:00
Johan Malm
be942a6413 theme: fix pattern match bug
Remove 'else' from if-statements in order for the pattern match to apply
to more than just the first instance of each match.
2021-04-10 19:17:39 +01:00
Johan Malm
8f8a6dfea1 theme: add window.inactive.border.color 2021-04-10 19:11:29 +01:00
Johan Malm
31d3a53e46 theme: add window.active.border.color
This replaces window.active.handle.bg.color which will no longer be
supported.
2021-04-10 18:40:43 +01:00
Johan Malm
bb5e44a143 seat: remove warning for libinput finger count 2021-04-08 17:09:06 +01:00
Johan Malm
02628bde38 s/LAB_ADAPTIVE_SYNC/LABWC_ADAPTIVE_SYNC/
Use the the prefix LABWC_ for environment variable to increase
consistency.
2021-03-30 22:41:17 +01:00
Johan Malm
0a6eead36b rcxml: simplify debugging nodenames 2021-03-30 22:40:41 +01:00
Johan Malm
a5139815d6 config: add <theme><cornerRadius> 2021-03-30 22:39:52 +01:00
Johan Malm
2186aac610 seat: add missing damage_all_outputs() 2021-03-29 19:35:25 +01:00
Johan Malm
b3a73a9fdc theme: support border.width 2021-03-27 21:09:45 +00:00
Johan Malm
fdfb12b2ce Added support for rounded corners 2021-03-27 21:04:12 +00:00
Johan Malm
91374e09c0 cursor: damage output on pressing view 2021-03-26 20:12:01 +00:00
Johan Malm
be27024a2a output: optionally call wlr_output_enable_adaptive_sync()
Set environment variable LAB_ADAPTIVE_SYNC to enable adaptive sync.
2021-03-22 21:25:51 +00:00