forked from vitrine/wmaker
Avoid some pitfalls with window maximization and make it behave more intuitively. We now treat a window's vertical and horizontal maximization as separate properties and only remember its original geometry in a particular direction when it actually changes. We also deliberately do not remember a window's geometry when it changes from one maximized state to another. As a result windows can be more reliably restored to their original size. For example the "Maximize active window" hotkey followed by the "Maximize active window vertically" hotkey will now result in the window being maximized horizontally only, whereas previously the second hotkey would have no effect because the window was already maximized vertically. In addition selecting the Unmaximize window menu in the same example will now result in the window being restored to its original size. Previously the unmaximize attempt would have no effect because the vertical maximization would have remembered the window's "original" geometry when it was fully maximized. Maximus is handled separately. The "Maximus" hotkey will now toggle Maximus mode regardless of the window's current maximization state. For example if two unmaximized windows are on screen and one is Maximusized it will fill the space left by the second window, as before. But if the first window is maximized and the "Maximus" hotkey is pressed the window will now fill the same space as if it were Maximusized from its original size. Previously the window would not change size from its fully maximized state because the Maximus algorithm would consider fully-maximized to be a valid Maximus size.
77 lines
2.3 KiB
C
77 lines
2.3 KiB
C
/*
|
|
* Window Maker window manager
|
|
*
|
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
#ifndef WMACTIONS_H_
|
|
#define WMACTIONS_H_
|
|
|
|
#include "window.h"
|
|
|
|
#define MAX_HORIZONTAL (1 << 0)
|
|
#define MAX_VERTICAL (1 << 1)
|
|
#define MAX_LEFTHALF (1 << 2)
|
|
#define MAX_RIGHTHALF (1 << 3)
|
|
#define MAX_MAXIMUS (1 << 4)
|
|
#define MAX_IGNORE_XINERAMA (1 << 5)
|
|
#define MAX_KEYBOARD (1 << 6)
|
|
|
|
void wSetFocusTo(WScreen *scr, WWindow *wwin);
|
|
|
|
int wMouseMoveWindow(WWindow *wwin, XEvent *ev);
|
|
int wKeyboardMoveResizeWindow(WWindow *wwin);
|
|
|
|
void wMouseResizeWindow(WWindow *wwin, XEvent *ev);
|
|
|
|
void wShadeWindow(WWindow *wwin);
|
|
void wUnshadeWindow(WWindow *wwin);
|
|
|
|
void wIconifyWindow(WWindow *wwin);
|
|
void wDeiconifyWindow(WWindow *wwin);
|
|
|
|
void wSelectWindows(WScreen *scr, XEvent *ev);
|
|
|
|
void wSelectWindow(WWindow *wwin, Bool flag);
|
|
void wUnselectWindows(WScreen *scr);
|
|
|
|
void wMaximizeWindow(WWindow *wwin, int directions);
|
|
void wUnmaximizeWindow(WWindow *wwin);
|
|
void handleMaximize(WWindow *wwin, int directions);
|
|
|
|
void wHideAll(WScreen *src);
|
|
void wHideOtherApplications(WWindow *wwin);
|
|
void wShowAllWindows(WScreen *scr);
|
|
|
|
void wHideApplication(WApplication *wapp);
|
|
void wUnhideApplication(WApplication *wapp, Bool miniwindows,
|
|
Bool bringToCurrentWS);
|
|
|
|
void wRefreshDesktop(WScreen *scr);
|
|
|
|
void wArrangeIcons(WScreen *scr, Bool arrangeAll);
|
|
|
|
void wMakeWindowVisible(WWindow *wwin);
|
|
|
|
void wFullscreenWindow(WWindow *wwin);
|
|
void wUnfullscreenWindow(WWindow *wwin);
|
|
|
|
void animateResize(WScreen *scr, int x, int y, int w, int h, int fx, int fy, int fw, int fh);
|
|
|
|
#endif
|
|
|