1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-21 02:43:32 +01:00

Add central position feature for active window

This patch adds a new Central feature under the window menu
"Other maximization" entry.
Shortcut can be configured via WPrefs "Center active window" action.
When called the active window is centered on the screen head.
If the window height or width are bigger than the head size,
the window is resized to fit.
There are some transitions defined as below:
*from fullscreen to center
*from any corner to center
*from top half to center top half
*from bottom half to center bottom half
*from left half to center left half
*from right half to center right half

Undoing the action is done via the window menu "Unmaximize" entry
or the shortcut.
This commit is contained in:
David Maciejak
2023-03-31 07:18:40 +08:00
committed by Carlos R. Mafra
parent 3344f2b040
commit ab45c6c6c2
15 changed files with 93 additions and 24 deletions

View File

@@ -214,8 +214,8 @@ typedef struct _WScreen {
struct WPixmap *menu_mini_indicator; /* for miniwindow */
struct WPixmap *menu_hide_indicator; /* for hidden window */
struct WPixmap *menu_shade_indicator; /* for shaded window */
struct WPixmap *menu_snap_vertically_indicator; /* for vertically snap window */
struct WPixmap *menu_snap_horizontally_indicator; /* for horizontally snap window */
struct WPixmap *menu_snap_vertical_indicator; /* for vertical snap window */
struct WPixmap *menu_snap_horizontal_indicator; /* for horizontal snap window */
struct WPixmap *menu_snap_rh_indicator; /* for righ half snap window */
struct WPixmap *menu_snap_lh_indicator; /* for left half snap window */
struct WPixmap *menu_snap_th_indicator; /* for top half snap window */
@@ -225,6 +225,7 @@ typedef struct _WScreen {
struct WPixmap *menu_snap_bl_indicator; /* for bottom left snap window */
struct WPixmap *menu_snap_br_indicator; /* for bottom right snap window */
struct WPixmap *menu_snap_tiled_indicator; /* for tiled window */
struct WPixmap *menu_central_indicator; /* for central window */
int app_menu_x, app_menu_y; /* position for application menus */