mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Window comments cleanup
This patch only add some tabs the window.h (only window struct area).
The main change is that moves this block to switchpanel.c, because
is only used there:
((w)->wm_gnustep_attr->flags & GSWindowLevelAttr) && \
((w)->wm_gnustep_attr->window_level == WMMainMenuWindowLevel || \
(w)->wm_gnustep_attr->window_level == WMSubmenuWindowLevel))
The patch also include two comments in the window's image:
- WIcon icon is only used when the window is minimized, else is NULL
- RImage has the window image, used in switchpanel,...
This commit is contained in:
committed by
Carlos R. Mafra
parent
cc1503a2f0
commit
f846b7cdd3
@@ -38,6 +38,11 @@
|
||||
#include "workspace.h"
|
||||
#include "framewin.h"
|
||||
|
||||
#define IS_GNUSTEP_MENU(w) ((w)->wm_gnustep_attr && \
|
||||
((w)->wm_gnustep_attr->flags & GSWindowLevelAttr) && \
|
||||
((w)->wm_gnustep_attr->window_level == WMMainMenuWindowLevel || \
|
||||
(w)->wm_gnustep_attr->window_level == WMSubmenuWindowLevel))
|
||||
|
||||
/********* Global Variables *******/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
|
||||
208
src/window.h
208
src/window.h
@@ -175,146 +175,134 @@ typedef struct WFakeGroupLeader {
|
||||
* structure created when it's being first mapped.
|
||||
*/
|
||||
typedef struct WWindow {
|
||||
struct WWindow *prev; /* window focus list */
|
||||
struct WWindow *next;
|
||||
struct WWindow *prev; /* window focus list */
|
||||
struct WWindow *next;
|
||||
|
||||
WScreen *screen_ptr; /* pointer to the screen structure */
|
||||
WWindowAttributes user_flags; /* window attribute flags set by user */
|
||||
WWindowAttributes defined_user_flags;/* mask for user_flags */
|
||||
WWindowAttributes client_flags; /* window attribute flags set by app
|
||||
* initialized with global defaults */
|
||||
WScreen *screen_ptr; /* pointer to the screen structure */
|
||||
WWindowAttributes user_flags; /* window attribute flags set by user */
|
||||
WWindowAttributes defined_user_flags; /* mask for user_flags */
|
||||
WWindowAttributes client_flags; /* window attribute flags set by app
|
||||
* initialized with global defaults */
|
||||
|
||||
struct InspectorPanel *inspector; /* pointer to attribute editor panel */
|
||||
struct InspectorPanel *inspector; /* pointer to attribute editor panel */
|
||||
|
||||
struct WFrameWindow *frame; /* the frame window */
|
||||
int frame_x, frame_y; /* position of the frame in root*/
|
||||
struct WFrameWindow *frame; /* the frame window */
|
||||
int frame_x, frame_y; /* position of the frame in root*/
|
||||
|
||||
struct {
|
||||
int x, y;
|
||||
unsigned int width, height; /* original geometry of the window */
|
||||
} old_geometry; /* (before things like maximize) */
|
||||
struct {
|
||||
int x, y;
|
||||
unsigned int width, height; /* original geometry of the window */
|
||||
} old_geometry; /* (before things like maximize) */
|
||||
|
||||
struct {
|
||||
int x, y;
|
||||
unsigned int width, height; /* original geometry of the window */
|
||||
} bfs_geometry; /* (before fullscreen) */
|
||||
struct {
|
||||
int x, y;
|
||||
unsigned int width, height; /* original geometry of the window */
|
||||
} bfs_geometry; /* (before fullscreen) */
|
||||
|
||||
int maximus_x; /* size after Maximusizing */
|
||||
int maximus_y;
|
||||
int maximus_x; /* size after Maximusizing */
|
||||
int maximus_y;
|
||||
|
||||
/* client window info */
|
||||
short old_border_width; /* original border width of client_win*/
|
||||
Window client_win; /* the window we're managing */
|
||||
WObjDescriptor client_descriptor; /* dummy descriptor for client */
|
||||
struct {
|
||||
int x, y; /* position of *client* relative
|
||||
* to root */
|
||||
unsigned int width, height; /* size of the client window */
|
||||
} client;
|
||||
/* client window info */
|
||||
short old_border_width; /* original border width of client_win*/
|
||||
Window client_win; /* the window we're managing */
|
||||
WObjDescriptor client_descriptor; /* dummy descriptor for client */
|
||||
struct {
|
||||
int x, y; /* position of *client* relative
|
||||
* to root */
|
||||
unsigned int width, height; /* size of the client window */
|
||||
} client;
|
||||
|
||||
XSizeHints *normal_hints; /* WM_NORMAL_HINTS */
|
||||
XWMHints *wm_hints; /* WM_HINTS (optional) */
|
||||
char *wm_instance; /* instance of WM_CLASS */
|
||||
char *wm_class; /* class of WM_CLASS */
|
||||
GNUstepWMAttributes *wm_gnustep_attr;/* GNUstep window attributes */
|
||||
XSizeHints *normal_hints; /* WM_NORMAL_HINTS */
|
||||
XWMHints *wm_hints; /* WM_HINTS (optional) */
|
||||
char *wm_instance; /* instance of WM_CLASS */
|
||||
char *wm_class; /* class of WM_CLASS */
|
||||
GNUstepWMAttributes *wm_gnustep_attr; /* GNUstep window attributes */
|
||||
|
||||
int state; /* state as in ICCCM */
|
||||
int state; /* state as in ICCCM */
|
||||
|
||||
Window transient_for; /* WM_TRANSIENT_FOR */
|
||||
Window transient_for; /* WM_TRANSIENT_FOR */
|
||||
|
||||
WFakeGroupLeader *fake_group; /* Fake group leader for grouping into
|
||||
a single appicon */
|
||||
Window group_id; /* the leader window of the group */
|
||||
Window client_leader; /* WM_CLIENT_LEADER if not
|
||||
internal_window */
|
||||
WFakeGroupLeader *fake_group; /* Fake group leader for grouping into
|
||||
* a single appicon */
|
||||
Window group_id; /* the leader window of the group */
|
||||
Window client_leader; /* WM_CLIENT_LEADER if not
|
||||
* internal_window */
|
||||
|
||||
Window main_window; /* main window for the application */
|
||||
Window main_window; /* main window for the application */
|
||||
Window orig_main_window; /* original main window of application.
|
||||
* used for the shared appicon thing */
|
||||
|
||||
Window orig_main_window; /* original main window of application.
|
||||
used for the shared appicon thing */
|
||||
int cmap_window_no;
|
||||
Window *cmap_windows;
|
||||
|
||||
int cmap_window_no;
|
||||
Window *cmap_windows;
|
||||
/* protocols */
|
||||
WProtocols protocols; /* accepted WM_PROTOCOLS */
|
||||
|
||||
/* protocols */
|
||||
WProtocols protocols; /* accepted WM_PROTOCOLS */
|
||||
FocusMode focus_mode; /* type of keyboard input focus */
|
||||
|
||||
FocusMode focus_mode; /* type of keyboard input focus */
|
||||
long event_mask; /* the event mask thats selected */
|
||||
|
||||
long event_mask; /* the event mask thats selected */
|
||||
|
||||
struct {
|
||||
/* state flags */
|
||||
unsigned int mapped:1;
|
||||
unsigned int focused:1;
|
||||
unsigned int miniaturized:1;
|
||||
unsigned int hidden:1;
|
||||
unsigned int shaded:1;
|
||||
unsigned int maximized:5;
|
||||
unsigned int old_maximized:5;
|
||||
unsigned int fullscreen:1;
|
||||
unsigned int omnipresent:1;
|
||||
|
||||
unsigned int semi_focused:1;
|
||||
/* window type flags */
|
||||
unsigned int urgent:1; /* if wm_hints says this is urgent */
|
||||
/* state flags */
|
||||
struct {
|
||||
unsigned int mapped:1;
|
||||
unsigned int focused:1;
|
||||
unsigned int miniaturized:1;
|
||||
unsigned int hidden:1;
|
||||
unsigned int shaded:1;
|
||||
unsigned int maximized:5;
|
||||
unsigned int old_maximized:5;
|
||||
unsigned int fullscreen:1;
|
||||
unsigned int omnipresent:1;
|
||||
unsigned int semi_focused:1;
|
||||
/* window type flags */
|
||||
unsigned int urgent:1; /* if wm_hints says this is urgent */
|
||||
#ifdef SHAPE
|
||||
unsigned int shaped:1;
|
||||
unsigned int shaped:1;
|
||||
#endif
|
||||
|
||||
/* info flags */
|
||||
unsigned int is_gnustep:1; /* 1 if the window belongs to a GNUstep
|
||||
app */
|
||||
unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */
|
||||
/* info flags */
|
||||
unsigned int is_gnustep:1; /* 1 if the window belongs to a GNUstep
|
||||
* app */
|
||||
unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */
|
||||
|
||||
unsigned int icon_moved:1; /* icon for this window was moved
|
||||
* by the user */
|
||||
unsigned int selected:1; /* multiple window selection */
|
||||
unsigned int skip_next_animation:1;
|
||||
unsigned int internal_window:1;
|
||||
unsigned int changing_workspace:1;
|
||||
unsigned int icon_moved:1; /* icon for this window was moved
|
||||
* by the user */
|
||||
unsigned int selected:1; /* multiple window selection */
|
||||
unsigned int skip_next_animation:1;
|
||||
unsigned int internal_window:1;
|
||||
unsigned int changing_workspace:1;
|
||||
|
||||
unsigned int inspector_open:1; /* attrib inspector is already open */
|
||||
unsigned int inspector_open:1; /* attrib inspector is already open */
|
||||
|
||||
unsigned int destroyed:1; /* window was already destroyed */
|
||||
unsigned int menu_open_for_me:1; /* window commands menu */
|
||||
unsigned int obscured:1; /* window is obscured */
|
||||
unsigned int destroyed:1; /* window was already destroyed */
|
||||
unsigned int menu_open_for_me:1;/* window commands menu */
|
||||
unsigned int obscured:1; /* window is obscured */
|
||||
|
||||
unsigned int net_skip_pager:1;
|
||||
unsigned int net_handle_icon:1;
|
||||
unsigned int net_show_desktop:1;
|
||||
unsigned int net_has_title:1; /* use netwm version of WM_NAME */
|
||||
unsigned int net_has_icon_title:1;
|
||||
} flags; /* state of the window */
|
||||
unsigned int net_skip_pager:1;
|
||||
unsigned int net_handle_icon:1;
|
||||
unsigned int net_show_desktop:1;
|
||||
unsigned int net_has_title:1; /* use netwm version of WM_NAME */
|
||||
unsigned int net_has_icon_title:1;
|
||||
} flags; /* state of the window */
|
||||
|
||||
struct WIcon *icon; /* icon info for the window */
|
||||
int icon_x, icon_y; /* position of the icon */
|
||||
int icon_w, icon_h;
|
||||
RImage *net_icon_image;
|
||||
Atom type;
|
||||
struct WIcon *icon; /* Window icon when miminized
|
||||
* else is NULL! */
|
||||
int icon_x, icon_y; /* position of the icon */
|
||||
int icon_w, icon_h;
|
||||
RImage *net_icon_image; /* Window Image */
|
||||
Atom type;
|
||||
} WWindow;
|
||||
|
||||
|
||||
#define HAS_TITLEBAR(w) (!(WFLAGP((w), no_titlebar) || (w)->flags.fullscreen))
|
||||
#define HAS_RESIZEBAR(w) (!(WFLAGP((w), no_resizebar) || (w)->flags.fullscreen))
|
||||
#define HAS_BORDER(w) (!(WFLAGP((w), no_border) || (w)->flags.fullscreen))
|
||||
#define IS_MOVABLE(w) (!(WFLAGP((w), no_movable) || (w)->flags.fullscreen))
|
||||
#define IS_RESIZABLE(w) (!(WFLAGP((w), no_resizable) || (w)->flags.fullscreen))
|
||||
|
||||
/* XXX: CHECK THIS,.. IT SEEMED WEIRD TO ME!!! */
|
||||
#define IS_OMNIPRESENT(w) ((w)->flags.omnipresent | WFLAGP(w, omnipresent))
|
||||
|
||||
#define WINDOW_LEVEL(w) ((w)->frame->core->stacking->window_level)
|
||||
|
||||
#define IS_GNUSTEP_MENU(w) ((w)->wm_gnustep_attr && \
|
||||
((w)->wm_gnustep_attr->flags & GSWindowLevelAttr) && \
|
||||
((w)->wm_gnustep_attr->window_level==WMMainMenuWindowLevel || \
|
||||
(w)->wm_gnustep_attr->window_level==WMSubmenuWindowLevel))
|
||||
|
||||
#define HAS_TITLEBAR(w) (!(WFLAGP((w), no_titlebar) || (w)->flags.fullscreen))
|
||||
#define HAS_RESIZEBAR(w) (!(WFLAGP((w), no_resizebar) || (w)->flags.fullscreen))
|
||||
#define HAS_BORDER(w) (!(WFLAGP((w), no_border) || (w)->flags.fullscreen))
|
||||
#define IS_MOVABLE(w) (!(WFLAGP((w), no_movable) || (w)->flags.fullscreen))
|
||||
#define IS_RESIZABLE(w) (!(WFLAGP((w), no_resizable) || (w)->flags.fullscreen))
|
||||
#define IS_OMNIPRESENT(w) ((w)->flags.omnipresent | WFLAGP(w, omnipresent))
|
||||
#define WINDOW_LEVEL(w) ((w)->frame->core->stacking->window_level)
|
||||
|
||||
/*
|
||||
* Changes to this must update wWindowSaveState/getSavedState
|
||||
*
|
||||
*/
|
||||
typedef struct WSavedState {
|
||||
int workspace;
|
||||
|
||||
Reference in New Issue
Block a user