menu placement

allow placement using x,y coordinates as well as centered in the output, set globally
This commit is contained in:
Droc 2024-08-17 08:47:14 -05:00
parent 13dee64828
commit 38659ff928
5 changed files with 87 additions and 1 deletions

View file

@ -498,6 +498,21 @@ extending outward from the snapped edge.
outlined rectangle is shown to indicate the geometry of resized window.
Default is yes.
*<resize><popupPosition>* see rc.xml.all for example
Lets the menu placement be set by a fixed position or centered on
screen. If set then the atCursor placement is overridden. Not enabled
by default. Fixed takes x,y coordinates for placement.
Note: openbox allows 'Center', 'Top', or 'Fixed' we use Center & Fixed.
Positioning is per monitor based on which monitor the cursor is in.
*<resize><popupFixedPosition>*
set x, y coordinates for menu placement
- x,y accept positive offsets only.
- 0,0 places menu at top left corner of desktop
- monitor width -1, monitor height -1 places menu at bottom right.
## KEYBOARD
*<keyboard><numlock>* [on|off]

View file

@ -115,7 +115,26 @@
<popupShow>Never</popupShow>
<!-- Let client redraw its contents while resizing -->
<drawContents>yes</drawContents>
</resize>
<!-- options for fixed menu placement
will override all atCursor placement -->
<!--
<popupPosition>Fixed</popupPosition>
-->
<!-- openbox uses 'Center', 'Top', or 'Fixed'
but we use Fixed & Center for now', positioning
is per output. -->
<popupFixedPosition>
<!-- openbox allows - negative offsets but that's because of X
we use positive offset, 0,0 is top left corner
monitor width - 1, monitor height - 1
will put the menu at bottom right corner -->
<x>10</x> <!-- 10 pixel from top left corner -->
<y>10</y>
</popupFixedPosition>
</resize>
<focus>
<followMouse>no</followMouse>