1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 23:22:30 +01:00

Update for 0.51.2-pre2

This commit is contained in:
dan
1999-03-09 14:58:01 +00:00
parent 60980735fe
commit 088c0ac230
108 changed files with 2998 additions and 2770 deletions

View File

@@ -139,7 +139,7 @@ wconfig.h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
SOURCES = $(wmaker_SOURCES)
OBJECTS = $(wmaker_OBJECTS)

View File

@@ -200,6 +200,14 @@ typedef enum {
#define WSTATE_NEED_RESTART 2
#define WSTATE_EXITING 3
#define WSTATE_RESTARTING 4
#define WSTATE_MODAL 5
#define WCHECK_STATE(state) (state == WProgramState)
#define WCHANGE_STATE(nstate) \
if (WProgramState == WSTATE_NORMAL\
|| nstate != WSTATE_MODAL)\
WProgramState = (nstate)
typedef struct {
@@ -352,6 +360,7 @@ typedef struct WPreferences {
extern Display *dpy;
extern char *ProgName;
extern unsigned int ValidModMask;
extern char WProgramState;
/****** Global Functions ******/
extern void wAbort(Bool dumpCore);

View File

@@ -415,7 +415,15 @@ wMaximizeWindow(WWindow *wwin, int directions)
if (WFLAGP(wwin, no_resizable))
return;
if (WFLAGP(wwin, full_maximize)) {
usableArea.x1 = 0;
usableArea.y1 = 0;
usableArea.x2 = wwin->screen_ptr->scr_width;
usableArea.y2 = wwin->screen_ptr->scr_height;
}
if (wwin->flags.shaded) {
wwin->flags.skip_next_animation = 1;
wUnshadeWindow(wwin);
@@ -446,6 +454,8 @@ wMaximizeWindow(WWindow *wwin, int directions)
new_height = (usableArea.y2-usableArea.y1)-FRAME_BORDER_WIDTH*2;
new_y = usableArea.y1;
if (WFLAGP(wwin, full_maximize))
new_y -= wwin->frame->top_width;
} else {
@@ -453,7 +463,10 @@ wMaximizeWindow(WWindow *wwin, int directions)
new_height = wwin->frame->core->height;
}
new_height -= wwin->frame->top_width+wwin->frame->bottom_width;
if (!WFLAGP(wwin, full_maximize)) {
new_height -= wwin->frame->top_width+wwin->frame->bottom_width;
}
wWindowConstrainSize(wwin, &new_width, &new_height);
wWindowConfigure(wwin, new_x, new_y, new_width, new_height);
@@ -1012,10 +1025,11 @@ wDeiconifyWindow(WWindow *wwin)
if (!wwin->flags.miniaturized)
return;
if (wwin->transient_for != None) {
if (wwin->transient_for != None
&& wwin->transient_for != wwin->screen_ptr->root_win) {
WWindow *owner = recursiveTransientFor(wwin);
if (wwin->flags.miniaturized) {
if (owner && owner->flags.miniaturized) {
wDeiconifyWindow(owner);
wSetFocusTo(wwin->screen_ptr, wwin);
wRaiseFrame(wwin->frame->core);

View File

@@ -525,17 +525,32 @@ static void
killCallback(WMenu *menu, WMenuEntry *entry)
{
WApplication *wapp = (WApplication*)entry->clientdata;
char *buffer;
if (!WCHECK_STATE(WSTATE_NORMAL))
return;
WCHANGE_STATE(WSTATE_MODAL);
assert(entry->clientdata!=NULL);
buffer = wstrappend(wapp->app_icon ? wapp->app_icon->wm_class : NULL,
_(" will be forcibly closed.\n"
"Any unsaved changes will be lost.\n"
"Please confirm."));
wretain(wapp->main_window_desc);
if (wPreferences.dont_confirm_kill
|| wMessageDialog(menu->frame->screen_ptr, _("Kill Application"),
_("This will kill the application.\nAny unsaved changes will be lost.\nPlease confirm."),
_("Yes"), _("No"), NULL)==WAPRDefault) {
buffer, _("Yes"), _("No"), NULL)==WAPRDefault) {
if (!wapp->main_window_desc->flags.destroyed)
wClientKill(wapp->main_window_desc);
}
wrelease(wapp->main_window_desc);
free(buffer);
WCHANGE_STATE(WSTATE_NORMAL);
}
@@ -666,7 +681,7 @@ appIconMouseDown(WObjDescriptor *desc, XEvent *event)
int clickButton = event->xbutton.button;
Pixmap ghost = None;
if (aicon->editing)
if (aicon->editing || WCHECK_STATE(WSTATE_MODAL))
return;
if (IsDoubleClick(scr, event)) {

View File

@@ -288,6 +288,7 @@ void
wClientKill(WWindow *wwin)
{
XKillClient(dpy, wwin->client_win);
XFlush(dpy);
}
@@ -743,8 +744,8 @@ GetColormapWindows(WWindow *wwin)
wwin->cmap_windows = NULL;
wwin->cmap_window_no = 0;
if (XGetWMColormapWindows(dpy, wwin->client_win, &(wwin->cmap_windows),
&(wwin->cmap_window_no))==0
if (!XGetWMColormapWindows(dpy, wwin->client_win, &(wwin->cmap_windows),
&(wwin->cmap_window_no))
|| !wwin->cmap_windows) {
wwin->cmap_window_no = 0;
wwin->cmap_windows = NULL;

View File

@@ -41,7 +41,7 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
int done = 0;
Window xwin = None;
if(wwin) {
if (wwin) {
xwin = wwin->client_win;
} else {
xwin = scr->root_win;
@@ -55,7 +55,7 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
}
/* install colormap for all windows of the client */
if (wwin && wwin->cmap_window_no > 0) {
if (wwin && wwin->cmap_window_no > 0 && wwin->cmap_windows) {
for (i = wwin->cmap_window_no - 1; i >= 0; i--) {
Window w;

View File

@@ -51,7 +51,7 @@
/* #undef X_DISPLAY_MISSING */
/* define to the path to cpp */
#define CPP_PATH "/lib/cpp"
#define CPP_PATH "/usr/bin/cpp"
/* define if you want GNOME stuff support */
/* #undef GNOME_STUFF */
@@ -174,5 +174,5 @@
#define PACKAGE "WindowMaker"
/* Version number of package */
#define VERSION "0.51.1"
#define VERSION "0.51.2"

View File

@@ -70,7 +70,7 @@ wMessageDialog(WScreen *scr, char *title, char *message,
parent = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 400, 180, 0, 0, 0);
XReparentWindow(dpy, WMWidgetXID(panel->win), parent, 0, 0);
wwin = wManageInternalWindow(scr, parent, None, NULL,
(scr->scr_width - 400)/2,
(scr->scr_height - 180)/2, 400, 180);
@@ -452,7 +452,7 @@ wIconChooserDialog(WScreen *scr, char **file, char *instance, char *class)
panel->fileField = WMCreateTextField(panel->win);
WMResizeWidget(panel->fileField, 345, 20);
WMMoveWidget(panel->fileField, 95, 210);
WMSetTextFieldEnabled(panel->fileField, False);
WMSetTextFieldEditable(panel->fileField, False);
panel->okButton = WMCreateCommandButton(panel->win);
WMResizeWidget(panel->okButton, 80, 26);
@@ -614,10 +614,10 @@ destroyInfoPanel(WCoreWindow *foo, void *data, XEvent *event)
#endif /* SILLYNESS */
WMUnmapWidget(thePanel);
WMDestroyWidget(thePanel->win);
wUnmanageWindow(thePanel->wwin, False, False);
WMDestroyWidget(thePanel->win);
free(thePanel);
thePanel = NULL;

View File

@@ -80,7 +80,6 @@ extern void DestroyDockAppSettingsPanel();
extern void ShowDockAppSettingsPanel(WAppIcon *aicon);
extern Cursor wCursor[WCUR_LAST];
extern WPreferences wPreferences;
@@ -243,14 +242,21 @@ killCallback(WMenu *menu, WMenuEntry *entry)
WAppIconAppList *tapplist;
extern Atom _XA_WM_DELETE_WINDOW;
#else
char *buffer;
#endif
if (!WCHECK_STATE(WSTATE_NORMAL))
return;
assert(entry->clientdata!=NULL);
icon = (WAppIcon*)entry->clientdata;
icon->editing = 1;
WCHANGE_STATE(WSTATE_MODAL);
#ifdef REDUCE_APPICONS
/* Send a delete message to the main window of each application
* bound to this docked appicon. - cls
@@ -268,10 +274,14 @@ killCallback(WMenu *menu, WMenuEntry *entry)
tapplist = tapplist->next;
}
#else
buffer = wstrappend(icon->wm_class,
_(" will be forcibly closed.\n"
"Any unsaved changes will be lost.\n"
"Please confirm."));
if (wPreferences.dont_confirm_kill
|| wMessageDialog(menu->frame->screen_ptr, _("Kill Application"),
_("This will kill the application.\nAny unsaved changes will be lost.\nPlease confirm."),
_("Yes"), _("No"), NULL)==WAPRDefault) {
buffer, _("Yes"), _("No"), NULL)==WAPRDefault) {
if (icon->icon && icon->icon->owner) {
wClientKill(icon->icon->owner);
}
@@ -279,7 +289,8 @@ killCallback(WMenu *menu, WMenuEntry *entry)
#endif /* !REDUCE_APPICONS */
icon->editing = 0;
}
WCHANGE_STATE(WSTATE_NORMAL);}
static LinkedList*
@@ -3766,7 +3777,7 @@ iconMouseDown(WObjDescriptor *desc, XEvent *event)
WDock *dock = aicon->dock;
WScreen *scr = aicon->icon->core->screen_ptr;
if (aicon->editing)
if (aicon->editing || WCHECK_STATE(WSTATE_MODAL))
return;
scr->last_dock = dock;

View File

@@ -95,7 +95,6 @@ extern int wShapeEventBase;
#endif
/* special flags */
extern char WProgramState;
extern char WDelayedActionSet;
@@ -205,8 +204,8 @@ DispatchEvent(XEvent *event)
if (deathHandler)
handleDeadProcess(NULL);
if (WProgramState==WSTATE_NEED_EXIT) {
WProgramState = WSTATE_EXITING;
if (WCHECK_STATE(WSTATE_NEED_EXIT)) {
WCHANGE_STATE(WSTATE_EXITING);
/* received SIGTERM */
/*
* WMHandleEvent() can't be called from anything
@@ -215,8 +214,8 @@ DispatchEvent(XEvent *event)
*/
Shutdown(WSExitMode);
} else if (WProgramState == WSTATE_NEED_RESTART) {
WProgramState = WSTATE_RESTARTING;
} else if (WCHECK_STATE(WSTATE_NEED_RESTART)) {
WCHANGE_STATE(WSTATE_RESTARTING);
Shutdown(WSRestartPreparationMode);
/* received SIGHUP */
@@ -354,7 +353,7 @@ void
NotifyDeadProcess(pid_t pid, unsigned char status)
{
if (deadProcessPtr>=MAX_DEAD_PROCESSES-1) {
wwarning(_("stack overflow: too many dead processes"));
wwarning("stack overflow: too many dead processes");
return;
}
/* stack the process to be handled later,
@@ -502,45 +501,29 @@ handleMapRequest(XEvent *ev)
}
if (wwin) {
int state;
wClientSetState(wwin, NormalState, None);
if (wwin->flags.maximized) {
wMaximizeWindow(wwin, wwin->flags.maximized);
}
if (wwin->flags.shaded) {
wwin->flags.shaded = 0;
wwin->flags.skip_next_animation = 1;
wShadeWindow(wwin);
}
if (wwin->flags.miniaturized) {
wwin->flags.miniaturized = 0;
wwin->flags.skip_next_animation = 1;
wIconifyWindow(wwin);
}
if (wwin->flags.hidden) {
WApplication *wapp = wApplicationOf(wwin->main_window);
if (wwin->wm_hints && (wwin->wm_hints->flags & StateHint))
state = wwin->wm_hints->initial_state;
else
state = NormalState;
if (state == IconicState)
wwin->flags.miniaturized = 1;
if (state == WithdrawnState) {
wwin->flags.mapped = 0;
wClientSetState(wwin, WithdrawnState, None);
wUnmanageWindow(wwin, True, False);
} else {
wClientSetState(wwin, NormalState, None);
if (wwin->flags.maximized) {
wMaximizeWindow(wwin, wwin->flags.maximized);
wwin->flags.hidden = 0;
wwin->flags.skip_next_animation = 1;
if (wapp) {
wHideApplication(wapp);
}
if (wwin->flags.shaded) {
wwin->flags.shaded = 0;
wwin->flags.skip_next_animation = 1;
wShadeWindow(wwin);
}
if (wwin->flags.miniaturized) {
wwin->flags.miniaturized = 0;
wwin->flags.skip_next_animation = 1;
wIconifyWindow(wwin);
}
if (wwin->flags.hidden) {
WApplication *wapp = wApplicationOf(wwin->main_window);
wwin->flags.hidden = 0;
wwin->flags.skip_next_animation = 1;
if (wapp) {
wHideApplication(wapp);
}
}
}
}
}
}
@@ -1701,6 +1684,7 @@ handleMotionNotify(XEvent *event)
{
WMenu *menu;
WScreen *scr = wScreenForRootWindow(event->xmotion.root);
WWindow *wwin;
if (wPreferences.scrollable_menus) {
if (event->xmotion.x_root <= 1 ||
@@ -1717,6 +1701,53 @@ handleMotionNotify(XEvent *event)
wMenuScroll(menu, event);
}
}
#if 0
if (event->xmotion.subwindow == None)
return;
if (scr->scrolledFMaximize != None) {
WWindow *twin;
twin = wWindowFor(scr->scrolledFMaximize);
if (twin && twin->frame_y ==) {
}
scr->scrolledFMaximize = NULL;
} else {
/* scroll full maximized window */
if (event->xmotion.y_root < 1
|| event->xmotion.y_root > scr->scr_height - 1) {
wwin = wWindowFor(event->xmotion.subwindow);
if (wwin && (wwin->flags.maximized & MAX_VERTICAL)
&& WFLAGP(wwin, full_maximize)
&& event->xmotion.x_root >= wwin->frame_x
&& event->xmotion.x_root <= wwin->frame_x + wwin->frame->core->width) {
if (!WFLAGP(wwin, no_titlebar)
&& wwin->frame_y <= - wwin->frame->top_width) {
wWindowMove(wwin, wwin->frame_x, 0);
wwin->flags.dragged_while_fmaximized = 0;
} else if (!WFLAGP(wwin, no_resizebar)
&& wwin->frame_y + wwin->frame->core->height >=
scr->scr_height + wwin->frame->bottom_width) {
int y = scr->scr_height + wwin->frame->bottom_width;
y = scr->scr_height - wwin->frame_y - wwin->frame->core->height;
wWindowMove(wwin, wwin->frame_x, y);
wwin->flags.dragged_while_fmaximized = 0;
}
}
}
#endif
}

View File

@@ -417,7 +417,6 @@ getnameforicon(WWindow *wwin)
len = strlen(prefix)+64+strlen(suffix);
path = wmalloc(len+1);
sprintf(path, "%s/.AppInfo", prefix);
free(prefix);
if (access(path, F_OK)!=0) {
if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR)) {
@@ -811,7 +810,9 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
int grabbed=0;
int clickButton=event->xbutton.button;
if (WCHECK_STATE(WSTATE_MODAL))
return;
if (IsDoubleClick(icon->core->screen_ptr, event)) {
miniwindowDblClick(desc, event);
return;

View File

@@ -1559,6 +1559,7 @@ wKWMSendEventMessage(WWindow *wwin, WKWMEventMessage message)
if (wwin && (wwin->flags.internal_window
|| wwin->flags.kwm_hidden_for_modules
|| !wwin->flags.kwm_managed
|| WFLAGP(wwin, skip_window_list)))
return;

View File

@@ -581,8 +581,8 @@ typedef struct {
#define WTOP(w) (w)->frame_y
#define WLEFT(w) (w)->frame_x
#define WRIGHT(w) ((w)->frame_x + (int)(w)->frame->core->width)
#define WBOTTOM(w) ((w)->frame_y + (int)(w)->frame->core->height)
#define WRIGHT(w) ((w)->frame_x + (int)(w)->frame->core->width + FRAME_BORDER_WIDTH)
#define WBOTTOM(w) ((w)->frame_y + (int)(w)->frame->core->height + FRAME_BORDER_WIDTH)
static int
compareWTop(const void *a, const void *b)
@@ -749,6 +749,8 @@ updateMoveData(WWindow *wwin, MoveData *data)
tmp = scr->focused_window;
while (tmp) {
if (tmp != wwin && scr->current_workspace == tmp->frame->workspace
&& !tmp->flags.miniaturized
&& !tmp->flags.hidden
&& !tmp->flags.obscured) {
data->topList[data->count] = tmp;
data->leftList[data->count] = tmp;
@@ -823,15 +825,14 @@ initMoveData(WWindow *wwin, MoveData *data)
tmp != NULL;
tmp = tmp->prev, i++);
if (i <= 1)
return;
if (i > 1) {
data->topList = wmalloc(sizeof(WWindow*) * i);
data->leftList = wmalloc(sizeof(WWindow*) * i);
data->rightList = wmalloc(sizeof(WWindow*) * i);
data->bottomList = wmalloc(sizeof(WWindow*) * i);
data->topList = wmalloc(sizeof(WWindow*) * i);
data->leftList = wmalloc(sizeof(WWindow*) * i);
data->rightList = wmalloc(sizeof(WWindow*) * i);
data->bottomList = wmalloc(sizeof(WWindow*) * i);
updateMoveData(wwin, data);
updateMoveData(wwin, data);
}
data->realX = wwin->frame_x;
data->realY = wwin->frame_y;
@@ -1075,28 +1076,34 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance,
drawFrames(wwin, scr->selected_windows,
data->realX - wwin->frame_x,
data->realY - wwin->frame_y);
}
if (!scr->selected_windows
&& wPreferences.move_display == WDIS_FRAME_CENTER) {
moveGeometryDisplayCentered(scr, newX + data->winWidth/2,
newY + data->winHeight/2);
}
if (!opaqueMove) {
/* draw frames */
drawFrames(wwin, scr->selected_windows,
newX - wwin->frame_x,
newY - wwin->frame_y);
}
}
if (!scr->selected_windows) {
if (!scr->selected_windows) {
if (wPreferences.move_display == WDIS_NEW) {
if (wPreferences.move_display == WDIS_NEW) {
showPosition(wwin, data->realX, data->realY);
} else if (wPreferences.move_display == WDIS_FRAME_CENTER) {
moveGeometryDisplayCentered(scr, newX + data->winWidth/2,
newY + data->winHeight/2);
showPosition(wwin, data->realX, data->realY);
}
showPosition(wwin, newX, newY);
}
showPosition(wwin, newX, newY);
}
/* recalc relative window position */
if (doResistance && (data->realX != newX || data->realY != newY)) {
updateResistance(wwin, data, newX, newY);
@@ -1591,7 +1598,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
freeMoveData(&moveData);
return started;
default:
if (started && !opaqueMove) {
drawFrames(wwin, scr->selected_windows,

View File

@@ -291,6 +291,25 @@ PropWriteGNUstepWMAttr(Window window, GNUstepWMAttributes *attr)
}
int
PropGetWindowState(Window window)
{
long *data;
long state;
data = (long*)PropGetCheckProperty(window, _XA_WM_STATE, _XA_WM_STATE,
32, 1, NULL);
if (!data)
return -1;
state = *data;
XFree(data);
return state;
}
void
PropCleanUp(Window root)
{

View File

@@ -28,6 +28,7 @@
unsigned char* PropGetCheckProperty(Window window, Atom hint, Atom type,
int format, int count, int *retCount);
int PropGetWindowState(Window window);
int PropGetNormalHints(Window window, XSizeHints *size_hints, int *pre_iccm);
void PropGetProtocols(Window window, WProtocols *prots);

View File

@@ -501,7 +501,7 @@ createInternalWindows(WScreen *scr)
XSelectInput(dpy, scr->no_focus_win, KeyPressMask|KeyReleaseMask);
XMapWindow(dpy, scr->no_focus_win);
XSetInputFocus (dpy, scr->no_focus_win, RevertToParent, CurrentTime);
XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, CurrentTime);
/* shadow window for dock buttons */
vmask = CWBorderPixel|CWBackPixmap|CWBackPixel|CWCursor|CWSaveUnder|CWOverrideRedirect;

View File

@@ -265,7 +265,11 @@ typedef struct _WScreen {
WMHandlerID *autoRaiseTimer;
Window autoRaiseWindow; /* window that is scheduled to be
* raised */
Window scrolledFMaximize; /* full maximized window which was
scrolled down for titlebar access */
/* for window shortcuts */
struct WWindow *shortcutWindow[MAX_WINDOW_SHORTCUTS];

View File

@@ -870,8 +870,6 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data)
statefile = malloc(strlen(prefix)+64);
if (!statefile) {
if (gsPrefix)
free(prefix);
wwarning(_("out of memory while saving session state"));
goto fail;
}
@@ -887,9 +885,6 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data)
i++;
} while (access(F_OK, statefile)!=-1);
if (gsPrefix)
free(prefix);
/* save the states of all windows we're managing */
state = PLMakeArrayFromElements(NULL, NULL);

View File

@@ -187,9 +187,12 @@ RestoreDesktop(WScreen *scr)
next = core->stacking->above;
if (core->descriptor.parent_type==WCLASS_WINDOW) {
Window window;
wwin = core->descriptor.parent;
wwin->flags.mapped=1;
window = wwin->client_win;
wUnmanageWindow(wwin, !wwin->flags.internal_window, False);
XMapWindow(dpy, window);
}
core = next;
}

View File

@@ -54,6 +54,7 @@
#include "framewin.h"
#include "session.h"
#include "defaults.h"
#include "properties.h"
#include "xutil.h"
@@ -139,7 +140,6 @@ extern Atom _XDE_URLTYPE;
extern Cursor wCursor[WCUR_LAST];
/* special flags */
extern char WProgramState;
extern char WDelayedActionSet;
/***** Local *****/
@@ -261,7 +261,7 @@ handleSig(int sig)
wwarning(_("got signal %i - restarting\n"), sig);
#endif
WProgramState = WSTATE_NEED_RESTART;
WCHANGE_STATE(WSTATE_NEED_RESTART);
/* setup idle handler, so that this will be handled when
* the select() is returned becaused of the signal, even if
@@ -278,7 +278,7 @@ handleSig(int sig)
wwarning(_("got signal %i - exiting...\n"), sig);
#endif
WProgramState = WSTATE_NEED_EXIT;
WCHANGE_STATE(WSTATE_NEED_EXIT);
if (!WDelayedActionSet) {
WDelayedActionSet = 1;
@@ -864,27 +864,6 @@ StartUp(Bool defaultScreenOnly)
static int
getState(Window window)
{
Atom type;
int form;
unsigned long nitems, bytes_rem;
unsigned char *data;
long ret;
if (XGetWindowProperty(dpy, window, _XA_WM_STATE, 0, 3, False,
_XA_WM_STATE, &type,&form,&nitems,&bytes_rem,
&data)==Success) {
if (data != NULL) {
ret = *(long*)data;
free(data);
return ret;
}
}
return -1;
}
static Bool
windowInList(Window window, Window *list, int count)
@@ -913,12 +892,9 @@ manageAllWindows(WScreen *scr)
Window root, parent;
Window *children;
unsigned int nchildren;
XWindowAttributes wattribs;
unsigned int i, j;
int state;
WWindow *wwin;
XWMHints *wmhints;
XGrabServer(dpy);
XQueryTree(dpy, scr->root_win, &root, &parent, &children, &nchildren);
@@ -926,8 +902,10 @@ manageAllWindows(WScreen *scr)
/* first remove all icon windows */
for (i = 0; i < nchildren; i++) {
XWMHints *wmhints;
if (children[i]==None)
continue;
continue;
wmhints = XGetWMHints(dpy, children[i]);
if (wmhints && (wmhints->flags & IconWindowHint)) {
@@ -944,61 +922,34 @@ manageAllWindows(WScreen *scr)
XFree(wmhints);
}
}
/* map all windows without OverrideRedirect */
for (i = 0; i < nchildren; i++) {
if (children[i] == None)
continue;
#ifdef KWM_HINTS
wKWMCheckModule(scr, children[i]);
#endif
XGetWindowAttributes(dpy, children[i], &wattribs);
state = getState(children[i]);
if (!wattribs.override_redirect
&& (state>=0 || wattribs.map_state!=IsUnmapped)) {
if (state==WithdrawnState) {
/* move the window far away so that it doesn't flash */
XMoveWindow(dpy, children[i], scr->scr_width+10,
scr->scr_height+10);
wwin = wManageWindow(scr, children[i]);
if (wwin) {
/* apply states got from WSavedState */
/* shaded + minimized is not restored correctly */
if (wwin->flags.shaded) {
wwin->flags.shaded = 0;
wShadeWindow(wwin);
}
wwin = wManageWindow(scr, children[i]);
if (wwin) {
if (state == WithdrawnState) {
wwin->flags.mapped = 0;
wClientSetState(wwin, WithdrawnState, None);
XSelectInput(dpy, wwin->client_win, NoEventMask);
XRemoveFromSaveSet(dpy, wwin->client_win);
wUnmanageWindow(wwin, True, False);
} else {
/* apply states got from WSavedState */
/* shaded + minimized is not restored correctly */
if (wwin->flags.shaded) {
wwin->flags.shaded = 0;
wShadeWindow(wwin);
}
if (wwin->wm_hints &&
(wwin->wm_hints->flags & StateHint) && state < 0)
state = wwin->wm_hints->initial_state;
if (wwin->flags.miniaturized
&& (wwin->transient_for == None
|| wwin->transient_for == scr->root_win
|| !windowInList(wwin->transient_for, children,
nchildren))) {
if ((state == IconicState || wwin->flags.miniaturized)
&& (wwin->transient_for == None
|| wwin->transient_for == wwin->client_win
|| !windowInList(wwin->transient_for,
children, nchildren))) {
wwin->flags.miniaturized = 0;
wIconifyWindow(wwin);
} else {
wClientSetState(wwin, NormalState, None);
}
}
}
if (state == WithdrawnState) {
/* move the window back to it's old position */
XMoveWindow(dpy, children[i], wattribs.x, wattribs.y);
wwin->flags.skip_next_animation = 1;
wwin->flags.miniaturized = 0;
wIconifyWindow(wwin);
} else {
wClientSetState(wwin, NormalState, None);
}
}
}

View File

@@ -57,7 +57,7 @@
*/
#define USECPP
/* #define CPP_PATH /lib/cpp */
/* #define CPP_PATH /usr/bin/cpp */
/*
* support for OffiX DND drag and drop in the Dock

View File

@@ -82,6 +82,7 @@ static proplist_t AStartMaximized;
static proplist_t AStartHidden; /* app */
static proplist_t ADontSaveSession; /* app */
static proplist_t AEmulateAppIcon;
static proplist_t AFullMaximize;
static proplist_t AStartWorkspace;
@@ -117,6 +118,7 @@ init_wdefaults(WScreen *scr)
AStartMaximized = PLMakeString("StartMaximized");
ADontSaveSession = PLMakeString("DontSaveSession");
AEmulateAppIcon = PLMakeString("EmulateAppIcon");
AFullMaximize = PLMakeString("FullMaximize");
AStartWorkspace = PLMakeString("StartWorkspace");
@@ -299,6 +301,9 @@ wDefaultFillAttributes(WScreen *scr, char *instance, char *class,
value = get_value(dw, dc, dn, da, AEmulateAppIcon, No, useGlobalDefault);
APPLY_VAL(value, emulate_appicon, AEmulateAppIcon);
value = get_value(dw, dc, dn, da, AFullMaximize, No, useGlobalDefault);
APPLY_VAL(value, emulate_appicon, AFullMaximize);
/* clean up */
PLSetStringCmpHook(StringCompareHook);
}

View File

@@ -107,8 +107,7 @@ static FocusMode getFocusMode(WWindow *wwin);
static int getSavedState(Window window, WSavedState **state);
static void setupGNUstepHints(WWindow *wwin,
GNUstepWMAttributes *gs_hints);
static void setupGNUstepHints(WWindow *wwin, GNUstepWMAttributes *gs_hints);
/* event handlers */
@@ -226,39 +225,38 @@ static void
setupGNUstepHints(WWindow *wwin, GNUstepWMAttributes *gs_hints)
{
if (gs_hints->flags & GSWindowStyleAttr) {
WSETUFLAG(wwin, no_titlebar,
((gs_hints->window_style & WMTitledWindowMask)?0:1));
WSETUFLAG(wwin, no_close_button,
((gs_hints->window_style & WMClosableWindowMask)?0:1));
wwin->client_flags.no_titlebar =
((gs_hints->window_style & WMTitledWindowMask)?0:1);
WSETUFLAG(wwin, no_closable,
((gs_hints->window_style & WMClosableWindowMask)?0:1));
wwin->client_flags.no_close_button =
((gs_hints->window_style & WMClosableWindowMask)?0:1);
WSETUFLAG(wwin, no_miniaturize_button,
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1));
wwin->client_flags.no_closable =
((gs_hints->window_style & WMClosableWindowMask)?0:1);
WSETUFLAG(wwin, no_miniaturizable,
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1));
wwin->client_flags.no_miniaturize_button =
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1);
WSETUFLAG(wwin, no_resizebar,
((gs_hints->window_style & WMResizableWindowMask)?0:1));
wwin->client_flags.no_miniaturizable =
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1);
WSETUFLAG(wwin, no_resizable,
((gs_hints->window_style & WMResizableWindowMask)?0:1));
wwin->client_flags.no_resizebar =
((gs_hints->window_style & WMResizableWindowMask)?0:1);
wwin->client_flags.no_resizable =
((gs_hints->window_style & WMResizableWindowMask)?0:1);
} else {
/* setup the defaults */
WSETUFLAG(wwin, no_titlebar, 0);
WSETUFLAG(wwin, no_closable, 0);
WSETUFLAG(wwin, no_miniaturizable, 0);
WSETUFLAG(wwin, no_resizable, 0);
WSETUFLAG(wwin, no_close_button, 0);
WSETUFLAG(wwin, no_miniaturize_button, 0);
WSETUFLAG(wwin, no_resizebar, 0);
wwin->client_flags.no_titlebar = 0;
wwin->client_flags.no_closable = 0;
wwin->client_flags.no_miniaturizable = 0;
wwin->client_flags.no_resizable = 0;
wwin->client_flags.no_close_button = 0;
wwin->client_flags.no_miniaturize_button = 0;
wwin->client_flags.no_resizebar = 0;
}
if (gs_hints->extra_flags & GSNoApplicationIconFlag) {
WSETUFLAG(wwin, no_appicon, 1);
wwin->client_flags.no_appicon = 1;
}
}
@@ -425,7 +423,7 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
Bool
wWindowCanReceiveFocus(WWindow *wwin)
{
if (!wwin->flags.mapped && (!wwin->flags.shaded || wwin->flags.hidden))
if (!wwin->flags.mapped && !wwin->flags.shaded)
return False;
if (WFLAGP(wwin, no_focusable) || wwin->flags.miniaturized)
return False;
@@ -469,6 +467,9 @@ wWindowObscuresWindow(WWindow *wwin, WWindow *obscured)
* the window decoration attributes and others. User preferences
* for the window are used if available, to configure window
* decorations and some behaviour.
* If in startup, windows that are override redirect,
* unmapped and never were managed and are Withdrawn are not
* managed.
*
* Returns:
* the new window descriptor
@@ -494,12 +495,14 @@ wManageWindow(WScreen *scr, Window window)
WWindowState *win_state;
WWindow *transientOwner = NULL;
int window_level;
int wm_state;
int foo;
int workspace = -1;
char *title;
Bool withdraw = False;
/* mutex. */
XGrabServer(dpy);
// XGrabServer(dpy);
XSync(dpy, False);
/* make sure the window is still there */
if (!XGetWindowAttributes(dpy, window, &wattribs)) {
@@ -507,6 +510,20 @@ wManageWindow(WScreen *scr, Window window)
return NULL;
}
/* if it's an override-redirect, ignore it */
if (wattribs.override_redirect) {
XUngrabServer(dpy);
return NULL;
}
wm_state = PropGetWindowState(window);
/* if it's startup and the window is unmapped, don't manage it */
if (scr->flags.startup && wm_state < 0 && wattribs.map_state==IsUnmapped) {
XUngrabServer(dpy);
return NULL;
}
if (!wFetchName(dpy, window, &title)) {
title = NULL;
}
@@ -548,7 +565,6 @@ wManageWindow(WScreen *scr, Window window)
*
*--------------------------------------------------
*/
wwin->wm_hints = XGetWMHints(dpy, window);
PropGetWMClass(window, &wwin->wm_class, &wwin->wm_instance);
/* setup descriptor */
@@ -569,24 +585,26 @@ wManageWindow(WScreen *scr, Window window)
if (!PropGetGNUstepWMAttr(window, &wwin->wm_gnustep_attr)) {
wwin->wm_gnustep_attr = NULL;
}
wwin->client_leader = PropGetClientLeader(window);
if (wwin->client_leader!=None)
wwin->main_window = wwin->client_leader;
if (wwin->wm_hints)
XFree(wwin->wm_hints);
wwin->wm_hints = XGetWMHints(dpy, window);
if (wwin->wm_hints) {
if ((wwin->wm_hints->flags&StateHint)
&& (wwin->wm_hints->initial_state == IconicState)) {
wwin->flags.miniaturized = 1;
/* don't do iconify animation */
wwin->flags.skip_next_animation = 1;
if (wwin->wm_hints->flags & StateHint) {
if (wwin->wm_hints->initial_state == IconicState) {
wwin->flags.miniaturized = 1;
} else if (wwin->wm_hints->initial_state == WithdrawnState) {
withdraw = True;
}
}
if (wwin->wm_hints->flags & WindowGroupHint) {
wwin->group_id = wwin->wm_hints->window_group;
/* window_group has priority over CLIENT_LEADER */
@@ -686,19 +704,34 @@ wManageWindow(WScreen *scr, Window window)
wKWMCheckClientInitialState(wwin);
#endif
/* if there is a saved state, restore it */
/* apply previous state if it exists and we're in startup */
if (scr->flags.startup && wm_state >= 0) {
if (wm_state == IconicState) {
wwin->flags.miniaturized = 1;
} else if (wm_state == WithdrawnState) {
withdraw = True;
}
}
/* if there is a saved state (from file), restore it */
win_state = NULL;
if (wwin->main_window!=None/* && wwin->main_window!=window*/) {
win_state = (WWindowState*)wWindowGetSavedState(wwin->main_window);
} else {
win_state = (WWindowState*)wWindowGetSavedState(window);
}
if (win_state && !(wwin->wm_hints && wwin->wm_hints->flags&StateHint &&
wwin->wm_hints->initial_state==WithdrawnState)) {
if (win_state && !withdraw) {
if (win_state->state->hidden>0)
wwin->flags.hidden = win_state->state->hidden;
if (win_state->state->shaded>0 && !WFLAGP(wwin, no_shadeable))
wwin->flags.shaded = win_state->state->shaded;
if (win_state->state->miniaturized>0 &&
!WFLAGP(wwin, no_miniaturizable)) {
wwin->flags.miniaturized = win_state->state->miniaturized;
@@ -718,22 +751,23 @@ wManageWindow(WScreen *scr, Window window)
}
}
/* if we're restarting, restore saved state. This will overwrite previous */
/* if we're restarting, restore saved state (from hints).
* This will overwrite previous */
{
WSavedState *wstate;
if (getSavedState(window, &wstate)) {
wwin->flags.shaded = wstate->shaded;
wwin->flags.hidden = wstate->hidden;
wwin->flags.miniaturized = 0;
wwin->flags.miniaturized = wstate->miniaturized;
workspace = wstate->workspace;
free(wstate);
}
}
/* don't let transients start miniaturized if their owners are not */
if (transientOwner && !transientOwner->flags.miniaturized
&& wwin->flags.miniaturized) {
if (transientOwner && !transientOwner->flags.miniaturized
&& wwin->flags.miniaturized && !withdraw) {
wwin->flags.miniaturized = 0;
if (wwin->wm_hints)
wwin->wm_hints->initial_state = NormalState;
@@ -774,8 +808,7 @@ wManageWindow(WScreen *scr, Window window)
/* do not ask for window placement if the window is
* transient, during startup, if the initial workspace is another one
* or if the window wants to
* start iconic.
* or if the window wants to start iconic.
* If geometry was saved, restore it. */
{
Bool dontBring = False;
@@ -783,9 +816,9 @@ wManageWindow(WScreen *scr, Window window)
if (win_state && win_state->state->use_geometry) {
x = win_state->state->x;
y = win_state->state->y;
} else if (wwin->transient_for==None && !scr->flags.startup &&
workspace==scr->current_workspace
&& !wwin->flags.miniaturized
} else if (wwin->transient_for==None && !scr->flags.startup
&& workspace == scr->current_workspace
&& !wwin->flags.miniaturized
&& !wwin->flags.maximized
&& !(wwin->normal_hints->flags & (USPosition|PPosition))) {
PlaceWindow(wwin, &x, &y, width, height);
@@ -796,14 +829,19 @@ wManageWindow(WScreen *scr, Window window)
if (WFLAGP(wwin, dont_move_off) && dontBring)
wScreenBringInside(scr, &x, &y, width, height);
}
/*
if (wwin->flags.urgent) {
if (!IS_OMNIPRESENT(wwin))
wwin->flags.omnipresent ^= 1;
}
/*
*--------------------------------------------------
*
* Create frame, borders and do reparenting
*
*--------------------------------------------------
*/
foo = WFF_LEFT_BUTTON | WFF_RIGHT_BUTTON;
if (!WFLAGP(wwin, no_titlebar))
foo |= WFF_TITLEBAR;
@@ -941,11 +979,9 @@ wManageWindow(WScreen *scr, Window window)
XLowerWindow(dpy, window);
/* if window is in this workspace and should be mapped, then map it */
if (!wwin->flags.miniaturized
if (!wwin->flags.miniaturized
&& (workspace == scr->current_workspace || IS_OMNIPRESENT(wwin))
&& !wwin->flags.hidden
&& !(wwin->wm_hints && (wwin->wm_hints->flags & StateHint)
&& wwin->wm_hints->initial_state == WithdrawnState)) {
&& !wwin->flags.hidden && !withdraw) {
/* The following "if" is to avoid crashing of clients that expect
* WM_STATE set before they get mapped. Else WM_STATE is set later,
@@ -962,7 +998,7 @@ wManageWindow(WScreen *scr, Window window)
#define _WIDTH(w) (w)->frame->core->width
#define _HEIGHT(w) (w)->frame->core->height
if (!wPreferences.auto_focus && scr->focused_window
&& !scr->flags.startup && !transientOwner
&& !scr->flags.startup && !transientOwner
&& ((wWindowObscuresWindow(wwin, scr->focused_window)
&& (_WIDTH(wwin) > (_WIDTH(scr->focused_window)*5)/3
|| _HEIGHT(wwin) > (_HEIGHT(scr->focused_window)*5)/3)
@@ -1029,7 +1065,6 @@ wManageWindow(WScreen *scr, Window window)
wwin->prev = NULL;
}
#ifdef GNOME_STUFF
wGNOMEUpdateClientStateHint(wwin, True);
#endif
@@ -1039,7 +1074,7 @@ wManageWindow(WScreen *scr, Window window)
#endif
XUngrabServer(dpy);
/*
*--------------------------------------------------
*
@@ -1066,18 +1101,20 @@ wManageWindow(WScreen *scr, Window window)
wGNOMEUpdateClientListHint(scr);
#endif
#ifdef KWM_HINTS
wwin->flags.kwm_managed = 1;
wKWMSendEventMessage(wwin, WKWMAddWindow);
#endif
wColormapInstallForWindow(wwin->screen_ptr, scr->cmap_window);
wColormapInstallForWindow(scr, scr->cmap_window);
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_ADD);
UpdateSwitchMenu(scr, wwin, ACTION_ADD);
#ifdef OLWM_HINTS
if (wwin->client_flags.olwm_warp_to_pin && wwin->frame->titlebar != NULL
&& !WFLAGP(wwin, no_close_button)) {
&& !WFLAGP(wwin, no_close_button) && !withdraw) {
XWarpPointer(dpy, None, None, 0, 0, 0, 0,
XWarpPointer(dpy, None, None, 0, 0, 0, 0,
wwin->frame_x + width - wwin->frame->titlebar->height * 2,
wwin->frame_y);
}
@@ -1085,13 +1122,24 @@ wManageWindow(WScreen *scr, Window window)
/*
*--------------------------------------------------
*
* Cleanup temporary stuff
*
*--------------------------------------------------
*/
if (win_state)
wWindowDeleteSavedState(win_state);
/* If the window must be withdrawed, then do it now.
* Must do some optimization, 'though */
if (withdraw) {
wwin->flags.mapped = 0;
wClientSetState(wwin, WithdrawnState, None);
wUnmanageWindow(wwin, True, False);
wwin = NULL;
}
return wwin;
}
@@ -1265,7 +1313,7 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
WWindow *pwin = wwin->inspector->frame; /* the inspector window */
(*pwin->frame->on_click_right)(NULL, pwin, NULL);
}
/* Close window menu if it's open for this window */
if (wwin->flags.menu_open_for_me) {
CloseWindowMenu(scr);
@@ -1276,6 +1324,9 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
XRemoveFromSaveSet(dpy, wwin->client_win);
XSelectInput(dpy, wwin->client_win, NoEventMask);
XUngrabButton(dpy, AnyButton, AnyModifier, wwin->client_win);
XUngrabKey(dpy, AnyKey, AnyModifier, wwin->client_win);
}
XUnmapWindow(dpy, frame->window);
@@ -2010,6 +2061,7 @@ wWindowSaveState(WWindow *wwin)
memset(data, 0, sizeof(CARD32)*9);
data[0] = wwin->frame->workspace;
data[1] = wwin->flags.miniaturized;
data[2] = wwin->flags.shaded;
data[3] = wwin->flags.hidden;
@@ -2608,7 +2660,8 @@ titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
XUngrabPointer(dpy, CurrentTime);
} else if (event->xbutton.button == Button3 && event->xbutton.state==0
&& !wwin->flags.internal_window) {
&& !wwin->flags.internal_window
&& !WCHECK_STATE(WSTATE_MODAL)) {
WObjDescriptor *desc;
if (event->xbutton.window != wwin->frame->titlebar->window

View File

@@ -127,6 +127,8 @@ typedef struct {
unsigned int start_maximized:1;
unsigned int dont_save_session:1; /* do not save app's state in session */
unsigned int full_maximize:1;
/*
* emulate_app_icon must be automatically disabled for apps that can
* generate their own appicons and for apps that have no_appicon=1
@@ -268,8 +270,11 @@ typedef struct WWindow {
unsigned int waiting_save_ack:1; /* waiting for SAVE_YOURSELF ack */
unsigned int obscured:1; /* window is obscured */
unsigned int dragged_while_fmaximized;
#ifdef KWM_HINTS
unsigned int kwm_hidden_for_modules:1;
unsigned int kwm_managed:1;
#endif
#ifdef OLWM_HINTS
unsigned int olwm_push_pin_out:1;/* emulate pushpin behaviour */

View File

@@ -72,6 +72,7 @@ static proplist_t AStartMiniaturized;
static proplist_t AStartMaximized;
static proplist_t ADontSaveSession;
static proplist_t AEmulateAppIcon;
static proplist_t AFullMaximize;
static proplist_t AStartWorkspace;
@@ -119,6 +120,7 @@ make_keys()
AStartHidden = PLMakeString("StartHidden");
ADontSaveSession = PLMakeString("DontSaveSession");
AEmulateAppIcon = PLMakeString("EmulateAppIcon");
AFullMaximize = PLMakeString("FullMaximize");
AStartWorkspace = PLMakeString("StartWorkspace");
@@ -532,6 +534,9 @@ saveSettings(WMButton *button, InspectorPanel *panel)
value = (WMGetButtonSelected(panel->moreChk[6])!=0) ? Yes : No;
insertAttribute(dict, winDic, AEmulateAppIcon, value, &different, flags);
value = (WMGetButtonSelected(panel->moreChk[7])!=0) ? Yes : No;
insertAttribute(dict, winDic, AFullMaximize, value, &different, flags);
/* application wide settings for when */
/* the window is the leader, save the attribute with the others */
if (panel->inspected->main_window == panel->inspected->client_win) {
@@ -547,8 +552,9 @@ saveSettings(WMButton *button, InspectorPanel *panel)
if (different) {
PLInsertDictionaryEntry(dict, key, winDic);
}
PLRelease(key);
PLRelease(winDic);
PLRelease(winDic);
different = 0;
@@ -561,16 +567,16 @@ saveSettings(WMButton *button, InspectorPanel *panel)
wapp = wApplicationOf(panel->inspected->main_window);
if (wapp) {
char *iconFile;
appDic = PLMakeDictionaryFromEntries(NULL, NULL, NULL);
assert(wapp->main_window_desc->wm_instance!=NULL);
assert(wapp->main_window_desc->wm_class!=NULL);
strcat(strcpy(buffer, wapp->main_window_desc->wm_instance), ".");
strcat(buffer, wwin->wm_class);
key = PLMakeString(buffer);
iconFile = wDefaultGetIconFile(wwin->screen_ptr,
wapp->main_window_desc->wm_instance,
wapp->main_window_desc->wm_class,
@@ -709,6 +715,7 @@ applySettings(WMButton *button, InspectorPanel *panel)
WSETUFLAG(wwin, no_focusable, WMGetButtonSelected(panel->moreChk[4]));
WSETUFLAG(wwin, dont_save_session, WMGetButtonSelected(panel->moreChk[5]));
WSETUFLAG(wwin, emulate_appicon, WMGetButtonSelected(panel->moreChk[6]));
WSETUFLAG(wwin, full_maximize, WMGetButtonSelected(panel->moreChk[7]));
WSETUFLAG(wwin, always_user_icon, WMGetButtonSelected(panel->alwChk));
if (WFLAGP(wwin, no_titlebar) && wwin->flags.shaded)
@@ -851,7 +858,7 @@ revertSettings(WMButton *button, InspectorPanel *panel)
}
WMSetButtonSelected(panel->attrChk[i], flag);
}
for (i=0; i < 7; i++) {
for (i=0; i < 8; i++) {
int flag = 0;
switch (i) {
@@ -876,6 +883,9 @@ revertSettings(WMButton *button, InspectorPanel *panel)
case 6:
flag = WFLAGP(wwin, emulate_appicon);
break;
case 7:
flag = WFLAGP(wwin, full_maximize);
break;
}
WMSetButtonSelected(panel->moreChk[i], flag);
}
@@ -949,7 +959,7 @@ textEditedObserver(void *observerData, WMNotification *notification)
if ((long)WMGetNotificationClientData(notification) != WMReturnTextMovement)
return;
if (observerData == panel->fileText) {
if (WMGetNotificationObject(notification) == panel->fileText) {
showIconFor(WMWidgetScreen(panel->win), panel, NULL, NULL,
USE_TEXT_FIELD);
/*
@@ -1106,8 +1116,8 @@ createInspectorForWindow(WWindow *wwin)
/**** attributes ****/
panel->attrFrm = WMCreateFrame(panel->win);
WMSetFrameTitle(panel->attrFrm, _("Attributes"));
WMMoveWidget(panel->attrFrm, 15, 50);
WMResizeWidget(panel->attrFrm, frame_width, 240);
WMMoveWidget(panel->attrFrm, 15, 45);
WMResizeWidget(panel->attrFrm, frame_width, 250);
for (i=0; i < 10; i++) {
char *caption = NULL;
@@ -1166,10 +1176,10 @@ createInspectorForWindow(WWindow *wwin)
/**** more attributes ****/
panel->moreFrm = WMCreateFrame(panel->win);
WMSetFrameTitle(panel->moreFrm, _("Advanced"));
WMMoveWidget(panel->moreFrm, 15, 50);
WMResizeWidget(panel->moreFrm, frame_width, 240);
WMMoveWidget(panel->moreFrm, 15, 45);
WMResizeWidget(panel->moreFrm, frame_width, 250);
for (i=0; i < 7; i++) {
for (i=0; i < 8; i++) {
char *caption = NULL;
int flag = 0;
@@ -1202,6 +1212,10 @@ createInspectorForWindow(WWindow *wwin)
caption = _("Emulate Application Icon");
flag = WFLAGP(wwin, emulate_appicon);
break;
case 7:
caption = _("Full Screen Maximization");
flag = WFLAGP(wwin, full_maximize);
break;
}
panel->moreChk[i] = WMCreateSwitchButton(panel->moreFrm);
WMMoveWidget(panel->moreChk[i], 10, 20*(i+1));
@@ -1212,7 +1226,7 @@ createInspectorForWindow(WWindow *wwin)
panel->moreLbl = WMCreateLabel(panel->moreFrm);
WMResizeWidget(panel->moreLbl, frame_width - (2 * 5), 60);
WMMoveWidget(panel->moreLbl, 5, 160);
WMMoveWidget(panel->moreLbl, 5, 180);
WMSetLabelText(panel->moreLbl,
_("Enable the \"Don't bind...\" options to allow the "
"application to receive all mouse or keyboard events."));

View File

@@ -60,7 +60,7 @@ typedef struct InspectorPanel {
/* 3rd page. more attributes */
WMFrame *moreFrm;
WMButton *moreChk[7];
WMButton *moreChk[8];
WMLabel *moreLbl;