Commit graph

59 commits

Author SHA1 Message Date
Johan Malm
9a290feeea desktop: simplify interface for view raise/focus
Split desktop_focus_view() into the following two functions:
  - desktop_focus_and_activate_view()
  - desktop_raise_view()

Always call view_set_activated() rather than using the private
set_activated(). This keeps the code cleaner and ensures
wlr_foreign_toplevel_handle_v1_set_activated() is called.
2021-10-16 19:44:54 +01:00
Johan Malm
6a00166cff Merge branch 'master' of https://github.com/johanmalm/labwc 2021-10-04 06:24:34 +01:00
ARDiDo
6bf3bb97f5 implement basic drag and drop 2021-10-03 21:50:29 +01:00
Johan Malm
1e4598cdce s/desktop_view_at()/desktop_surface_and_view_at()/
Make is clearer what the function does.
2021-09-25 10:04:37 +01:00
Johan Malm
d2375b025d Fix coding style 2021-09-24 22:04:03 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
0413d7fa9a cursor: make cursor_motion() static 2021-09-24 20:53:22 +01:00
Johan Malm
cce3c8cda0 src/: fix coding style 2021-09-21 22:05:56 +01:00
Johan Malm
62d93d54c5 rcxml: refactor mousebind implementation 2021-09-06 21:54:00 +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
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
Daniel Barlow
804384368c add support for primary selection 2021-08-18 23:42:56 +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
6a5deb628e cursor: handle double click on title 2021-08-02 17:30:34 +01:00
Johan Malm
526ab1ae75 view: add view_toggle_maximize() 2021-08-02 16:49:41 +01:00
Johan Malm
fc542e6da1 cursor: simplify process_cursor_motion()
...by using wlr_xcursor_get_resize_name() instead of handling each
'resize_edge' case.
2021-07-30 14:26:54 +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
0eac290d54 Handle alt + cursor button outside view 2021-07-21 19:27:11 +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
Mikhail Kshevetskiy
00db22e44f focus: add basic follow mouse support 2021-05-28 21:25:19 +01:00
Johan Malm
91374e09c0 cursor: damage output on pressing view 2021-03-26 20:12:01 +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
2738ff2673 cursor: cursor_name fix
The current implementation detects resize edges over the wlr_surface,
sometimes preventing the correct cursor_name to be set.
2021-03-03 21:19:52 +00:00
Alex Bryan
f5f8acc543 Merge branch 'maximize' 2021-02-27 17:14:24 -05:00
Alex Bryan
5e7f2c91a3 Added basic maximize support for xdg and xwayland 2021-02-27 17:10:53 -05:00
Johan Malm
2ce58f2950 cursor.c: set cursor_name correctly when not over decoration 2021-02-27 19:26:13 +00:00
Johan Malm
133ea96f64 Simplify view margin/padding related code
Fix xdg-shell CSD resize bug
2021-02-27 16:55:10 +00:00
Johan Malm
0e69c9ee9f cursor.c: set damage for changing button states 2021-02-15 18:04:04 +00: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
Johan Malm
e0770a5672 Refactor view_move_resize() 2020-12-22 20:35:06 +00:00
Wenhua Zhao
860f949846 Do not overwrite cursor for app view 2020-11-29 08:03:44 +00:00
Wenhua Zhao
eee776de4f Resize via dragging corners 2020-11-29 08:03:44 +00:00
Johan Malm
543f00131c action: add "ShowMenu" option
Parse the following in rc.xml:

<keyboard>
  <keybind key="">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
</keyboard>
2020-10-31 15:27:22 +00:00
Johan Malm
d5b9a65978 s/cursor_mode/input_mode/ 2020-10-21 20:30:06 +01:00
Johan Malm
dc5d1ab976 Support a very simple root-menu 2020-10-19 22:14:17 +01:00
Johan Malm
f752610e0b desktop: refactor desktop_focus_view() 2020-10-08 20:08:41 +01:00
Johan Malm
25829d122c Refactor seat.c, keyboard.c, cursor.c
Use wlr_keyboard_group
2020-10-02 21:20:12 +01:00
Johan Malm
96e05057a3 Update .clang-format
Align with wlroots style
2020-09-28 20:41:41 +01:00
Johan Malm
4ecc5efa73 deco: refactor button code
- Make the height+width of buttons the same as the title bar.
- Center icons within the 'button space'
- Show button background color on hover (just hard-coded grey for now)
2020-09-21 19:24:27 +01:00
Johan Malm
090e78b85a view: add 'struct border margin'
Simplify various view interfaces as a result
2020-09-15 20:41:01 +01:00