mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
changed geometry display stuff
fixed colormap windows crash bug
This commit is contained in:
@@ -36,6 +36,8 @@ wmaker_SOURCES = \
|
||||
extend_pixmaps.h \
|
||||
framewin.c \
|
||||
framewin.h \
|
||||
geomview.c \
|
||||
geomview.h \
|
||||
gnome.c \
|
||||
gnome.h \
|
||||
funcs.h \
|
||||
|
||||
@@ -102,7 +102,7 @@ bin_PROGRAMS = wmaker
|
||||
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h DI.h DL.h I.h L.h Q.h GDB.h nana.h
|
||||
|
||||
|
||||
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c extend_pixmaps.h framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c plugin.c plugin.h properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
||||
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c extend_pixmaps.h framewin.c framewin.h geomview.c geomview.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c plugin.c plugin.h properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xdnd.h xdnd.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
|
||||
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
@@ -126,12 +126,12 @@ X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
wmaker_OBJECTS = actions.o appicon.o application.o appmenu.o balloon.o \
|
||||
client.o colormap.o defaults.o dialog.o dock.o dockedapp.o event.o \
|
||||
framewin.o gnome.o icon.o kwm.o main.o menu.o misc.o motif.o moveres.o \
|
||||
openlook.o pixmap.o placement.o plugin.o properties.o proplist.o \
|
||||
resources.o rootmenu.o screen.o session.o shutdown.o stacking.o \
|
||||
startup.o superfluous.o switchmenu.o texture.o usermenu.o xdnd.o \
|
||||
xmodifier.o xutil.o wcore.o wdefaults.o window.o winmenu.o winspector.o \
|
||||
workspace.o wmsound.o text.o
|
||||
framewin.o geomview.o gnome.o icon.o kwm.o main.o menu.o misc.o motif.o \
|
||||
moveres.o openlook.o pixmap.o placement.o plugin.o properties.o \
|
||||
proplist.o resources.o rootmenu.o screen.o session.o shutdown.o \
|
||||
stacking.o startup.o superfluous.o switchmenu.o texture.o usermenu.o \
|
||||
xdnd.o xmodifier.o xutil.o wcore.o wdefaults.o window.o winmenu.o \
|
||||
winspector.o workspace.o wmsound.o text.o
|
||||
wmaker_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a \
|
||||
$(top_builddir)/wrlib/libwraster.la
|
||||
wmaker_LDFLAGS =
|
||||
@@ -146,7 +146,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)
|
||||
@@ -155,7 +155,7 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
@@ -296,7 +296,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
||||
@@ -1769,6 +1769,12 @@ wSelectWindow(WWindow *wwin, Bool flag)
|
||||
if (flag) {
|
||||
wwin->flags.selected = 1;
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, scr->white_pixel);
|
||||
|
||||
if (WFLAGP(wwin, no_border)) {
|
||||
XSetWindowBorderWidth(dpy, wwin->frame->core->window,
|
||||
FRAME_BORDER_WIDTH);
|
||||
}
|
||||
|
||||
if (!scr->selected_windows)
|
||||
scr->selected_windows = WMCreateBag(4);
|
||||
WMPutInBag(scr->selected_windows, wwin);
|
||||
@@ -1776,6 +1782,11 @@ wSelectWindow(WWindow *wwin, Bool flag)
|
||||
wwin->flags.selected = 0;
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window,
|
||||
scr->frame_border_pixel);
|
||||
|
||||
if (WFLAGP(wwin, no_border)) {
|
||||
XSetWindowBorderWidth(dpy, wwin->frame->core->window, 0);
|
||||
}
|
||||
|
||||
if (scr->selected_windows) {
|
||||
WMRemoveFromBag(scr->selected_windows, wwin);
|
||||
}
|
||||
|
||||
@@ -749,5 +749,6 @@ GetColormapWindows(WWindow *wwin)
|
||||
wwin->cmap_window_no = 0;
|
||||
wwin->cmap_windows = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "window.h"
|
||||
|
||||
|
||||
|
||||
#include "framewin.h"
|
||||
void
|
||||
wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
|
||||
{
|
||||
@@ -41,6 +41,7 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
|
||||
int done = 0;
|
||||
Window xwin = None;
|
||||
|
||||
|
||||
if (wwin) {
|
||||
xwin = wwin->client_win;
|
||||
} else {
|
||||
@@ -81,6 +82,8 @@ wColormapInstallForWindow(WScreen *scr, WWindow *wwin)
|
||||
}
|
||||
|
||||
if (!done) {
|
||||
attributes.colormap = None;
|
||||
if (xwin != None)
|
||||
XGetWindowAttributes(dpy, xwin, &attributes);
|
||||
if (attributes.colormap == None)
|
||||
attributes.colormap = scr->colormap;
|
||||
|
||||
@@ -130,6 +130,12 @@
|
||||
/* define if you have then inet_aton function */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* define if processor is x86 */
|
||||
#undef ASM_X86
|
||||
|
||||
/* define if processor is x86 with MMX(tm) support */
|
||||
#undef ASM_X86_MMX
|
||||
|
||||
/* Define if you have the atexit function. */
|
||||
#undef HAVE_ATEXIT
|
||||
|
||||
|
||||
@@ -155,7 +155,6 @@ static int setMenuTextFont();
|
||||
static int setIconTitleFont();
|
||||
static int setIconTitleColor();
|
||||
static int setIconTitleBack();
|
||||
static int setDisplayFont();
|
||||
static int setLargeDisplayFont();
|
||||
static int setWTitleColor();
|
||||
static int setFTitleBack();
|
||||
@@ -579,9 +578,6 @@ WDefaultEntry optionList[] = {
|
||||
{"ClipTitleFont", DEF_CLIP_TITLE_FONT, NULL,
|
||||
NULL, getFont, setClipTitleFont
|
||||
},
|
||||
{"DisplayFont", DEF_INFO_TEXT_FONT, NULL,
|
||||
NULL, getFont, setDisplayFont
|
||||
},
|
||||
{"LargeDisplayFont",DEF_WORKSPACE_NAME_FONT, NULL,
|
||||
NULL, getFont, setLargeDisplayFont
|
||||
},
|
||||
@@ -2592,28 +2588,6 @@ setClipTitleFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
setDisplayFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo)
|
||||
{
|
||||
if (scr->info_text_font) {
|
||||
WMReleaseFont(scr->info_text_font);
|
||||
}
|
||||
|
||||
scr->info_text_font = font;
|
||||
|
||||
/* This test works because the scr structure is initially zeroed out
|
||||
and None = 0. Any other time, the window should be valid. */
|
||||
if (scr->geometry_display != None) {
|
||||
wGetGeometryWindowSize(scr, &scr->geometry_display_width,
|
||||
&scr->geometry_display_height);
|
||||
XResizeWindow(dpy, scr->geometry_display,
|
||||
scr->geometry_display_width, scr->geometry_display_height);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
setLargeDisplayFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo)
|
||||
{
|
||||
@@ -2956,10 +2930,6 @@ setWidgetColor(WScreen *scr, WDefaultEntry *entry, WTexture **texture, void *foo
|
||||
}
|
||||
scr->widget_texture = *(WTexSolid**)texture;
|
||||
|
||||
if (scr->geometry_display != None)
|
||||
XSetWindowBackground(dpy, scr->geometry_display,
|
||||
scr->widget_texture->normal.pixel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -964,7 +964,8 @@ handleLogoPush(XEvent *event, void *data)
|
||||
" .....XmnbN:q&Bo.... ",
|
||||
" ............ "};
|
||||
static char *msgs[] = {
|
||||
"Have a nice day!"
|
||||
"Have a nice day!",
|
||||
"Repent! Focus follow mouse users will burn in the flames of hell!"
|
||||
};
|
||||
|
||||
|
||||
|
||||
25
src/dock.c
25
src/dock.c
@@ -228,8 +228,6 @@ toggleLoweredCallback(WMenu *menu, WMenuEntry *entry)
|
||||
|
||||
toggleLowered(entry->clientdata);
|
||||
|
||||
entry->flags.indicator_on = !((WDock*)entry->clientdata)->lowered;
|
||||
|
||||
wMenuPaint(menu);
|
||||
}
|
||||
|
||||
@@ -1027,7 +1025,11 @@ updateClipOptionsMenu(WMenu *menu, WDock *dock)
|
||||
|
||||
/* keep on top */
|
||||
entry = menu->entries[index];
|
||||
entry->flags.indicator_on = !dock->lowered;
|
||||
if (dock->lowered) {
|
||||
entry->text = _("Keep on Top");
|
||||
} else {
|
||||
entry->text = _("Allow Lowering");
|
||||
}
|
||||
entry->clientdata = dock;
|
||||
|
||||
/* collapsed */
|
||||
@@ -1069,9 +1071,6 @@ makeClipOptionsMenu(WScreen *scr)
|
||||
|
||||
entry = wMenuAddCallback(menu, _("Keep on Top"),
|
||||
toggleLoweredCallback, NULL);
|
||||
entry->flags.indicator = 1;
|
||||
entry->flags.indicator_on = 1;
|
||||
entry->flags.indicator_type = MI_CHECK;
|
||||
|
||||
entry = wMenuAddCallback(menu, _("Collapsed"),
|
||||
toggleCollapsedCallback, NULL);
|
||||
@@ -1115,11 +1114,8 @@ dockMenuCreate(WScreen *scr, int type)
|
||||
|
||||
menu = wMenuCreate(scr, NULL, False);
|
||||
if (type != WM_CLIP) {
|
||||
entry = wMenuAddCallback(menu, _("Keep on top"),
|
||||
entry = wMenuAddCallback(menu, _("Keep on Top"),
|
||||
toggleLoweredCallback, NULL);
|
||||
entry->flags.indicator = 1;
|
||||
entry->flags.indicator_on = 1;
|
||||
entry->flags.indicator_type = MI_CHECK;
|
||||
} else {
|
||||
entry = wMenuAddCallback(menu, _("Clip Options"), NULL, NULL);
|
||||
scr->clip_options = makeClipOptionsMenu(scr);
|
||||
@@ -3357,8 +3353,15 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
if (dock->type == WM_DOCK) {
|
||||
/* keep on top */
|
||||
entry = dock->menu->entries[index];
|
||||
entry->flags.indicator_on = !dock->lowered;
|
||||
|
||||
if (dock->lowered) {
|
||||
entry->text = _("Keep on Top");
|
||||
} else {
|
||||
entry->text = _("Allow Lowering");
|
||||
}
|
||||
entry->clientdata = dock;
|
||||
|
||||
dock->menu->flags.realized = 0;
|
||||
} else {
|
||||
/* clip options */
|
||||
if (scr->clip_options)
|
||||
|
||||
@@ -95,7 +95,8 @@ wFrameWindowCreate(WScreen *scr, int wlevel, int x, int y,
|
||||
#endif
|
||||
|
||||
fwin->core = wCoreCreateTopLevel(scr, x, y, width, height,
|
||||
FRAME_BORDER_WIDTH);
|
||||
(flags & WFF_BORDER)
|
||||
? FRAME_BORDER_WIDTH : 0);
|
||||
if (wPreferences.use_saveunders) {
|
||||
unsigned long vmask;
|
||||
XSetWindowAttributes attribs;
|
||||
@@ -184,7 +185,6 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
if (fwin->language_button) {
|
||||
wCoreConfigure(fwin->language_button, 6 + bsize, (theight-bsize)/2,
|
||||
bsize, bsize);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -322,11 +322,7 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
|
||||
if (flags & WFF_RESIZEBAR) {
|
||||
fwin->bottom_width = RESIZEBAR_HEIGHT;
|
||||
} else {
|
||||
fwin->bottom_width = 0;
|
||||
}
|
||||
|
||||
if (flags & WFF_RESIZEBAR) {
|
||||
if (!fwin->resizebar) {
|
||||
fwin->flags.resizebar = 1;
|
||||
fwin->resizebar = wCoreCreate(fwin->core, 0,
|
||||
@@ -350,6 +346,8 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fwin->bottom_width = 0;
|
||||
|
||||
if (fwin->resizebar) {
|
||||
fwin->bottom_width = 0;
|
||||
wCoreDestroy(fwin->resizebar);
|
||||
@@ -363,6 +361,13 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
height + fwin->top_width + fwin->bottom_width);
|
||||
}
|
||||
|
||||
|
||||
if (flags & WFF_BORDER) {
|
||||
XSetWindowBorderWidth(dpy, fwin->core->window, FRAME_BORDER_WIDTH);
|
||||
} else {
|
||||
XSetWindowBorderWidth(dpy, fwin->core->window, 0);
|
||||
}
|
||||
|
||||
/* setup object descriptors */
|
||||
|
||||
if (fwin->titlebar) {
|
||||
|
||||
@@ -149,10 +149,6 @@ void wHackedGrabButton(unsigned int button, unsigned int modifiers,
|
||||
/* this function is in dock.c */
|
||||
void ParseCommand(char *command, char ***argv, int *argc);
|
||||
|
||||
/* This function is in moveres.c. */
|
||||
void wGetGeometryWindowSize(WScreen *scr, unsigned int *width,
|
||||
unsigned int *height);
|
||||
|
||||
void ExecExitScript();
|
||||
|
||||
/****** I18N Wrapper for XFetchName,XGetIconName ******/
|
||||
|
||||
@@ -164,7 +164,7 @@ wMenuCreate(WScreen *screen, char *title, int main_menu)
|
||||
tmp = (main_menu ? WMMainMenuLevel : WMSubmenuLevel);
|
||||
#endif
|
||||
|
||||
flags = WFF_SINGLE_STATE;
|
||||
flags = WFF_SINGLE_STATE|WFF_BORDER;
|
||||
if (title) {
|
||||
flags |= WFF_TITLEBAR|WFF_RIGHT_BUTTON;
|
||||
menu->flags.titled = 1;
|
||||
@@ -536,7 +536,7 @@ wMenuRealize(WMenu *menu)
|
||||
brother_done = 0;
|
||||
}
|
||||
|
||||
flags = WFF_SINGLE_STATE;
|
||||
flags = WFF_SINGLE_STATE|WFF_BORDER;
|
||||
if (menu->flags.titled)
|
||||
flags |= WFF_TITLEBAR|WFF_RIGHT_BUTTON;
|
||||
|
||||
|
||||
129
src/moveres.c
129
src/moveres.c
@@ -40,6 +40,8 @@
|
||||
#include "actions.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include "geomview.h"
|
||||
|
||||
|
||||
#ifdef KWM_HINTS
|
||||
#include "kwm.h"
|
||||
@@ -67,16 +69,6 @@ extern Atom _XA_WM_PROTOCOLS;
|
||||
|
||||
|
||||
|
||||
void
|
||||
wGetGeometryWindowSize(WScreen *scr, unsigned int *width,
|
||||
unsigned int *height)
|
||||
{
|
||||
*width = WMWidthOfString(scr->info_text_font, "-8888 x -8888", 13);
|
||||
|
||||
*height = (6 * WMFontHeight(scr->info_text_font)) / 4 - 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* checkMouseSamplingRate-
|
||||
@@ -114,20 +106,23 @@ checkMouseSamplingRate(XEvent *ev)
|
||||
static void
|
||||
moveGeometryDisplayCentered(WScreen *scr, int x, int y)
|
||||
{
|
||||
x -= scr->geometry_display_width / 2;
|
||||
y -= scr->geometry_display_height / 2;
|
||||
unsigned int w = WMWidgetWidth(scr->gview);
|
||||
unsigned int h = WMWidgetHeight(scr->gview);
|
||||
|
||||
x -= w / 2;
|
||||
y -= h / 2;
|
||||
|
||||
if (x < 1)
|
||||
x = 1;
|
||||
else if (x > (scr->scr_width - scr->geometry_display_width - 3))
|
||||
x = scr->scr_width - scr->geometry_display_width - 3;
|
||||
else if (x > (scr->scr_width - w - 3))
|
||||
x = scr->scr_width - w - 3;
|
||||
|
||||
if (y < 1)
|
||||
y = 1;
|
||||
else if (y > (scr->scr_height - scr->geometry_display_height - 3))
|
||||
y = scr->scr_height - scr->geometry_display_height - 3;
|
||||
else if (y > (scr->scr_height - h - 3))
|
||||
y = scr->scr_height - h - 3;
|
||||
|
||||
XMoveWindow(dpy, scr->geometry_display, x, y);
|
||||
WMMoveWidget(scr->gview, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,12 +130,9 @@ static void
|
||||
showPosition(WWindow *wwin, int x, int y)
|
||||
{
|
||||
WScreen *scr = wwin->screen_ptr;
|
||||
GC gc = scr->info_text_gc;
|
||||
char num[16];
|
||||
int fw, fh;
|
||||
|
||||
if (wPreferences.move_display == WDIS_NEW) {
|
||||
#if 1
|
||||
#if 0
|
||||
int width = wwin->frame->core->width;
|
||||
int height = wwin->frame->core->height;
|
||||
|
||||
@@ -156,22 +148,7 @@ showPosition(WWindow *wwin, int x, int y)
|
||||
scr->scr_height);
|
||||
#endif
|
||||
} else {
|
||||
XClearArea(dpy, scr->geometry_display, 1, 1,
|
||||
scr->geometry_display_width-2, scr->geometry_display_height-2,
|
||||
False);
|
||||
sprintf(num, "%+i %-+i", x, y);
|
||||
fw = WMWidthOfString(scr->info_text_font, num, strlen(num));
|
||||
|
||||
XSetForeground(dpy, gc, scr->black_pixel);
|
||||
|
||||
fh = WMFontHeight(scr->info_text_font);
|
||||
WMDrawString(scr->wmscreen, scr->geometry_display, gc,
|
||||
scr->info_text_font,
|
||||
(scr->geometry_display_width - 2 - fw) / 2,
|
||||
(scr->geometry_display_height-fh)/2, num, strlen(num));
|
||||
wDrawBevel(scr->geometry_display, scr->geometry_display_width+1,
|
||||
scr->geometry_display_height+1,
|
||||
scr->widget_texture, WREL_RAISED);
|
||||
WSetGeometryViewShownPosition(scr->gview, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +162,7 @@ cyclePositionDisplay(WWindow *wwin, int x, int y, int w, int h)
|
||||
wPreferences.move_display %= NUM_DISPLAYS;
|
||||
|
||||
if (wPreferences.move_display == WDIS_NEW) {
|
||||
XUnmapWindow(dpy, scr->geometry_display);
|
||||
WMUnmapWidget(scr->gview);
|
||||
} else {
|
||||
if (wPreferences.move_display == WDIS_CENTER) {
|
||||
moveGeometryDisplayCentered(scr,
|
||||
@@ -195,7 +172,7 @@ cyclePositionDisplay(WWindow *wwin, int x, int y, int w, int h)
|
||||
} else if (wPreferences.move_display == WDIS_FRAME_CENTER) {
|
||||
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
|
||||
}
|
||||
XMapRaised(dpy, scr->geometry_display);
|
||||
WMMapWidget(scr->gview);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,13 +192,10 @@ mapPositionDisplay(WWindow *wwin, int x, int y, int w, int h)
|
||||
} else if (wPreferences.move_display == WDIS_FRAME_CENTER) {
|
||||
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
|
||||
}
|
||||
XMapRaised(dpy, scr->geometry_display);
|
||||
showPosition(wwin, x, y);
|
||||
WMMapWidget(scr->gview);
|
||||
WSetGeometryViewShownPosition(scr->gview, x, y);
|
||||
}
|
||||
|
||||
#define unmapPositionDisplay(w) \
|
||||
XUnmapWindow(dpy, (w)->screen_ptr->geometry_display);
|
||||
|
||||
|
||||
static void
|
||||
showGeometry(WWindow *wwin, int x1, int y1, int x2, int y2, int direction)
|
||||
@@ -353,25 +327,11 @@ showGeometry(WWindow *wwin, int x1, int y1, int x2, int y2, int direction)
|
||||
WMDrawString(scr->wmscreen, root, gc, scr->info_text_font,
|
||||
mx - fw/2 + 1, y - s - fh/2 + 1, num, strlen(num));
|
||||
} else {
|
||||
XClearArea(dpy, scr->geometry_display, 1, 1,
|
||||
scr->geometry_display_width-2, scr->geometry_display_height-2,
|
||||
False);
|
||||
sprintf(num, "%i x %-i", (x2 - x1 - wwin->normal_hints->base_width)
|
||||
WSetGeometryViewShownSize(scr->gview,
|
||||
(x2 - x1 - wwin->normal_hints->base_width)
|
||||
/ wwin->normal_hints->width_inc,
|
||||
(by - ty - wwin->normal_hints->base_height)
|
||||
/ wwin->normal_hints->height_inc);
|
||||
fw = WMWidthOfString(scr->info_text_font, num, strlen(num));
|
||||
|
||||
XSetForeground(dpy, scr->info_text_gc, scr->black_pixel);
|
||||
|
||||
/* Display the height. */
|
||||
WMDrawString(scr->wmscreen, scr->geometry_display, scr->info_text_gc,
|
||||
scr->info_text_font,
|
||||
(scr->geometry_display_width-fw)/2,
|
||||
(scr->geometry_display_height-fh)/2, num, strlen(num));
|
||||
wDrawBevel(scr->geometry_display, scr->geometry_display_width+1,
|
||||
scr->geometry_display_height+1,
|
||||
scr->widget_texture, WREL_RAISED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +345,7 @@ cycleGeometryDisplay(WWindow *wwin, int x, int y, int w, int h, int dir)
|
||||
wPreferences.size_display %= NUM_DISPLAYS;
|
||||
|
||||
if (wPreferences.size_display == WDIS_NEW) {
|
||||
XUnmapWindow(dpy, scr->geometry_display);
|
||||
WMUnmapWidget(scr->gview);
|
||||
} else {
|
||||
if (wPreferences.size_display == WDIS_CENTER) {
|
||||
moveGeometryDisplayCentered(scr,
|
||||
@@ -395,7 +355,7 @@ cycleGeometryDisplay(WWindow *wwin, int x, int y, int w, int h, int dir)
|
||||
} else if (wPreferences.size_display == WDIS_FRAME_CENTER) {
|
||||
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
|
||||
}
|
||||
XMapRaised(dpy, scr->geometry_display);
|
||||
WMMapWidget(scr->gview);
|
||||
showGeometry(wwin, x, y, x + w, y + h, dir);
|
||||
}
|
||||
}
|
||||
@@ -417,12 +377,10 @@ mapGeometryDisplay(WWindow *wwin, int x, int y, int w, int h)
|
||||
} else if (wPreferences.size_display == WDIS_FRAME_CENTER) {
|
||||
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
|
||||
}
|
||||
XMapRaised(dpy, scr->geometry_display);
|
||||
WMMapWidget(scr->gview);
|
||||
showGeometry(wwin, x, y, x + w, y + h, 0);
|
||||
}
|
||||
|
||||
#define unmapGeometryDisplay(w) \
|
||||
XUnmapWindow(dpy, (w)->screen_ptr->geometry_display);
|
||||
|
||||
|
||||
static void
|
||||
@@ -1450,32 +1408,29 @@ wKeyboardMoveResizeWindow(WWindow *wwin)
|
||||
|
||||
if (wwin->flags.shaded && !scr->selected_windows){
|
||||
moveGeometryDisplayCentered(scr, src_x+off_x + w/2, src_y+off_y + h/2);
|
||||
}
|
||||
else {
|
||||
if(ctrlmode){
|
||||
unmapPositionDisplay(wwin);
|
||||
} else {
|
||||
if (ctrlmode) {
|
||||
WMUnmapWidget(scr->gview);
|
||||
mapGeometryDisplay(wwin, src_x+off_x, src_y+off_y, ww, wh);
|
||||
}
|
||||
else if(!scr->selected_windows){
|
||||
unmapGeometryDisplay(wwin);
|
||||
} else if(!scr->selected_windows) {
|
||||
WMUnmapWidget(scr->gview);
|
||||
mapPositionDisplay(wwin, src_x+off_x, src_y+off_y, ww, wh);
|
||||
}
|
||||
}
|
||||
|
||||
if (wwin->flags.shaded || scr->selected_windows) {
|
||||
if(scr->selected_windows)
|
||||
if (scr->selected_windows)
|
||||
drawFrames(wwin,scr->selected_windows,off_x,off_y);
|
||||
else drawTransparentFrame(wwin, src_x+off_x, src_y+off_y, w, h);
|
||||
}
|
||||
else {
|
||||
else
|
||||
drawTransparentFrame(wwin, src_x+off_x, src_y+off_y, w, h);
|
||||
} else {
|
||||
drawTransparentFrame(wwin, src_x+off_x, src_y+off_y, ww, wh);
|
||||
}
|
||||
|
||||
|
||||
if(ctrlmode){
|
||||
if (ctrlmode) {
|
||||
showGeometry(wwin, src_x+off_x, src_y+off_y, src_x+off_x+ww, src_y+off_y+wh,0);
|
||||
}
|
||||
else if(!scr->selected_windows)
|
||||
} else if(!scr->selected_windows)
|
||||
showPosition(wwin, src_x+off_x, src_y+off_y);
|
||||
/**/
|
||||
|
||||
@@ -1493,12 +1448,12 @@ wKeyboardMoveResizeWindow(WWindow *wwin)
|
||||
drawTransparentFrame(wwin, src_x+off_x, src_y+off_y, ww, wh);
|
||||
}
|
||||
|
||||
if(ctrlmode){
|
||||
if (ctrlmode) {
|
||||
showGeometry(wwin, src_x+off_x, src_y+off_y, src_x+off_x+ww, src_y+off_y+wh,0);
|
||||
unmapGeometryDisplay(wwin);
|
||||
}
|
||||
else
|
||||
unmapPositionDisplay(wwin);
|
||||
WMUnmapWidget(scr->gview);
|
||||
} else
|
||||
WMUnmapWidget(scr->gview);
|
||||
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XUngrabServer(dpy);
|
||||
@@ -1754,7 +1709,7 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
|
||||
|
||||
if (!scr->selected_windows) {
|
||||
/* get rid of the geometry window */
|
||||
unmapPositionDisplay(wwin);
|
||||
WMUnmapWidget(scr->gview);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
@@ -2028,7 +1983,7 @@ wMouseResizeWindow(WWindow *wwin, XEvent *ev)
|
||||
drawTransparentFrame(wwin, fx, fy, fw, fh);
|
||||
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
unmapGeometryDisplay(wwin);
|
||||
WMUnmapWidget(scr->gview);
|
||||
XUngrabServer(dpy);
|
||||
|
||||
if (wwin->client.width != fw)
|
||||
@@ -2258,7 +2213,7 @@ InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
/* get rid of the geometry window */
|
||||
unmapPositionDisplay(wwin);
|
||||
WMUnmapWidget(scr->gview);
|
||||
return;
|
||||
|
||||
default:
|
||||
|
||||
31
src/screen.c
31
src/screen.c
@@ -52,6 +52,7 @@
|
||||
#include "workspace.h"
|
||||
#include "session.h"
|
||||
#include "balloon.h"
|
||||
#include "geomview.h"
|
||||
#ifdef KWM_HINTS
|
||||
# include "kwm.h"
|
||||
#endif
|
||||
@@ -499,29 +500,6 @@ createInternalWindows(WScreen *scr)
|
||||
int vmask;
|
||||
XSetWindowAttributes attribs;
|
||||
|
||||
/* window for displaying geometry information during resizes and moves */
|
||||
vmask = CWBorderPixel|CWBackPixmap|CWBackPixel|CWCursor|CWSaveUnder|CWOverrideRedirect;
|
||||
attribs.border_pixel = scr->black_pixel;
|
||||
attribs.save_under = True;
|
||||
attribs.override_redirect = True;
|
||||
attribs.cursor = wCursor[WCUR_DEFAULT];
|
||||
attribs.background_pixmap = None;
|
||||
if (scr->widget_texture)
|
||||
attribs.background_pixel = scr->widget_texture->normal.pixel;
|
||||
else
|
||||
attribs.background_pixel = scr->light_pixel;
|
||||
vmask |= CWColormap;
|
||||
attribs.colormap = scr->w_colormap;
|
||||
|
||||
wGetGeometryWindowSize(scr, &scr->geometry_display_width,
|
||||
&scr->geometry_display_height);
|
||||
scr->geometry_display =
|
||||
XCreateWindow(dpy, scr->root_win, 1, 1,
|
||||
scr->geometry_display_width,
|
||||
scr->geometry_display_height,
|
||||
1, scr->w_depth, CopyFromParent, scr->w_visual,
|
||||
vmask, &attribs);
|
||||
|
||||
/* InputOnly window to get the focus when no other window can get it */
|
||||
vmask = CWEventMask|CWOverrideRedirect;
|
||||
attribs.event_mask = KeyPressMask|FocusChangeMask;
|
||||
@@ -540,6 +518,7 @@ createInternalWindows(WScreen *scr)
|
||||
attribs.override_redirect = True;
|
||||
attribs.background_pixmap = None;
|
||||
attribs.background_pixel = scr->white_pixel;
|
||||
attribs.cursor = wCursor[WCUR_DEFAULT];
|
||||
vmask |= CWColormap;
|
||||
attribs.colormap = scr->w_colormap;
|
||||
scr->dock_shadow =
|
||||
@@ -869,6 +848,12 @@ wScreenInit(int screen_number)
|
||||
wBalloonInitialize(scr);
|
||||
#endif
|
||||
|
||||
scr->info_text_font = WMBoldSystemFontOfSize(scr->wmscreen, 12);
|
||||
|
||||
|
||||
scr->gview = WCreateGeometryView(scr->wmscreen);
|
||||
WMRealizeWidget(scr->gview);
|
||||
|
||||
wScreenUpdateUsableArea(scr);
|
||||
|
||||
|
||||
|
||||
@@ -233,10 +233,6 @@ typedef struct _WScreen {
|
||||
|
||||
Window clip_balloon; /* window for workspace name */
|
||||
|
||||
Window geometry_display; /* displays the geometry during
|
||||
* window resize, move etc. */
|
||||
unsigned int geometry_display_width;
|
||||
unsigned int geometry_display_height;
|
||||
int keymove_tick;
|
||||
|
||||
#ifdef GRADIENT_CLIP_ARROW
|
||||
@@ -256,6 +252,9 @@ typedef struct _WScreen {
|
||||
|
||||
struct WDialogData *dialog_data;
|
||||
|
||||
|
||||
struct W_GeometryView *gview; /* size/position view */
|
||||
|
||||
#ifdef NEWSTUFF
|
||||
struct RImage *button_images[2][PRED_BPIXMAPS];/* scaled tbar btn images */
|
||||
#endif
|
||||
|
||||
@@ -465,11 +465,14 @@ static WMPixmap *data[12];
|
||||
static Bool
|
||||
loadData(WScreen *scr)
|
||||
{
|
||||
#ifdef needs_update
|
||||
FILE *f;
|
||||
int i;
|
||||
RImage *image;
|
||||
Pixmap d[12];
|
||||
|
||||
return False;
|
||||
|
||||
f = fopen(PKGDATADIR"/xtree.dat", "r");
|
||||
if (!f)
|
||||
return False;
|
||||
@@ -515,6 +518,7 @@ error:
|
||||
}
|
||||
|
||||
return False;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ static proplist_t ANoTitlebar = NULL;
|
||||
static proplist_t ANoResizebar;
|
||||
static proplist_t ANoMiniaturizeButton;
|
||||
static proplist_t ANoCloseButton;
|
||||
static proplist_t ANoBorder;
|
||||
static proplist_t ANoHideOthers;
|
||||
static proplist_t ANoMouseBindings;
|
||||
static proplist_t ANoKeyBindings;
|
||||
@@ -105,6 +106,7 @@ init_wdefaults(WScreen *scr)
|
||||
ANoResizebar = PLMakeString("NoResizebar");
|
||||
ANoMiniaturizeButton = PLMakeString("NoMiniaturizeButton");
|
||||
ANoCloseButton = PLMakeString("NoCloseButton");
|
||||
ANoBorder = PLMakeString("NoBorder");
|
||||
ANoHideOthers = PLMakeString("NoHideOthers");
|
||||
ANoMouseBindings = PLMakeString("NoMouseBindings");
|
||||
ANoKeyBindings = PLMakeString("NoKeyBindings");
|
||||
@@ -261,6 +263,9 @@ wDefaultFillAttributes(WScreen *scr, char *instance, char *class,
|
||||
value = get_value(dw, dc, dn, da, ANoCloseButton, No, useGlobalDefault);
|
||||
APPLY_VAL(value, no_close_button, ANoCloseButton);
|
||||
|
||||
value = get_value(dw, dc, dn, da, ANoBorder, No, useGlobalDefault);
|
||||
APPLY_VAL(value, no_border, ANoBorder);
|
||||
|
||||
value = get_value(dw, dc, dn, da, ANoHideOthers, No, useGlobalDefault);
|
||||
APPLY_VAL(value, no_hide_others, ANoHideOthers);
|
||||
|
||||
|
||||
44
src/window.c
44
src/window.c
@@ -215,6 +215,10 @@ wWindowDestroy(WWindow *wwin)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (wwin->screen_ptr->cmap_window == wwin) {
|
||||
wwin->screen_ptr->cmap_window = NULL;
|
||||
}
|
||||
|
||||
WMRemoveNotificationObserver(wwin);
|
||||
|
||||
wwin->flags.destroyed = 1;
|
||||
@@ -232,7 +236,7 @@ wWindowDestroy(WWindow *wwin)
|
||||
}
|
||||
|
||||
if (wwin->normal_hints)
|
||||
free(wwin->normal_hints);
|
||||
XFree(wwin->normal_hints);
|
||||
|
||||
if (wwin->wm_hints)
|
||||
XFree(wwin->wm_hints);
|
||||
@@ -270,9 +274,16 @@ static void
|
||||
setupGNUstepHints(WWindow *wwin, GNUstepWMAttributes *gs_hints)
|
||||
{
|
||||
if (gs_hints->flags & GSWindowStyleAttr) {
|
||||
wwin->client_flags.no_titlebar =
|
||||
((gs_hints->window_style & WMTitledWindowMask)?0:1);
|
||||
|
||||
if (gs_hints->window_style == WMBorderlessWindowMask) {
|
||||
wwin->client_flags.no_border = 1;
|
||||
wwin->client_flags.no_titlebar = 1;
|
||||
wwin->client_flags.no_closable = 1;
|
||||
wwin->client_flags.no_miniaturizable = 1;
|
||||
wwin->client_flags.no_resizable = 1;
|
||||
wwin->client_flags.no_close_button = 1;
|
||||
wwin->client_flags.no_miniaturize_button = 1;
|
||||
wwin->client_flags.no_resizebar = 1;
|
||||
} else {
|
||||
wwin->client_flags.no_close_button =
|
||||
((gs_hints->window_style & WMClosableWindowMask)?0:1);
|
||||
|
||||
@@ -283,15 +294,28 @@ setupGNUstepHints(WWindow *wwin, GNUstepWMAttributes *gs_hints)
|
||||
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1);
|
||||
|
||||
wwin->client_flags.no_miniaturizable =
|
||||
((gs_hints->window_style & WMMiniaturizableWindowMask)?0:1);
|
||||
wwin->client_flags.no_miniaturize_button;
|
||||
|
||||
wwin->client_flags.no_resizebar =
|
||||
((gs_hints->window_style & WMResizableWindowMask)?0:1);
|
||||
|
||||
wwin->client_flags.no_resizable =
|
||||
((gs_hints->window_style & WMResizableWindowMask)?0:1);
|
||||
wwin->client_flags.no_resizable = wwin->client_flags.no_resizebar;
|
||||
|
||||
/* these attributes supposedly imply in the existence
|
||||
* of a titlebar */
|
||||
if (gs_hints->window_style & (WMResizableWindowMask|
|
||||
WMClosableWindowMask|
|
||||
WMMiniaturizableWindowMask)) {
|
||||
wwin->client_flags.no_titlebar = 0;
|
||||
} else {
|
||||
wwin->client_flags.no_titlebar =
|
||||
((gs_hints->window_style & WMTitledWindowMask)?0:1);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
/* setup the defaults */
|
||||
wwin->client_flags.no_border = 0;
|
||||
wwin->client_flags.no_titlebar = 0;
|
||||
wwin->client_flags.no_closable = 0;
|
||||
wwin->client_flags.no_miniaturizable = 0;
|
||||
@@ -911,6 +935,8 @@ wManageWindow(WScreen *scr, Window window)
|
||||
foo |= WFF_TITLEBAR;
|
||||
if (!WFLAGP(wwin, no_resizebar))
|
||||
foo |= WFF_RESIZEBAR;
|
||||
if (!WFLAGP(wwin, no_border))
|
||||
foo |= WFF_BORDER;
|
||||
|
||||
wwin->frame = wFrameWindowCreate(scr, window_level,
|
||||
x, y, width, height,
|
||||
@@ -1271,7 +1297,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
|
||||
wwin->frame_y = wwin->client.y;
|
||||
|
||||
|
||||
foo = WFF_RIGHT_BUTTON;
|
||||
foo = WFF_RIGHT_BUTTON|WFF_BORDER;
|
||||
foo |= WFF_TITLEBAR;
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
foo |= WFF_LANGUAGE_BUTTON;
|
||||
@@ -2152,6 +2178,8 @@ wWindowConfigureBorders(WWindow *wwin)
|
||||
flags |= WFF_TITLEBAR;
|
||||
if (!WFLAGP(wwin, no_resizebar))
|
||||
flags |= WFF_RESIZEBAR;
|
||||
if (!WFLAGP(wwin, no_border))
|
||||
flags |= WFF_BORDER;
|
||||
if (wwin->flags.shaded)
|
||||
flags |= WFF_IS_SHADED;
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ typedef struct {
|
||||
unsigned int no_resizable:1;
|
||||
unsigned int no_closable:1;
|
||||
unsigned int no_miniaturizable:1;
|
||||
unsigned int no_border:1; /* 1 pixel border around window */
|
||||
#ifdef XKB_BUTTON_HINT
|
||||
unsigned int no_language_button:1;
|
||||
#endif
|
||||
|
||||
@@ -88,7 +88,7 @@ typedef struct InspectorPanel {
|
||||
/* second page. attributes */
|
||||
|
||||
WMFrame *attrFrm;
|
||||
WMButton *attrChk[10];
|
||||
WMButton *attrChk[11];
|
||||
|
||||
/* 3rd page. more attributes */
|
||||
WMFrame *moreFrm;
|
||||
@@ -136,6 +136,7 @@ static proplist_t ANoTitlebar = NULL;
|
||||
static proplist_t ANoResizebar;
|
||||
static proplist_t ANoMiniaturizeButton;
|
||||
static proplist_t ANoCloseButton;
|
||||
static proplist_t ANoBorder;
|
||||
static proplist_t ANoHideOthers;
|
||||
static proplist_t ANoMouseBindings;
|
||||
static proplist_t ANoKeyBindings;
|
||||
@@ -199,6 +200,7 @@ make_keys()
|
||||
ANoResizebar = PLMakeString("NoResizebar");
|
||||
ANoMiniaturizeButton = PLMakeString("NoMiniaturizeButton");
|
||||
ANoCloseButton = PLMakeString("NoCloseButton");
|
||||
ANoBorder = PLMakeString("NoBorder");
|
||||
ANoHideOthers = PLMakeString("NoHideOthers");
|
||||
ANoMouseBindings = PLMakeString("NoMouseBindings");
|
||||
ANoKeyBindings = PLMakeString("NoKeyBindings");
|
||||
@@ -595,21 +597,24 @@ saveSettings(WMButton *button, InspectorPanel *panel)
|
||||
different |= insertAttribute(dict, winDic, ANoMiniaturizeButton, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[4])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AKeepOnTop, value, flags);
|
||||
different |= insertAttribute(dict, winDic, ANoBorder, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[5])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AKeepOnBottom, value, flags);
|
||||
different |= insertAttribute(dict, winDic, AKeepOnTop, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[6])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AOmnipresent, value, flags);
|
||||
different |= insertAttribute(dict, winDic, AKeepOnBottom, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[7])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AStartMiniaturized, value, flags);
|
||||
different |= insertAttribute(dict, winDic, AOmnipresent, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[8])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AStartMaximized, value, flags);
|
||||
different |= insertAttribute(dict, winDic, AStartMiniaturized, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[9])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, AStartMaximized, value, flags);
|
||||
|
||||
value = (WMGetButtonSelected(panel->attrChk[10])!=0) ? Yes : No;
|
||||
different |= insertAttribute(dict, winDic, ASkipWindowList, value, flags);
|
||||
|
||||
|
||||
@@ -811,12 +816,13 @@ applySettings(WMButton *button, InspectorPanel *panel)
|
||||
WSETUFLAG(wwin, no_resizebar, WMGetButtonSelected(panel->attrChk[1]));
|
||||
WSETUFLAG(wwin, no_close_button, WMGetButtonSelected(panel->attrChk[2]));
|
||||
WSETUFLAG(wwin, no_miniaturize_button, WMGetButtonSelected(panel->attrChk[3]));
|
||||
floating = WMGetButtonSelected(panel->attrChk[4]);
|
||||
sunken = WMGetButtonSelected(panel->attrChk[5]);
|
||||
WSETUFLAG(wwin, omnipresent, WMGetButtonSelected(panel->attrChk[6]));
|
||||
WSETUFLAG(wwin, start_miniaturized, WMGetButtonSelected(panel->attrChk[7]));
|
||||
WSETUFLAG(wwin, start_maximized, WMGetButtonSelected(panel->attrChk[8]));
|
||||
skip_window_list = WMGetButtonSelected(panel->attrChk[9]);
|
||||
WSETUFLAG(wwin, no_border, WMGetButtonSelected(panel->attrChk[4]));
|
||||
floating = WMGetButtonSelected(panel->attrChk[5]);
|
||||
sunken = WMGetButtonSelected(panel->attrChk[6]);
|
||||
WSETUFLAG(wwin, omnipresent, WMGetButtonSelected(panel->attrChk[7]));
|
||||
WSETUFLAG(wwin, start_miniaturized, WMGetButtonSelected(panel->attrChk[8]));
|
||||
WSETUFLAG(wwin, start_maximized, WMGetButtonSelected(panel->attrChk[9]));
|
||||
skip_window_list = WMGetButtonSelected(panel->attrChk[10]);
|
||||
|
||||
WSETUFLAG(wwin, no_hide_others, WMGetButtonSelected(panel->moreChk[0]));
|
||||
WSETUFLAG(wwin, no_bind_keys, WMGetButtonSelected(panel->moreChk[1]));
|
||||
@@ -936,7 +942,7 @@ revertSettings(WMButton *button, InspectorPanel *panel)
|
||||
|
||||
wWindowSetupInitialAttributes(wwin, &level, &workspace);
|
||||
|
||||
for (i=0; i < 10; i++) {
|
||||
for (i=0; i < 11; i++) {
|
||||
int flag = 0;
|
||||
|
||||
switch (i) {
|
||||
@@ -953,21 +959,24 @@ revertSettings(WMButton *button, InspectorPanel *panel)
|
||||
flag = WFLAGP(wwin, no_miniaturize_button);
|
||||
break;
|
||||
case 4:
|
||||
flag = WFLAGP(wwin, floating);
|
||||
flag = WFLAGP(wwin, no_border);
|
||||
break;
|
||||
case 5:
|
||||
flag = WFLAGP(wwin, sunken);
|
||||
flag = WFLAGP(wwin, floating);
|
||||
break;
|
||||
case 6:
|
||||
flag = WFLAGP(wwin, omnipresent);
|
||||
flag = WFLAGP(wwin, sunken);
|
||||
break;
|
||||
case 7:
|
||||
flag = WFLAGP(wwin, start_miniaturized);
|
||||
flag = WFLAGP(wwin, omnipresent);
|
||||
break;
|
||||
case 8:
|
||||
flag = WFLAGP(wwin, start_maximized!=0);
|
||||
flag = WFLAGP(wwin, start_miniaturized);
|
||||
break;
|
||||
case 9:
|
||||
flag = WFLAGP(wwin, start_maximized!=0);
|
||||
break;
|
||||
case 10:
|
||||
flag = WFLAGP(wwin, skip_window_list);
|
||||
break;
|
||||
}
|
||||
@@ -1318,7 +1327,7 @@ createInspectorForWindow(WWindow *wwin, int xpos, int ypos,
|
||||
WMMoveWidget(panel->attrFrm, 15, 45);
|
||||
WMResizeWidget(panel->attrFrm, frame_width, 250);
|
||||
|
||||
for (i=0; i < 10; i++) {
|
||||
for (i=0; i < 11; i++) {
|
||||
char *caption = NULL;
|
||||
int flag = 0;
|
||||
char *descr = NULL;
|
||||
@@ -1349,34 +1358,39 @@ createInspectorForWindow(WWindow *wwin, int xpos, int ypos,
|
||||
descr = _("Remove the `miniaturize window' button of the window.");
|
||||
break;
|
||||
case 4:
|
||||
caption = _("Disable Border");
|
||||
flag = WFLAGP(wwin, no_border);
|
||||
descr = _("Remove the 1 pixel black border around the window.");
|
||||
break;
|
||||
case 5:
|
||||
caption = _("Keep on Top / Floating");
|
||||
flag = WFLAGP(wwin, floating);
|
||||
descr = _("Keep the window over other windows, not allowing\n"
|
||||
"them to covert it.");
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
caption = _("Keep at Bottom / Sunken");
|
||||
flag = WFLAGP(wwin, sunken);
|
||||
descr = _("Keep the window under all other windows.");
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
caption = _("Omnipresent");
|
||||
flag = WFLAGP(wwin, omnipresent);
|
||||
descr = _("Make window occupy all workspaces.");
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
caption = _("Start Miniaturized");
|
||||
flag = WFLAGP(wwin, start_miniaturized);
|
||||
descr = _("Make the window be automatically miniaturized when it's\n"
|
||||
"first shown.");
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
caption = _("Start Maximized");
|
||||
flag = WFLAGP(wwin, start_maximized!=0);
|
||||
descr = _("Make the window be automatically maximized when it's\n"
|
||||
"first shown.");
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
caption = _("Skip Window List");
|
||||
flag = WFLAGP(wwin, skip_window_list);
|
||||
descr = _("Do not list the window in the window list menu.");
|
||||
|
||||
Reference in New Issue
Block a user