mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Render window close button
This commit is contained in:
parent
40e862f3ac
commit
baca410560
17 changed files with 177 additions and 50 deletions
12
src/deco.c
12
src/deco.c
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* Helpers for handling window decorations
|
||||
*
|
||||
* Copyright Johan Malm 2020
|
||||
*/
|
||||
|
||||
#include "labwc.h"
|
||||
|
||||
struct wlr_box deco_max_extents(struct view *view)
|
||||
|
|
@ -18,6 +24,12 @@ struct wlr_box deco_box(struct view *view, enum deco_part deco_part)
|
|||
if (!view || !view->surface)
|
||||
return box;
|
||||
switch (deco_part) {
|
||||
case LAB_DECO_ICON_CLOSE:
|
||||
box.x = view->x + view->surface->current.width - 8 - 1;
|
||||
box.y = view->y - XWL_TITLEBAR_HEIGHT + 1;
|
||||
box.width = 8;
|
||||
box.height = 8;
|
||||
break;
|
||||
case LAB_DECO_PART_TITLE:
|
||||
box.x = view->x;
|
||||
box.y = view->y - XWL_TITLEBAR_HEIGHT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue