]> git.mdlowis.com Git - proto/labwc.git/commitdiff
implement handling for Client, Frame, and Root/Desktop (conflated for now) mouse...
authorbi4k8 <bi4k8@github>
Wed, 1 Dec 2021 22:17:04 +0000 (22:17 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 2 Dec 2021 17:58:31 +0000 (17:58 +0000)
include/ssd.h
src/config/mousebind.c
src/ssd.c

index 7b6c45085fb1425438226ebef971cdf1705c2e83..0215c2fcd87ce09ca0d396a4cf6c103b077cad8a 100644 (file)
@@ -5,7 +5,7 @@
 #include "labwc.h"
 
 /*
- * Sequence these according to the order they should be processes for
+ * Sequence these according to the order they should be processed for
  * press and hover events. Bear in mind that some of their respective
  * interactive areas overlap, so for example buttons need to come before title.
  */
@@ -24,6 +24,9 @@ enum ssd_part_type {
        LAB_SSD_PART_RIGHT,
        LAB_SSD_PART_BOTTOM,
        LAB_SSD_PART_LEFT,
+       LAB_SSD_CLIENT,
+       LAB_SSD_FRAME,
+       LAB_SSD_ROOT,
        LAB_SSD_END_MARKER
 };
 
index 03241c575233438492626a975e090881be7f8a8f..ac988265c0afde9e019546503d3d376edc4402d1 100644 (file)
@@ -65,6 +65,14 @@ context_from_str(const char *str)
                return LAB_SSD_BUTTON_MAXIMIZE;
        } else if (!strcasecmp(str, "Iconify")) {
                return LAB_SSD_BUTTON_ICONIFY;
+       } else if (!strcasecmp(str, "Frame")) {
+               return LAB_SSD_FRAME;
+       } else if (!strcasecmp(str, "Client")) {
+               return LAB_SSD_CLIENT;
+       } else if (!strcasecmp(str, "Desktop")) {
+               return LAB_SSD_ROOT;
+       } else if (!strcasecmp(str, "Root")) {
+               return LAB_SSD_ROOT;
        }
        wlr_log(WLR_ERROR, "unknown mouse context (%s)", str);
        return LAB_SSD_NONE;
index 4928175ac03be6c257ffa3088ab7147ac8009bb8..a948cf1177727a82bf47ed98206e27768c2425b1 100644 (file)
--- a/src/ssd.c
+++ b/src/ssd.c
@@ -135,6 +135,12 @@ ssd_box(struct view *view, enum ssd_part_type type)
                box.width = theme->border_width + INVISIBLE_MARGIN;
                box.height = view->h;
                break;
+       case LAB_SSD_CLIENT:
+               box.x = view->x;
+               box.y = view->y;
+               box.width = view->w;
+               box.height = view->h;
+               break;
        default:
                break;
        }