Commit graph

269 commits

Author SHA1 Message Date
bi4k8
815cd4aa46 define focused_view function and use it for keyboard actions 2021-09-20 21:14:24 +01:00
bi4k8
b7cce58f56 implement ToggleDecorations and ToggleFullscreen actions 2021-09-20 21:14:24 +01:00
Johan Malm
62d93d54c5 rcxml: refactor mousebind implementation 2021-09-06 21:54:00 +01:00
alexander bryan
1ac654f006 Apply coding std to <mouse> code & add .clang-format
The files:
    include/config/mousebind.h
    src/config/mousebind.c
    src/config/rc.xml
were formatted automatically via clang-format using the rules specified
in the .clang-format file. Specifically, the command;
clang-format -i -style=file include/config/mousebind.h \
src/config/mousebind.c src/config/rc.xml

This is unfortunately adding a break before the brace in enum
declarations
2021-09-01 07:05:37 +01:00
alex
92891b4dfa change mousebind code to use already existing enums
Also added an #include statement to ssd.h so it would compile without
depending on other headers to be #included before it
2021-09-01 07:05:37 +01:00
alex
36f5b49f2a Implemented <doubleClickTime> in rc.xml 2021-09-01 07:05:37 +01:00
alex
dfdb4e4b0e First implemenation of <mouse> in rc.xml
Can successfully parse the following XML and and implement the action:

<mouse>
    <context name="TitleBar">
        <mousebind button="Left" action="DoubleClick">
            <action name="ToggleMaximize"/>
        </mousebind>
    </context>
</mouse>

The XML parsing code for this looks A LOT different than the already
existing XML parsing code. It may have to be reworked
2021-09-01 07:05:37 +01:00
Johan Malm
a9042e3cde Fix coding style following 824282dd 2021-08-25 19:59:49 +01:00
Johan Malm
824282dd2e
Merge pull request #54 from telent/lockdown
implement input_inhibit protocol, needed for swaylock
2021-08-24 21:56:13 +01:00
Johan Malm
7bfe350f25 view: fix impl->set_fullscreen() argument bug 2021-08-24 21:53:20 +01:00
Daniel Barlow
ab9838888d implement commented-out bit in seat_disinhibit_input 2021-08-24 21:24:08 +01:00
Johan Malm
645a8e46a6 Support fullscreen mode (issue #53) 2021-08-23 22:05:30 +01:00
Daniel Barlow
39b1d92f9b implement input_inhibit protocol, needed for swaylock
this is in "it appears to work" state, though I blindly copy-pasted a little
more code than I'm happy with, so might benefit from a review
2021-08-22 21:30:42 +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
8c96c65018 ssd: refactor in preparation for making ssd_visible_box() private
Prepare to move code from output/render functions to ssd. We want
rendering functions to just render, not calculate decoration geometry
and such like.
2021-08-22 14:12:05 +01:00
Johan Malm
5f01c49b72 ssd: refactor and position title nearer left hand edge
Put title deco at the end of linked list to render it on top of corner
edges.
2021-08-22 14:06:11 +01:00
Johan Malm
3990018bb9 config: support setting menu item font
In rc.xml, support

<font place="MenuItem">
  <name></name>
  <size></size>
</font>
2021-08-20 20:27:52 +01:00
Johan Malm
a668f6f73d font: font_texture_create() support font size argument 2021-08-20 20:20:49 +01:00
Daniel Barlow
804384368c add support for primary selection 2021-08-18 23:42:56 +01:00
Johan Malm
77ade08158 osd: support 'alt-tab' on screen display
The osd window shows title, app_id/class and shell of all views that can
be cycled between.
2021-08-16 07:16:56 +01:00
Johan Malm
dff6dba54b theme: support different colored buttons
Add the following theme keys:

- window.active.button.iconify.unpressed.image.color
- window.active.button.max.unpressed.image.color
- window.active.button.close.unpressed.image.color
- window.inactive.button.iconify.unpressed.image.color
- window.inactive.button.max.unpressed.image.color
- window.inactive.button.close.unpressed.image.color

As far as I can tell, the openbox documentation does not mention the
entries listed above, but openbox does support them and some themes
do use them.
2021-08-11 20:58:35 +01:00
Johan Malm
9a9cd609f6 menu: fix breakage caused by f857aea8 2021-08-09 17:28:39 +01:00
Johan Malm
f857aea8f4 ssd: add application title to title bar 2021-08-07 09:35:53 +01:00
Johan Malm
5ecf0e1e7e Make font_texture_create() more generic
Move font_texture_create() to font.c so it can be used for purposes other
than rendering the menu, for example server side decoration.

Refactor menu.c and menu.h to use this more generic font_texture_create()
2021-08-07 08:35:46 +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
526ab1ae75 view: add view_toggle_maximize() 2021-08-02 16:49:41 +01:00
Johan Malm
1dc3059707 ssd: add support for interacting with bottom corners 2021-07-26 20:37:36 +01:00
Johan Malm
399322052b ssd: add ssd_interactive_box()
...which is used by desktop_view_at() and ssd_at() to determine which
decoration part is under the cursor.

ssd_interactive_box() allows deocoration parts to extend outside the
visible regions, and therefore supports a wider 'resize-edges' area than
the border itself.
2021-07-26 20:06:52 +01:00
Johan Malm
82e47ac1f5 Remove src/common/log.c
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
20fd8f59a7 Remove info() and die() 2021-07-22 21:30:17 +01:00
Johan Malm
22f5073ebd xdg: use "usable_area" when positioning view 2021-07-21 22:04:54 +01:00
Johan Malm
5e83ce6b46 Add view_move_to_edge() to header file 2021-07-20 20:24:39 +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
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
ee15a5fe56 cursor: handle button press on layer-surface (issue #41) 2021-07-12 16:44:30 +01:00
Johan Malm
cb98f8f197 view: add view_center() 2021-07-09 21:39:20 +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
Mikhail Kshevetskiy
00db22e44f focus: add basic follow mouse support 2021-05-28 21:25:19 +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
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
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
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
2a48f2801b Create a linked list of SSD for each view 2021-03-21 21:46:16 +00:00