mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Make window stacking level changes to match GNUstep.
This commit is contained in:
@@ -13,6 +13,8 @@ Changes since version 0.63.1:
|
||||
- integrated the 'no polling' patch from Jim Knoble <jmknoble@jmknoble.cx>.
|
||||
- new wsetfont script (Anton Zinoviev <zinoviev@debian.org>)
|
||||
- lots of i18n fixes (Jan Tomka/judas@hell <tomka@oalevice.sk>)
|
||||
- window levels changed to match GNUstep <rfm@gnu.org> ... src/GNUstep.h
|
||||
src/WindowMaker.h src/window.c wmlib/WMaker.h WINGs/WINGs/WINGs.h
|
||||
|
||||
|
||||
Changes since version 0.63.0:
|
||||
|
||||
@@ -42,25 +42,41 @@ typedef struct {
|
||||
#define ClientMessageMask (1L<<30)
|
||||
|
||||
|
||||
/* window stacking level */
|
||||
/*
|
||||
* Window levels are taken from GNUstep (gui/AppKit/NSWindow.h)
|
||||
* NSDesktopWindowLevel intended to be the level at which things
|
||||
* on the desktop sit ... so you should be able
|
||||
* to put a desktop background just below it.
|
||||
*
|
||||
* Applications are actually permitted to use any value in the
|
||||
* range INT_MIN+1 to INT_MAX
|
||||
*/
|
||||
enum {
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMDockWindowLevel = 5,
|
||||
WMSubmenuWindowLevel = 10,
|
||||
WMMainMenuWindowLevel = 20
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
};
|
||||
|
||||
|
||||
/* window attributes */
|
||||
enum {
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
};
|
||||
|
||||
|
||||
/* button types */
|
||||
typedef enum {
|
||||
/* 0 is reserved for internal use */
|
||||
|
||||
@@ -54,15 +54,30 @@ enum {
|
||||
};
|
||||
|
||||
#ifndef _WINGS_H_
|
||||
/* window stacking level */
|
||||
/*
|
||||
* Window levels are taken from GNUstep (gui/AppKit/NSWindow.h)
|
||||
* NSDesktopWindowLevel intended to be the level at which things
|
||||
* on the desktop sit ... so you should be able
|
||||
* to put a desktop background just below it.
|
||||
*
|
||||
* Applications are actually permitted to use any value in the
|
||||
* range INT_MIN+1 to INT_MAX
|
||||
*/
|
||||
enum {
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMDockWindowLevel = 5,
|
||||
WMSubmenuWindowLevel = 10,
|
||||
WMMainMenuWindowLevel = 20
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
};
|
||||
|
||||
|
||||
/* window attributes */
|
||||
enum {
|
||||
WMBorderlessWindowMask = 0,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
@@ -53,16 +54,26 @@ typedef enum {
|
||||
} WClassType;
|
||||
|
||||
|
||||
/* generic window levels (a superset of the N*XTSTEP ones) */
|
||||
/*
|
||||
* generic window levels (a superset of the N*XTSTEP ones)
|
||||
* Applications should use levels between WMDesktopLevel and
|
||||
* WMScreensaverLevel anything boyond that range is allowed,
|
||||
* but discouraged.
|
||||
*/
|
||||
enum {
|
||||
WMDesktopLevel = 0,
|
||||
WMSunkenLevel = 1,
|
||||
WMNormalLevel = 2,
|
||||
WMBackLevel = INT_MIN+1, /* Very lowest level */
|
||||
WMDesktopLevel = -1000, /* Lowest level of normal use */
|
||||
WMSunkenLevel = -1,
|
||||
WMNormalLevel = 0,
|
||||
WMFloatingLevel = 3,
|
||||
WMDockLevel = 4,
|
||||
WMSubmenuLevel = 5,
|
||||
WMMainMenuLevel = 6,
|
||||
WMOuterSpaceLevel = 7
|
||||
WMDockLevel = 5,
|
||||
WMSubmenuLevel = 6,
|
||||
WMMainMenuLevel = 20,
|
||||
WMStatusLevel = 21,
|
||||
WMModalLevel = 100,
|
||||
WMPopUpLevel = 101,
|
||||
WMScreensaverLevel = 1000,
|
||||
WMOuterSpaceLevel = INT_MAX
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
26
src/window.c
26
src/window.c
@@ -396,26 +396,12 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
|
||||
|
||||
if (wwin->wm_gnustep_attr->flags & GSWindowLevelAttr) {
|
||||
|
||||
switch (wwin->wm_gnustep_attr->window_level) {
|
||||
case WMNormalWindowLevel:
|
||||
*level = WMNormalLevel;
|
||||
break;
|
||||
case WMFloatingWindowLevel:
|
||||
*level = WMFloatingLevel;
|
||||
break;
|
||||
case WMDockWindowLevel:
|
||||
*level = WMDockLevel;
|
||||
break;
|
||||
case WMSubmenuWindowLevel:
|
||||
*level = WMSubmenuLevel;
|
||||
break;
|
||||
case WMMainMenuWindowLevel:
|
||||
*level = WMMainMenuLevel;
|
||||
break;
|
||||
default:
|
||||
*level = WMNormalLevel;
|
||||
break;
|
||||
}
|
||||
*level = wwin->wm_gnustep_attr->window_level;
|
||||
/*
|
||||
* INT_MIN is the only illegal window level.
|
||||
*/
|
||||
if (*level == INT_MIN)
|
||||
*level = INT_MIN + 1;
|
||||
} else {
|
||||
/* setup defaults */
|
||||
*level = WMNormalLevel;
|
||||
|
||||
@@ -69,20 +69,39 @@ typedef struct {
|
||||
|
||||
|
||||
#if !defined(_NSWindow_h_) && !defined(_GNUstep_H_GUITypes)
|
||||
/*
|
||||
* Window levels are taken from GNUstep (gui/AppKit/NSWindow.h)
|
||||
* NSDesktopWindowLevel intended to be the level at which things
|
||||
* on the desktop sit ... so you should be able
|
||||
* to put a desktop background just below it.
|
||||
*
|
||||
* Applications are actually permitted to use any value in the
|
||||
* range INT_MIN+1 to INT_MAX
|
||||
*/
|
||||
enum {
|
||||
NSNormalWindowLevel = 0,
|
||||
NSFloatingWindowLevel = 3,
|
||||
NSDockWindowLevel = 5,
|
||||
NSSubmenuWindowLevel = 10,
|
||||
NSMainMenuWindowLevel = 20
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
};
|
||||
|
||||
|
||||
/* window attributes */
|
||||
enum {
|
||||
NSBorderlessWindowMask = 0,
|
||||
NSTitledWindowMask = 1,
|
||||
NSClosableWindowMask = 2,
|
||||
NSMiniaturizableWindowMask = 4,
|
||||
NSResizableWindowMask = 8
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user