1
0
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:
Rodolfo García Peñas (kix)
2012-11-10 20:54:43 +01:00
committed by Carlos R. Mafra
parent cc1503a2f0
commit f846b7cdd3
2 changed files with 103 additions and 110 deletions

View File

@@ -38,6 +38,11 @@
#include "workspace.h" #include "workspace.h"
#include "framewin.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 *******/ /********* Global Variables *******/
extern WPreferences wPreferences; extern WPreferences wPreferences;

View File

@@ -223,15 +223,14 @@ typedef struct WWindow {
Window transient_for; /* WM_TRANSIENT_FOR */ Window transient_for; /* WM_TRANSIENT_FOR */
WFakeGroupLeader *fake_group; /* Fake group leader for grouping into WFakeGroupLeader *fake_group; /* Fake group leader for grouping into
a single appicon */ * a single appicon */
Window group_id; /* the leader window of the group */ Window group_id; /* the leader window of the group */
Window client_leader; /* WM_CLIENT_LEADER if not Window client_leader; /* WM_CLIENT_LEADER if not
internal_window */ * 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. Window orig_main_window; /* original main window of application.
used for the shared appicon thing */ * used for the shared appicon thing */
int cmap_window_no; int cmap_window_no;
Window *cmap_windows; Window *cmap_windows;
@@ -243,8 +242,8 @@ typedef struct WWindow {
long event_mask; /* the event mask thats selected */ long event_mask; /* the event mask thats selected */
struct {
/* state flags */ /* state flags */
struct {
unsigned int mapped:1; unsigned int mapped:1;
unsigned int focused:1; unsigned int focused:1;
unsigned int miniaturized:1; unsigned int miniaturized:1;
@@ -254,7 +253,6 @@ typedef struct WWindow {
unsigned int old_maximized:5; unsigned int old_maximized:5;
unsigned int fullscreen:1; unsigned int fullscreen:1;
unsigned int omnipresent:1; unsigned int omnipresent:1;
unsigned int semi_focused:1; unsigned int semi_focused:1;
/* window type flags */ /* window type flags */
unsigned int urgent:1; /* if wm_hints says this is urgent */ unsigned int urgent:1; /* if wm_hints says this is urgent */
@@ -264,7 +262,7 @@ typedef struct WWindow {
/* info flags */ /* info flags */
unsigned int is_gnustep:1; /* 1 if the window belongs to a GNUstep unsigned int is_gnustep:1; /* 1 if the window belongs to a GNUstep
app */ * app */
unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */ unsigned int is_dockapp:1; /* 1 if the window belongs to a DockApp */
unsigned int icon_moved:1; /* icon for this window was moved unsigned int icon_moved:1; /* icon for this window was moved
@@ -287,34 +285,24 @@ typedef struct WWindow {
unsigned int net_has_icon_title:1; unsigned int net_has_icon_title:1;
} flags; /* state of the window */ } flags; /* state of the window */
struct WIcon *icon; /* icon info for the window */ struct WIcon *icon; /* Window icon when miminized
* else is NULL! */
int icon_x, icon_y; /* position of the icon */ int icon_x, icon_y; /* position of the icon */
int icon_w, icon_h; int icon_w, icon_h;
RImage *net_icon_image; RImage *net_icon_image; /* Window Image */
Atom type; Atom type;
} WWindow; } WWindow;
#define HAS_TITLEBAR(w) (!(WFLAGP((w), no_titlebar) || (w)->flags.fullscreen)) #define HAS_TITLEBAR(w) (!(WFLAGP((w), no_titlebar) || (w)->flags.fullscreen))
#define HAS_RESIZEBAR(w) (!(WFLAGP((w), no_resizebar) || (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 HAS_BORDER(w) (!(WFLAGP((w), no_border) || (w)->flags.fullscreen))
#define IS_MOVABLE(w) (!(WFLAGP((w), no_movable) || (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_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 IS_OMNIPRESENT(w) ((w)->flags.omnipresent | WFLAGP(w, omnipresent))
#define WINDOW_LEVEL(w) ((w)->frame->core->stacking->window_level) #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))
/* /*
* Changes to this must update wWindowSaveState/getSavedState * Changes to this must update wWindowSaveState/getSavedState
*
*/ */
typedef struct WSavedState { typedef struct WSavedState {
int workspace; int workspace;