mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
config: Redefine Title context to include blank areas of Titlebar
... and use Title for the Drag (Move) and DoubleClick (Maximize) titlebar actions, which are unexpected when the cursor is over one of the window buttons.
This commit is contained in:
parent
d5e2728c7f
commit
ebd0a5d526
4 changed files with 17 additions and 9 deletions
|
|
@ -186,8 +186,10 @@ The rest of this man page describes configuration options.
|
||||||
*<action>* can exist within one *<mousebind>*
|
*<action>* can exist within one *<mousebind>*
|
||||||
|
|
||||||
Define a mouse binding. Supported context-names include:
|
Define a mouse binding. Supported context-names include:
|
||||||
- TitleBar: The area where the title of the window is shown.
|
- TitleBar: The decoration on top of the window, where the window
|
||||||
- Title: The title of the window itself.
|
buttons and the window title are shown.
|
||||||
|
- Title: The area of the titlebar (including blank space) between
|
||||||
|
the window buttons, where the window title is displayed.
|
||||||
- WindowMenu: The button on the left.
|
- WindowMenu: The button on the left.
|
||||||
- Iconify: The button that looks like an underline.
|
- Iconify: The button that looks like an underline.
|
||||||
- Maximize: The button that looks like a box.
|
- Maximize: The button that looks like a box.
|
||||||
|
|
|
||||||
|
|
@ -215,9 +215,6 @@
|
||||||
<action name="Focus"/>
|
<action name="Focus"/>
|
||||||
<action name="Raise"/>
|
<action name="Raise"/>
|
||||||
</mousebind>
|
</mousebind>
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Move"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Click">
|
<mousebind button="Right" action="Click">
|
||||||
<action name="Focus" />
|
<action name="Focus" />
|
||||||
<action name="Raise" />
|
<action name="Raise" />
|
||||||
|
|
@ -225,9 +222,13 @@
|
||||||
<menu>client-menu</menu>
|
<menu>client-menu</menu>
|
||||||
</action>
|
</action>
|
||||||
</mousebind>
|
</mousebind>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="Title">
|
||||||
|
<mousebind button="Left" action="Drag">
|
||||||
|
<action name="Move"/>
|
||||||
|
</mousebind>
|
||||||
<mousebind button="Left" action="DoubleClick">
|
<mousebind button="Left" action="DoubleClick">
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="ToggleMaximize"/>
|
<action name="ToggleMaximize"/>
|
||||||
</mousebind>
|
</mousebind>
|
||||||
</context>
|
</context>
|
||||||
|
|
|
||||||
|
|
@ -570,8 +570,8 @@ static struct mouse_combos {
|
||||||
{ "Frame", "A-Right", "Drag", "Resize", NULL},
|
{ "Frame", "A-Right", "Drag", "Resize", NULL},
|
||||||
{ "Titlebar", "Left", "Press", "Focus", NULL},
|
{ "Titlebar", "Left", "Press", "Focus", NULL},
|
||||||
{ "Titlebar", "Left", "Press", "Raise", NULL},
|
{ "Titlebar", "Left", "Press", "Raise", NULL},
|
||||||
{ "TitleBar", "Left", "Drag", "Move", NULL },
|
{ "Title", "Left", "Drag", "Move", NULL },
|
||||||
{ "TitleBar", "Left", "DoubleClick", "ToggleMaximize", NULL },
|
{ "Title", "Left", "DoubleClick", "ToggleMaximize", NULL },
|
||||||
{ "TitleBar", "Right", "Click", "Focus", NULL},
|
{ "TitleBar", "Right", "Click", "Focus", NULL},
|
||||||
{ "TitleBar", "Right", "Click", "Raise", NULL},
|
{ "TitleBar", "Right", "Click", "Raise", NULL},
|
||||||
{ "TitleBar", "Right", "Click", "ShowMenu", "client-menu"},
|
{ "TitleBar", "Right", "Click", "ShowMenu", "client-menu"},
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,11 @@ ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate)
|
||||||
return candidate >= LAB_SSD_BUTTON_CLOSE
|
return candidate >= LAB_SSD_BUTTON_CLOSE
|
||||||
&& candidate <= LAB_SSD_PART_TITLE;
|
&& candidate <= LAB_SSD_PART_TITLE;
|
||||||
}
|
}
|
||||||
|
if (whole == LAB_SSD_PART_TITLE) {
|
||||||
|
/* "Title" includes blank areas of "Titlebar" as well */
|
||||||
|
return candidate >= LAB_SSD_PART_TITLEBAR
|
||||||
|
&& candidate <= LAB_SSD_PART_TITLE;
|
||||||
|
}
|
||||||
if (whole == LAB_SSD_FRAME) {
|
if (whole == LAB_SSD_FRAME) {
|
||||||
return candidate >= LAB_SSD_BUTTON_CLOSE
|
return candidate >= LAB_SSD_BUTTON_CLOSE
|
||||||
&& candidate <= LAB_SSD_CLIENT;
|
&& candidate <= LAB_SSD_CLIENT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue