mirror of
https://github.com/labwc/labwc.git
synced 2026-02-14 04:28:07 -05:00
Add deco parts top, right and bottom
This commit is contained in:
parent
a6ac2a0439
commit
c07acc9ee6
7 changed files with 104 additions and 22 deletions
28
src/cursor.c
28
src/cursor.c
|
|
@ -84,10 +84,22 @@ static void process_cursor_motion(struct server *server, uint32_t time)
|
|||
server->cursor_mgr, XCURSOR_DEFAULT, server->cursor);
|
||||
}
|
||||
switch (view_area) {
|
||||
case LAB_DECO_PART_TOP:
|
||||
case LAB_DECO_PART_TITLE:
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, XCURSOR_DEFAULT, server->cursor);
|
||||
break;
|
||||
case LAB_DECO_PART_TOP:
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, "top_side", server->cursor);
|
||||
break;
|
||||
case LAB_DECO_PART_RIGHT:
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, "right_side", server->cursor);
|
||||
break;
|
||||
case LAB_DECO_PART_BOTTOM:
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, "bottom_side", server->cursor);
|
||||
break;
|
||||
case LAB_DECO_PART_LEFT:
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, "left_side", server->cursor);
|
||||
|
|
@ -186,9 +198,21 @@ void cursor_button(struct wl_listener *listener, void *data)
|
|||
/* Focus that client if the button was _pressed_ */
|
||||
view_focus(view);
|
||||
switch (view_area) {
|
||||
case LAB_DECO_PART_TOP:
|
||||
case LAB_DECO_PART_TITLE:
|
||||
interactive_begin(view, LAB_CURSOR_MOVE, 0);
|
||||
break;
|
||||
case LAB_DECO_PART_TOP:
|
||||
interactive_begin(view, LAB_CURSOR_RESIZE,
|
||||
WLR_EDGE_TOP);
|
||||
break;
|
||||
case LAB_DECO_PART_RIGHT:
|
||||
interactive_begin(view, LAB_CURSOR_RESIZE,
|
||||
WLR_EDGE_RIGHT);
|
||||
break;
|
||||
case LAB_DECO_PART_BOTTOM:
|
||||
interactive_begin(view, LAB_CURSOR_RESIZE,
|
||||
WLR_EDGE_BOTTOM);
|
||||
break;
|
||||
case LAB_DECO_PART_LEFT:
|
||||
interactive_begin(view, LAB_CURSOR_RESIZE,
|
||||
WLR_EDGE_LEFT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue