mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +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>.
|
- integrated the 'no polling' patch from Jim Knoble <jmknoble@jmknoble.cx>.
|
||||||
- new wsetfont script (Anton Zinoviev <zinoviev@debian.org>)
|
- new wsetfont script (Anton Zinoviev <zinoviev@debian.org>)
|
||||||
- lots of i18n fixes (Jan Tomka/judas@hell <tomka@oalevice.sk>)
|
- 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:
|
Changes since version 0.63.0:
|
||||||
|
|||||||
@@ -42,25 +42,41 @@ typedef struct {
|
|||||||
#define ClientMessageMask (1L<<30)
|
#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 {
|
enum {
|
||||||
|
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||||
WMNormalWindowLevel = 0,
|
WMNormalWindowLevel = 0,
|
||||||
WMFloatingWindowLevel = 3,
|
WMFloatingWindowLevel = 3,
|
||||||
WMDockWindowLevel = 5,
|
WMSubmenuWindowLevel = 3,
|
||||||
WMSubmenuWindowLevel = 10,
|
WMTornOffMenuWindowLevel = 3,
|
||||||
WMMainMenuWindowLevel = 20
|
WMMainMenuWindowLevel = 20,
|
||||||
|
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||||
|
WMStatusWindowLevel = 21,
|
||||||
|
WMModalPanelWindowLevel = 100,
|
||||||
|
WMPopUpMenuWindowLevel = 101,
|
||||||
|
WMScreenSaverWindowLevel = 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* window attributes */
|
/* window attributes */
|
||||||
enum {
|
enum {
|
||||||
WMBorderlessWindowMask = 0,
|
WMBorderlessWindowMask = 0,
|
||||||
WMTitledWindowMask = 1,
|
WMTitledWindowMask = 1,
|
||||||
WMClosableWindowMask = 2,
|
WMClosableWindowMask = 2,
|
||||||
WMMiniaturizableWindowMask = 4,
|
WMMiniaturizableWindowMask = 4,
|
||||||
WMResizableWindowMask = 8
|
WMResizableWindowMask = 8,
|
||||||
|
WMIconWindowMask = 64,
|
||||||
|
WMMiniWindowMask = 128
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* button types */
|
/* button types */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0 is reserved for internal use */
|
/* 0 is reserved for internal use */
|
||||||
|
|||||||
@@ -54,15 +54,30 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef _WINGS_H_
|
#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 {
|
enum {
|
||||||
|
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||||
WMNormalWindowLevel = 0,
|
WMNormalWindowLevel = 0,
|
||||||
WMFloatingWindowLevel = 3,
|
WMFloatingWindowLevel = 3,
|
||||||
WMDockWindowLevel = 5,
|
WMSubmenuWindowLevel = 3,
|
||||||
WMSubmenuWindowLevel = 10,
|
WMTornOffMenuWindowLevel = 3,
|
||||||
WMMainMenuWindowLevel = 20
|
WMMainMenuWindowLevel = 20,
|
||||||
|
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||||
|
WMStatusWindowLevel = 21,
|
||||||
|
WMModalPanelWindowLevel = 100,
|
||||||
|
WMPopUpMenuWindowLevel = 101,
|
||||||
|
WMScreenSaverWindowLevel = 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* window attributes */
|
/* window attributes */
|
||||||
enum {
|
enum {
|
||||||
WMBorderlessWindowMask = 0,
|
WMBorderlessWindowMask = 0,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "wconfig.h"
|
#include "wconfig.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
|
||||||
@@ -53,16 +54,26 @@ typedef enum {
|
|||||||
} WClassType;
|
} 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 {
|
enum {
|
||||||
WMDesktopLevel = 0,
|
WMBackLevel = INT_MIN+1, /* Very lowest level */
|
||||||
WMSunkenLevel = 1,
|
WMDesktopLevel = -1000, /* Lowest level of normal use */
|
||||||
WMNormalLevel = 2,
|
WMSunkenLevel = -1,
|
||||||
|
WMNormalLevel = 0,
|
||||||
WMFloatingLevel = 3,
|
WMFloatingLevel = 3,
|
||||||
WMDockLevel = 4,
|
WMDockLevel = 5,
|
||||||
WMSubmenuLevel = 5,
|
WMSubmenuLevel = 6,
|
||||||
WMMainMenuLevel = 6,
|
WMMainMenuLevel = 20,
|
||||||
WMOuterSpaceLevel = 7
|
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) {
|
if (wwin->wm_gnustep_attr->flags & GSWindowLevelAttr) {
|
||||||
|
|
||||||
switch (wwin->wm_gnustep_attr->window_level) {
|
*level = wwin->wm_gnustep_attr->window_level;
|
||||||
case WMNormalWindowLevel:
|
/*
|
||||||
*level = WMNormalLevel;
|
* INT_MIN is the only illegal window level.
|
||||||
break;
|
*/
|
||||||
case WMFloatingWindowLevel:
|
if (*level == INT_MIN)
|
||||||
*level = WMFloatingLevel;
|
*level = INT_MIN + 1;
|
||||||
break;
|
|
||||||
case WMDockWindowLevel:
|
|
||||||
*level = WMDockLevel;
|
|
||||||
break;
|
|
||||||
case WMSubmenuWindowLevel:
|
|
||||||
*level = WMSubmenuLevel;
|
|
||||||
break;
|
|
||||||
case WMMainMenuWindowLevel:
|
|
||||||
*level = WMMainMenuLevel;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
*level = WMNormalLevel;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* setup defaults */
|
/* setup defaults */
|
||||||
*level = WMNormalLevel;
|
*level = WMNormalLevel;
|
||||||
|
|||||||
@@ -69,20 +69,39 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(_NSWindow_h_) && !defined(_GNUstep_H_GUITypes)
|
#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 {
|
enum {
|
||||||
NSNormalWindowLevel = 0,
|
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||||
NSFloatingWindowLevel = 3,
|
WMNormalWindowLevel = 0,
|
||||||
NSDockWindowLevel = 5,
|
WMFloatingWindowLevel = 3,
|
||||||
NSSubmenuWindowLevel = 10,
|
WMSubmenuWindowLevel = 3,
|
||||||
NSMainMenuWindowLevel = 20
|
WMTornOffMenuWindowLevel = 3,
|
||||||
|
WMMainMenuWindowLevel = 20,
|
||||||
|
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||||
|
WMStatusWindowLevel = 21,
|
||||||
|
WMModalPanelWindowLevel = 100,
|
||||||
|
WMPopUpMenuWindowLevel = 101,
|
||||||
|
WMScreenSaverWindowLevel = 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* window attributes */
|
||||||
enum {
|
enum {
|
||||||
NSBorderlessWindowMask = 0,
|
WMBorderlessWindowMask = 0,
|
||||||
NSTitledWindowMask = 1,
|
WMTitledWindowMask = 1,
|
||||||
NSClosableWindowMask = 2,
|
WMClosableWindowMask = 2,
|
||||||
NSMiniaturizableWindowMask = 4,
|
WMMiniaturizableWindowMask = 4,
|
||||||
NSResizableWindowMask = 8
|
WMResizableWindowMask = 8,
|
||||||
|
WMIconWindowMask = 64,
|
||||||
|
WMMiniWindowMask = 128
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user