mirror of
https://github.com/gryf/wmaker.git
synced 2026-06-11 04:45:26 +02:00
0.51.1 pre snapshot. Be careful, it may be buggy. It fixes some bugs though.
This commit is contained in:
+5
-6
@@ -6,6 +6,7 @@ bin_PROGRAMS = wmaker
|
||||
|
||||
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h
|
||||
|
||||
|
||||
wmaker_SOURCES = \
|
||||
GNUstep.h \
|
||||
WindowMaker.h \
|
||||
@@ -98,23 +99,21 @@ wmaker_SOURCES = \
|
||||
text.h
|
||||
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/wrlib \
|
||||
-I$(top_srcdir)/WINGs @XCFLAGS@
|
||||
-I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
||||
|
||||
|
||||
wmaker_LDADD = \
|
||||
$(top_builddir)/WINGs/libWINGs.a\
|
||||
$(top_builddir)/wrlib/libwraster.la\
|
||||
@LIBRARY_SEARCH_PATH@ \
|
||||
@LIBPL@ \
|
||||
@GFXLFLAGS@ \
|
||||
@XLFLAGS@ \
|
||||
@GFXLIBS@ \
|
||||
@XLIBS@ \
|
||||
@X_EXTRA_LIBS@ \
|
||||
@INTLIBS@ \
|
||||
-lm
|
||||
|
||||
|
||||
+5
-5
@@ -62,13 +62,13 @@ host_triplet = @host@
|
||||
CC = @CC@
|
||||
CPP_PATH = @CPP_PATH@
|
||||
DFLAGS = @DFLAGS@
|
||||
GFXFLAGS = @GFXFLAGS@
|
||||
GFXLFLAGS = @GFXLFLAGS@
|
||||
GFXLIBS = @GFXLIBS@
|
||||
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBPL = @LIBPL@
|
||||
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
@@ -98,12 +98,12 @@ EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.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 framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c list.c list.h main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c 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 xde.h xde.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@
|
||||
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @XCFLAGS@
|
||||
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
||||
|
||||
|
||||
wmaker_LDADD = $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la @LIBPL@ @GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ @X_EXTRA_LIBS@ @INTLIBS@ -lm
|
||||
wmaker_LDADD = $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la @LIBRARY_SEARCH_PATH@ @LIBPL@ @GFXLIBS@ @XLIBS@ @INTLIBS@ -lm
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
|
||||
+6
-3
@@ -320,7 +320,10 @@ typedef struct WPreferences {
|
||||
char window_balloon;
|
||||
char miniwin_balloon;
|
||||
char appicon_balloon;
|
||||
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
char windoze_cycling; /* Windoze 95 style Alt+Tabbing */
|
||||
char popup_switchmenu; /* Popup the switchmenu when Alt+Tabbing */
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
/* some constants */
|
||||
int dblclick_time; /* double click delay time in ms */
|
||||
|
||||
@@ -332,9 +335,9 @@ typedef struct WPreferences {
|
||||
|
||||
/* shading animation */
|
||||
char shade_speed;
|
||||
|
||||
|
||||
int edge_resistance;
|
||||
|
||||
|
||||
struct {
|
||||
unsigned int nodock:1; /* don't display the dock */
|
||||
unsigned int noclip:1; /* don't display the clip */
|
||||
|
||||
+37
-56
@@ -70,6 +70,7 @@ extern WPreferences wPreferences;
|
||||
|
||||
extern Atom _XA_WM_TAKE_FOCUS;
|
||||
|
||||
|
||||
/******* Local Variables *******/
|
||||
static struct {
|
||||
int steps;
|
||||
@@ -133,7 +134,6 @@ void
|
||||
wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
{
|
||||
WWindow *focused=scr->focused_window;
|
||||
WWindow *owner = NULL;
|
||||
int timestamp=LastTimestamp;
|
||||
WApplication *oapp=NULL, *napp=NULL;
|
||||
int wasfocused;
|
||||
@@ -149,9 +149,9 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
timestamp = CurrentTime;
|
||||
|
||||
if (focused)
|
||||
oapp = wApplicationOf(focused->main_window);
|
||||
oapp = wApplicationOf(focused->main_window);
|
||||
|
||||
if (wwin==NULL) {
|
||||
if (wwin == NULL) {
|
||||
XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, timestamp);
|
||||
if (focused) {
|
||||
wWindowUnfocus(focused);
|
||||
@@ -174,11 +174,8 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
/* remember last workspace where the app has been */
|
||||
if (napp)
|
||||
napp->last_workspace = wwin->screen_ptr->current_workspace;
|
||||
|
||||
if (WFLAGP(wwin, no_focusable))
|
||||
return;
|
||||
|
||||
if (wwin->flags.mapped) {
|
||||
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
||||
/* install colormap if colormap mode is lock mode */
|
||||
if (wPreferences.colormap_mode==WKF_CLICK)
|
||||
wColormapInstallForWindow(scr, wwin);
|
||||
@@ -206,35 +203,17 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, timestamp);
|
||||
}
|
||||
|
||||
if (WFLAGP(wwin, no_focusable))
|
||||
return;
|
||||
|
||||
/* if this is not the focused window focus it */
|
||||
if (focused!=wwin) {
|
||||
int foo=0;
|
||||
|
||||
if (wwin->client_win == focused->transient_for)
|
||||
wwin->flags.semi_focused = 0;
|
||||
else if (wwin->transient_for == focused->client_win)
|
||||
focused->flags.semi_focused = 1;
|
||||
|
||||
if (wwin->transient_for
|
||||
&& wwin->transient_for == focused->transient_for) {
|
||||
owner = wWindowFor(wwin->transient_for);
|
||||
if (owner && owner->flags.semi_focused) {
|
||||
foo=1;
|
||||
/* this is to override the unfocusing of the mainwindow
|
||||
* in the next wWindowUnfocus() and avoid flickering */
|
||||
owner->flags.semi_focused = 0;
|
||||
}
|
||||
}
|
||||
/* unfocus previous window */
|
||||
wWindowUnfocus(focused);
|
||||
if (foo) {
|
||||
owner->flags.semi_focused = 1;
|
||||
}
|
||||
/* change the focus window list order */
|
||||
if (wwin->prev)
|
||||
wwin->prev->next=wwin->next;
|
||||
wwin->prev->next = wwin->next;
|
||||
|
||||
if (wwin->next)
|
||||
wwin->next->prev=wwin->prev;
|
||||
wwin->next->prev = wwin->prev;
|
||||
|
||||
wwin->prev = focused;
|
||||
focused->next = wwin;
|
||||
@@ -248,12 +227,9 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if ((owner=wWindowFor(wwin->transient_for))
|
||||
&& !owner->flags.semi_focused) {
|
||||
owner->flags.semi_focused = 1;
|
||||
wWindowUnfocus(owner);
|
||||
}
|
||||
wWindowFocus(wwin);
|
||||
|
||||
wWindowFocus(wwin, focused);
|
||||
|
||||
if (napp && !wasfocused) {
|
||||
wAppMenuMap(napp->menu, wwin);
|
||||
#ifdef NEWAPPICON
|
||||
@@ -271,7 +247,6 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
void
|
||||
wShadeWindow(WWindow *wwin)
|
||||
{
|
||||
XWindowAttributes attribs;
|
||||
time_t time0 = time(NULL);
|
||||
#ifdef ANIMATIONS
|
||||
int y, s, w, h;
|
||||
@@ -314,13 +289,12 @@ wShadeWindow(WWindow *wwin)
|
||||
|
||||
wwin->flags.skip_next_animation = 0;
|
||||
wwin->flags.shaded = 1;
|
||||
wwin->flags.mapped=0;
|
||||
XGetWindowAttributes(dpy, wwin->client_win, &attribs);
|
||||
wwin->flags.mapped = 0;
|
||||
/* prevent window withdrawal when getting UnmapNotify */
|
||||
XSelectInput(dpy, wwin->client_win,
|
||||
attribs.your_event_mask & ~StructureNotifyMask);
|
||||
wwin->event_mask & ~StructureNotifyMask);
|
||||
XUnmapWindow(dpy, wwin->client_win);
|
||||
XSelectInput(dpy, wwin->client_win, attribs.your_event_mask);
|
||||
XSelectInput(dpy, wwin->client_win, wwin->event_mask);
|
||||
|
||||
/* for the client it's just like iconification */
|
||||
wFrameWindowResize(wwin->frame, wwin->frame->core->width,
|
||||
@@ -438,6 +412,10 @@ wMaximizeWindow(WWindow *wwin, int directions)
|
||||
int new_width, new_height, new_x, new_y;
|
||||
WArea usableArea = wwin->screen_ptr->totalUsableArea;
|
||||
|
||||
|
||||
if (WFLAGP(wwin, no_resizable))
|
||||
return;
|
||||
|
||||
if (wwin->flags.shaded) {
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
wUnshadeWindow(wwin);
|
||||
@@ -769,7 +747,6 @@ static void
|
||||
unmapTransientsFor(WWindow *wwin)
|
||||
{
|
||||
WWindow *tmp;
|
||||
XWindowAttributes attribs;
|
||||
|
||||
|
||||
tmp = wwin->screen_ptr->focused_window;
|
||||
@@ -779,8 +756,7 @@ unmapTransientsFor(WWindow *wwin)
|
||||
&& (tmp->flags.mapped || wwin->screen_ptr->flags.startup
|
||||
|| tmp->flags.shaded)) {
|
||||
unmapTransientsFor(tmp);
|
||||
XGetWindowAttributes(dpy, tmp->client_win, &attribs);
|
||||
tmp->flags.miniaturized=1;
|
||||
tmp->flags.miniaturized = 1;
|
||||
if (!tmp->flags.shaded) {
|
||||
wWindowUnmap(tmp);
|
||||
} else {
|
||||
@@ -842,7 +818,7 @@ mapTransientsFor(WWindow *wwin)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static void
|
||||
setupIconGrabs(WIcon *icon)
|
||||
{
|
||||
@@ -855,7 +831,7 @@ setupIconGrabs(WIcon *icon)
|
||||
ButtonPressMask, GrabModeSync, GrabModeAsync, None, None);
|
||||
XSync(dpy, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static WWindow*
|
||||
recursiveTransientFor(WWindow *wwin)
|
||||
@@ -881,7 +857,7 @@ recursiveTransientFor(WWindow *wwin)
|
||||
return wwin;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
static void
|
||||
removeIconGrabs(WIcon *icon)
|
||||
{
|
||||
@@ -891,7 +867,7 @@ removeIconGrabs(WIcon *icon)
|
||||
XUngrabButton(dpy, Button3, AnyModifier, icon->core->window);
|
||||
XSync(dpy, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
wIconifyWindow(WWindow *wwin)
|
||||
@@ -932,8 +908,8 @@ wIconifyWindow(WWindow *wwin)
|
||||
}
|
||||
wwin->icon = wIconCreate(wwin);
|
||||
|
||||
wwin->flags.miniaturized=1;
|
||||
wwin->flags.mapped=0;
|
||||
wwin->flags.miniaturized = 1;
|
||||
wwin->flags.mapped = 0;
|
||||
|
||||
/* unmap transients */
|
||||
|
||||
@@ -1148,7 +1124,7 @@ hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
|
||||
|
||||
wwin->flags.hidden = 1;
|
||||
wWindowUnmap(wwin);
|
||||
|
||||
|
||||
wClientSetState(wwin, IconicState, icon->icon_win);
|
||||
flushExpose();
|
||||
#ifdef WMSOUND
|
||||
@@ -1170,7 +1146,6 @@ hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
|
||||
#endif
|
||||
|
||||
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1656,7 +1631,7 @@ wArrangeIcons(WScreen *scr, Bool arrangeAll)
|
||||
wwin = wwin->prev;
|
||||
|
||||
while (wwin) {
|
||||
if (wwin->icon && wwin->flags.miniaturized && !wwin->flags.hidden &&
|
||||
if (wwin->icon && wwin->flags.miniaturized &&/*!wwin->flags.hidden &&*/
|
||||
(wwin->frame->workspace==scr->current_workspace ||
|
||||
IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons)) {
|
||||
|
||||
@@ -1675,10 +1650,12 @@ wArrangeIcons(WScreen *scr, Bool arrangeAll)
|
||||
}
|
||||
wwin->icon_x = X;
|
||||
wwin->icon_y = Y;
|
||||
wwin->flags.icon_moved = 0;
|
||||
pi++;
|
||||
}
|
||||
}
|
||||
if (arrangeAll) {
|
||||
wwin->flags.icon_moved = 0;
|
||||
}
|
||||
/* we reversed the order, so we use next */
|
||||
wwin = wwin->next;
|
||||
if (pi >= pf) {
|
||||
@@ -1715,7 +1692,11 @@ wMakeWindowVisible(WWindow *wwin)
|
||||
wUnshadeWindow(wwin);
|
||||
}
|
||||
if (wwin->flags.hidden) {
|
||||
wUnhideApplication(wApplicationOf(wwin->main_window), False, False);
|
||||
WApplication *app;
|
||||
|
||||
app = wApplicationOf(wwin->main_window);
|
||||
if (app)
|
||||
wUnhideApplication(app, False, False);
|
||||
} else if (wwin->flags.miniaturized) {
|
||||
wDeiconifyWindow(wwin);
|
||||
} else {
|
||||
|
||||
+1
-4
@@ -87,12 +87,9 @@ wClientRestore(WWindow *wwin)
|
||||
if (gy > 0)
|
||||
wwin->frame_y += (wwin->frame->top_width + wwin->frame->bottom_width);
|
||||
#endif
|
||||
XUnmapWindow(dpy, wwin->client_win);
|
||||
XSetWindowBorderWidth(dpy, wwin->client_win, wwin->old_border_width);
|
||||
XReparentWindow(dpy, wwin->client_win, wwin->screen_ptr->root_win,
|
||||
wwin->frame_x, wwin->frame_y);
|
||||
if (wwin->flags.mapped)
|
||||
XMapWindow(dpy, wwin->client_win);
|
||||
|
||||
/* don't let the window get iconified after restart */
|
||||
/*
|
||||
@@ -747,7 +744,7 @@ GetColormapWindows(WWindow *wwin)
|
||||
wwin->cmap_window_no = 0;
|
||||
|
||||
if (XGetWMColormapWindows(dpy, wwin->client_win, &(wwin->cmap_windows),
|
||||
&(wwin->cmap_window_no))!=Success
|
||||
&(wwin->cmap_window_no))==0
|
||||
|| !wwin->cmap_windows) {
|
||||
wwin->cmap_window_no = 0;
|
||||
wwin->cmap_windows = NULL;
|
||||
|
||||
+7
-16
@@ -26,18 +26,12 @@
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
@@ -47,9 +41,6 @@
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
#define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
@@ -62,10 +53,6 @@
|
||||
/* define to the path to cpp */
|
||||
#define CPP_PATH "/lib/cpp"
|
||||
|
||||
/* define to the directory containing NLS information
|
||||
* set by configure */
|
||||
#define NLSDIR "/usr/local/lib/locale"
|
||||
|
||||
/* define if you want GNOME stuff support */
|
||||
/* #undef GNOME_STUFF */
|
||||
|
||||
@@ -130,10 +117,14 @@
|
||||
* set by configure */
|
||||
#define X_LOCALE 1
|
||||
|
||||
/* the place where the configuration is stored
|
||||
/* the place where shared data is stored
|
||||
* defined by configure */
|
||||
#define PKGDATADIR "/usr/local/share/WindowMaker"
|
||||
|
||||
/* the place where the configuration is stored
|
||||
* defined by configure */
|
||||
#define SYSCONFDIR "/usr/local/etc/WindowMaker"
|
||||
|
||||
/* Define if you have the atexit function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
@@ -153,7 +144,7 @@
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strncasecmp function. */
|
||||
/* #undef HAVE_STRNCASECMP */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
@@ -183,5 +174,5 @@
|
||||
#define PACKAGE "WindowMaker"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.51.0"
|
||||
#define VERSION "0.51.1"
|
||||
|
||||
|
||||
+5
-14
@@ -25,18 +25,12 @@
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
@@ -46,9 +40,6 @@
|
||||
*/
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
#undef SYS_SIGLIST_DECLARED
|
||||
|
||||
@@ -61,10 +52,6 @@
|
||||
/* define to the path to cpp */
|
||||
#undef CPP_PATH
|
||||
|
||||
/* define to the directory containing NLS information
|
||||
* set by configure */
|
||||
#undef NLSDIR
|
||||
|
||||
/* define if you want GNOME stuff support */
|
||||
#undef GNOME_STUFF
|
||||
|
||||
@@ -129,10 +116,14 @@
|
||||
* set by configure */
|
||||
#undef X_LOCALE
|
||||
|
||||
/* the place where the configuration is stored
|
||||
/* the place where shared data is stored
|
||||
* defined by configure */
|
||||
#undef PKGDATADIR
|
||||
|
||||
/* the place where the configuration is stored
|
||||
* defined by configure */
|
||||
#undef SYSCONFDIR
|
||||
|
||||
/* Define if you have the atexit function. */
|
||||
#undef HAVE_ATEXIT
|
||||
|
||||
|
||||
+32
-11
@@ -94,7 +94,7 @@ typedef struct {
|
||||
int (*convert)();
|
||||
int (*update)();
|
||||
proplist_t plkey;
|
||||
proplist_t plvalue;
|
||||
proplist_t plvalue; /* default value */
|
||||
} WDefaultEntry;
|
||||
|
||||
|
||||
@@ -394,9 +394,6 @@ WDefaultEntry optionList[] = {
|
||||
{"DontLinkWorkspaces","NO", NULL,
|
||||
&wPreferences.no_autowrap, getBool, NULL
|
||||
},
|
||||
{"EdgeResistance", "0", NULL,
|
||||
&wPreferences.edge_resistance,getInt, NULL
|
||||
},
|
||||
{"AutoArrangeIcons", "NO", NULL,
|
||||
&wPreferences.auto_arrange_icons, getBool, NULL
|
||||
},
|
||||
@@ -427,9 +424,20 @@ WDefaultEntry optionList[] = {
|
||||
{"AppIconBalloons", "NO", NULL,
|
||||
&wPreferences.appicon_balloon,getBool, NULL
|
||||
},
|
||||
{"EdgeResistance", "30", NULL,
|
||||
&wPreferences.edge_resistance,getInt, NULL
|
||||
},
|
||||
{"DisableBlinking", "NO", NULL,
|
||||
&wPreferences.dont_blink, getBool, NULL
|
||||
},
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
{"WindozeCycling","NO", NULL,
|
||||
&wPreferences.windoze_cycling, getBool, NULL
|
||||
},
|
||||
{"PopupSwitchMenu","YES",NULL,
|
||||
&wPreferences.popup_switchmenu, getBool, NULL
|
||||
},
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
/* style options */
|
||||
{"WidgetColor", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setWidgetColor,
|
||||
@@ -806,7 +814,7 @@ wDefaultsInitDomain(char *domain, Bool requireDictionary)
|
||||
}
|
||||
|
||||
/* global system dictionary */
|
||||
sprintf(path, "%s/%s/%s", PKGDATADIR, DEFAULTS_DIR, domain);
|
||||
sprintf(path, "%s/%s", SYSCONFDIR, domain);
|
||||
if (stat(path, &stbuf)>=0) {
|
||||
shared_dict = ReadProplistFromFile(path);
|
||||
if (shared_dict) {
|
||||
@@ -900,7 +908,7 @@ wDefaultsCheckDomains(void *foo)
|
||||
WDWindowMaker->timestamp = stbuf.st_mtime;
|
||||
|
||||
/* global dictionary */
|
||||
sprintf(path, "%s/%s/WindowMaker", PKGDATADIR, DEFAULTS_DIR);
|
||||
sprintf(path, "%s/WindowMaker", SYSCONFDIR);
|
||||
if (stat(path, &stbuf)>=0) {
|
||||
shared_dict = ReadProplistFromFile(path);
|
||||
if (shared_dict && !PLIsDictionary(shared_dict)) {
|
||||
@@ -1107,13 +1115,12 @@ wReadDefaults(WScreen *scr, proplist_t new_dict)
|
||||
{
|
||||
proplist_t plvalue, old_value;
|
||||
WDefaultEntry *entry;
|
||||
int i, changed, must_update;
|
||||
int i, must_update;
|
||||
int needs_refresh;
|
||||
void *tdata;
|
||||
proplist_t old_dict = (WDWindowMaker->dictionary!=new_dict
|
||||
? WDWindowMaker->dictionary : NULL);
|
||||
|
||||
changed = 0;
|
||||
must_update = 0;
|
||||
|
||||
needs_refresh = 0;
|
||||
@@ -1137,7 +1144,6 @@ wReadDefaults(WScreen *scr, proplist_t new_dict)
|
||||
plvalue = entry->plvalue;
|
||||
if (plvalue && new_dict) {
|
||||
PLInsertDictionaryEntry(new_dict, entry->plkey, plvalue);
|
||||
changed = 1;
|
||||
must_update = 1;
|
||||
}
|
||||
} else if (!plvalue) {
|
||||
@@ -1145,10 +1151,8 @@ wReadDefaults(WScreen *scr, proplist_t new_dict)
|
||||
continue;
|
||||
} else if (!old_value) {
|
||||
/* set value for the 1st time */
|
||||
changed = 1;
|
||||
} else if (!PLIsEqual(plvalue, old_value)) {
|
||||
/* value has changed */
|
||||
changed = 1;
|
||||
} else {
|
||||
/* value was not changed since last time */
|
||||
continue;
|
||||
@@ -2003,6 +2007,22 @@ again:
|
||||
|
||||
*ret = PLRetain(value);
|
||||
|
||||
#ifdef notworking
|
||||
/*
|
||||
* Kluge to force wmsetbg helper to set the default background.
|
||||
* If the WorkspaceSpecificBack is changed once wmaker has started,
|
||||
* the WorkspaceBack won't be sent to the helper, unless the user
|
||||
* changes it's value too. So, we must force this by removing the
|
||||
* value from the defaults DB.
|
||||
*/
|
||||
if (!scr->flags.backimage_helper_launched && !scr->flags.startup) {
|
||||
proplist_t key = PLMakeString("WorkspaceBack");
|
||||
|
||||
PLRemoveDictionaryEntry(WDWindowMaker->dictionary, key);
|
||||
|
||||
PLRelease(key);
|
||||
}
|
||||
#endif
|
||||
return True;
|
||||
}
|
||||
|
||||
@@ -2689,6 +2709,7 @@ setWorkspaceBack(WScreen *scr, WDefaultEntry *entry, proplist_t value,
|
||||
char *command;
|
||||
char *text;
|
||||
|
||||
SetupEnvironment(scr);
|
||||
text = PLGetDescription(value);
|
||||
command = wmalloc(strlen(text)+40);
|
||||
sprintf(command, "wmsetbg -d -p '%s' &", text);
|
||||
|
||||
+33
-14
@@ -366,7 +366,7 @@ buttonCallback(void *self, void *clientData)
|
||||
|
||||
op = WMCreateOpenPanel(WMWidgetScreen(bPtr));
|
||||
|
||||
if (WMRunModalOpenPanelForDirectory(op, NULL, "/usr/local", NULL, NULL)) {
|
||||
if (WMRunModalFilePanelForDirectory(op, NULL, "/usr/local", NULL, NULL)) {
|
||||
char *path;
|
||||
path = WMGetFilePanelFile(op);
|
||||
WMSetTextFieldText(panel->fileField, path);
|
||||
@@ -581,7 +581,7 @@ typedef struct {
|
||||
RImage *pic;
|
||||
WMPixmap *oldPix;
|
||||
char *str;
|
||||
char x;
|
||||
int x;
|
||||
#endif
|
||||
} InfoPanel;
|
||||
|
||||
@@ -683,8 +683,23 @@ logoPushCallback(void *data)
|
||||
char buffer[512];
|
||||
int i;
|
||||
int len;
|
||||
static int jingobeu[] = {
|
||||
329, 150, -1, 100, 329, 150, -1, 100, 329, 300, -1, 250,
|
||||
329, 150, -1, 100, 329, 150, -1, 100, 329, 300, -1, 250,
|
||||
329, 150, 392, 150, 261, 150, 293, 150, 329, 400, -1, 400, 0
|
||||
};
|
||||
static int c = 0;
|
||||
|
||||
if (panel->x) {
|
||||
XKeyboardControl kc;
|
||||
|
||||
if (panel->x > 0) {
|
||||
if(jingobeu[panel->x-1]==0){panel->x=-1;}else if(jingobeu[panel->x
|
||||
-1]<0){panel->x++;c=jingobeu[panel->x-1]/50;panel->x++;}else if(c==0){
|
||||
kc.bell_pitch=jingobeu[panel->x-1];panel->x++;kc.bell_percent=50;c=
|
||||
jingobeu[panel->x-1]/50;kc.bell_duration=jingobeu[panel->x-1];panel->x++;
|
||||
XChangeKeyboardControl(dpy,KBBellPitch|KBBellDuration|KBBellPercent,&kc);
|
||||
XBell(dpy,50);XFlush(dpy);}else{c--;}}
|
||||
if (!(panel->cycle % 4)) {
|
||||
WMPixmap *p;
|
||||
|
||||
@@ -838,6 +853,7 @@ handleLogoPush(XEvent *event, void *data)
|
||||
"Have a nice day!"
|
||||
};
|
||||
|
||||
|
||||
clicks++;
|
||||
if (!panel->timer && !broken && clicks > 2) {
|
||||
char *file;
|
||||
@@ -973,39 +989,41 @@ wShowInfoPanel(WScreen *scr)
|
||||
}
|
||||
|
||||
panel->name1L = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->name1L, 200, 30);
|
||||
WMMoveWidget(panel->name1L, 120, 30);
|
||||
WMResizeWidget(panel->name1L, 240, 30);
|
||||
WMMoveWidget(panel->name1L, 100, 30);
|
||||
color1.red = 0;
|
||||
color1.green = 0;
|
||||
color1.blue = 0;
|
||||
color2.red = 0x50;
|
||||
color2.green = 0x50;
|
||||
color2.blue = 0x70;
|
||||
logo = renderText(scr->wmscreen, " Window Maker ",
|
||||
"-*-times-bold-r-*-*-24-*", &color1, &color2);
|
||||
logo = renderText(scr->wmscreen, "GNU Window Maker",
|
||||
"-*-utopia-*-r-*-*-25-*", &color1, &color2);
|
||||
if (logo) {
|
||||
WMSetLabelImagePosition(panel->name1L, WIPImageOnly);
|
||||
WMSetLabelImage(panel->name1L, logo);
|
||||
WMReleasePixmap(logo);
|
||||
} else {
|
||||
font = WMBoldSystemFontOfSize(scr->wmscreen, 24);
|
||||
font = WMBoldSystemFontOfSize(scr->wmscreen, 20);
|
||||
if (font) {
|
||||
WMSetLabelFont(panel->name1L, font);
|
||||
WMReleaseFont(font);
|
||||
}
|
||||
WMSetLabelText(panel->name1L, "Window Maker");
|
||||
WMSetLabelTextAlignment(panel->name1L, WACenter);
|
||||
WMSetLabelText(panel->name1L, "GNU Window Maker");
|
||||
}
|
||||
|
||||
panel->name2L = WMCreateLabel(panel->win);
|
||||
WMResizeWidget(panel->name2L, 200, 24);
|
||||
WMMoveWidget(panel->name2L, 120, 60);
|
||||
WMResizeWidget(panel->name2L, 240, 24);
|
||||
WMMoveWidget(panel->name2L, 100, 60);
|
||||
font = WMBoldSystemFontOfSize(scr->wmscreen, 18);
|
||||
if (font) {
|
||||
WMSetLabelFont(panel->name2L, font);
|
||||
WMReleaseFont(font);
|
||||
font = NULL;
|
||||
}
|
||||
WMSetLabelText(panel->name2L, "X11 Window Manager");
|
||||
WMSetLabelTextAlignment(panel->name2L, WACenter);
|
||||
WMSetLabelText(panel->name2L, "Window Manager for X");
|
||||
|
||||
|
||||
sprintf(version, "Version %s", VERSION);
|
||||
@@ -1124,14 +1142,15 @@ wShowInfoPanel(WScreen *scr)
|
||||
panel->wwin = wwin;
|
||||
|
||||
thePanel = panel;
|
||||
|
||||
if (InitXThing(panel->scr)) {
|
||||
#ifndef SILLYNESS
|
||||
if (InitXThing(panel->scr)) {
|
||||
panel->timer = WMAddTimerHandler(100, logoPushCallback, panel);
|
||||
panel->cycle = 0;
|
||||
panel->x = 1;
|
||||
panel->str = "Merry X'mas!";
|
||||
panel->str = "Merry Christmas!";
|
||||
panel->oldPix = WMRetainPixmap(WMGetLabelImage(panel->logoL));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-9
@@ -762,7 +762,7 @@ mainIconCreate(WScreen *scr, int type)
|
||||
x_pos = 0;
|
||||
} else {
|
||||
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock", TILE_NORMAL);
|
||||
x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE - 1;
|
||||
x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
|
||||
}
|
||||
|
||||
btn->xindex = 0;
|
||||
@@ -1602,21 +1602,20 @@ wDockRestoreState(WScreen *scr, proplist_t dock_state, int type)
|
||||
if (dock->y_pos < 0)
|
||||
dock->y_pos = 0;
|
||||
else if (dock->y_pos > scr->scr_height-ICON_SIZE)
|
||||
dock->y_pos = scr->scr_height-ICON_SIZE;
|
||||
|
||||
dock->y_pos = scr->scr_height - ICON_SIZE;
|
||||
|
||||
/* This is no more needed. ??? */
|
||||
if (type == WM_CLIP) {
|
||||
if (dock->x_pos < 0)
|
||||
dock->x_pos = 0;
|
||||
else if (dock->x_pos > scr->scr_width-ICON_SIZE)
|
||||
dock->x_pos = scr->scr_width-ICON_SIZE;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (dock->x_pos >= 0) {
|
||||
dock->x_pos = DOCK_EXTRA_SPACE;
|
||||
dock->on_right_side = 0;
|
||||
} else {
|
||||
dock->x_pos = scr->scr_width - DOCK_EXTRA_SPACE - ICON_SIZE - 1;
|
||||
dock->x_pos = scr->scr_width - DOCK_EXTRA_SPACE - ICON_SIZE;
|
||||
dock->on_right_side = 1;
|
||||
}
|
||||
}
|
||||
@@ -2691,7 +2690,7 @@ swapDock(WDock *dock)
|
||||
|
||||
|
||||
if (dock->on_right_side) {
|
||||
x = dock->x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE - 1;
|
||||
x = dock->x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
|
||||
} else {
|
||||
x = dock->x_pos = DOCK_EXTRA_SPACE;
|
||||
}
|
||||
@@ -3355,8 +3354,7 @@ handleDockMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
||||
y = ev.xmotion.y_root - ofs_y;
|
||||
}
|
||||
moveDock(dock, x, y);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/* move vertically if pointer is inside the dock*/
|
||||
if ((dock->on_right_side &&
|
||||
ev.xmotion.x_root >= dock->x_pos - ICON_SIZE)
|
||||
|
||||
+243
-55
@@ -117,6 +117,7 @@ static void handleClientMessage();
|
||||
static void handleKeyPress();
|
||||
static void handleFocusIn();
|
||||
static void handleMotionNotify();
|
||||
static void handleVisibilityNotify();
|
||||
|
||||
|
||||
#ifdef SHAPE
|
||||
@@ -250,7 +251,7 @@ DispatchEvent(XEvent *event)
|
||||
break;
|
||||
|
||||
case MapNotify:
|
||||
handleMapNotify(event->xmap.window);
|
||||
handleMapNotify(event);
|
||||
break;
|
||||
|
||||
case UnmapNotify:
|
||||
@@ -295,6 +296,10 @@ DispatchEvent(XEvent *event)
|
||||
handleFocusIn(event);
|
||||
break;
|
||||
|
||||
case VisibilityNotify:
|
||||
handleVisibilityNotify(event);
|
||||
break;
|
||||
|
||||
default:
|
||||
handleExtensions(event);
|
||||
break;
|
||||
@@ -333,11 +338,11 @@ IsDoubleClick(WScreen *scr, XEvent *event)
|
||||
if ((scr->last_click_time>0) &&
|
||||
(event->xbutton.time-scr->last_click_time<=wPreferences.dblclick_time)
|
||||
&& (event->xbutton.button == scr->last_click_button)
|
||||
&& (event->xbutton.subwindow == scr->last_click_window)) {
|
||||
&& (event->xbutton.window == scr->last_click_window)) {
|
||||
|
||||
scr->flags.next_click_is_not_double = 1;
|
||||
scr->last_click_time = 0;
|
||||
scr->last_click_window = None;
|
||||
scr->last_click_window = event->xbutton.window;
|
||||
|
||||
return True;
|
||||
}
|
||||
@@ -456,7 +461,7 @@ handleMapRequest(XEvent *ev)
|
||||
printf("got map request for %x\n", (unsigned)window);
|
||||
#endif
|
||||
|
||||
if ((wwin=wWindowFor(window))) {
|
||||
if ((wwin = wWindowFor(window))) {
|
||||
if (wwin->flags.shaded) {
|
||||
wUnshadeWindow(wwin);
|
||||
}
|
||||
@@ -496,16 +501,15 @@ handleMapRequest(XEvent *ev)
|
||||
wDockTrackWindowLaunch(scr->last_dock, window);
|
||||
}
|
||||
|
||||
|
||||
if (wwin) {
|
||||
int state;
|
||||
|
||||
|
||||
if (wwin->wm_hints && (wwin->wm_hints->flags & StateHint))
|
||||
state = wwin->wm_hints->initial_state;
|
||||
else
|
||||
state = NormalState;
|
||||
|
||||
if (state==IconicState)
|
||||
if (state == IconicState)
|
||||
wwin->flags.miniaturized = 1;
|
||||
|
||||
if (state == WithdrawnState) {
|
||||
@@ -520,23 +524,21 @@ handleMapRequest(XEvent *ev)
|
||||
if (wwin->flags.shaded) {
|
||||
wwin->flags.shaded = 0;
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
wwin->flags.ignore_next_unmap = 1; /* ??? */
|
||||
wShadeWindow(wwin);
|
||||
}
|
||||
if (wwin->flags.miniaturized) {
|
||||
wwin->flags.miniaturized = 0;
|
||||
wwin->flags.hidden = 0;
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
wwin->flags.ignore_next_unmap = 1;
|
||||
wIconifyWindow(wwin);
|
||||
} else if (wwin->flags.hidden) {
|
||||
}
|
||||
if (wwin->flags.hidden) {
|
||||
WApplication *wapp = wApplicationOf(wwin->main_window);
|
||||
|
||||
wwin->flags.hidden = 0;
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
if (wapp) {
|
||||
wHideApplication(wapp);
|
||||
}
|
||||
wwin->flags.ignore_next_unmap = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -585,14 +587,14 @@ static void
|
||||
handleExpose(XEvent *event)
|
||||
{
|
||||
WObjDescriptor *desc;
|
||||
XEvent ev;
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("got expose");
|
||||
#endif
|
||||
if (event->xexpose.count!=0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
while (XCheckTypedWindowEvent(dpy, event->xexpose.window, Expose, &ev));
|
||||
|
||||
if (XFindContext(dpy, event->xexpose.window, wWinContext,
|
||||
(XPointer *)&desc)==XCNOENT) {
|
||||
return;
|
||||
@@ -675,6 +677,10 @@ handleButtonPress(XEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (desc->handle_mousedown!=NULL) {
|
||||
(*desc->handle_mousedown)(desc, event);
|
||||
}
|
||||
|
||||
if (desc->parent_type == WCLASS_WINDOW) {
|
||||
XSync(dpy, 0);
|
||||
|
||||
@@ -699,43 +705,33 @@ handleButtonPress(XEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (desc->handle_mousedown!=NULL) {
|
||||
(*desc->handle_mousedown)(desc, event);
|
||||
}
|
||||
|
||||
/* save double-click information */
|
||||
if (scr->flags.next_click_is_not_double) {
|
||||
scr->flags.next_click_is_not_double = 0;
|
||||
} else {
|
||||
scr->last_click_time = event->xbutton.time;
|
||||
scr->last_click_button = event->xbutton.button;
|
||||
scr->last_click_window = event->xbutton.subwindow;
|
||||
scr->last_click_window = event->xbutton.window;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleMapNotify(Window window)
|
||||
handleMapNotify(XEvent *event)
|
||||
{
|
||||
WWindow *wwin;
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("got map");
|
||||
#endif
|
||||
wwin= wWindowFor(window);
|
||||
if (wwin && wwin->client_win==window) {
|
||||
if (wwin->flags.ignore_next_unmap) {
|
||||
wwin->flags.ignore_next_unmap=0;
|
||||
return;
|
||||
}
|
||||
|
||||
wwin = wWindowFor(event->xmap.event);
|
||||
if (wwin && wwin->client_win == event->xmap.event) {
|
||||
if (wwin->flags.miniaturized) {
|
||||
wDeiconifyWindow(wwin);
|
||||
} else {
|
||||
XGrabServer(dpy);
|
||||
XSync(dpy,0);
|
||||
XMapWindow(dpy, wwin->client_win);
|
||||
XMapWindow(dpy, wwin->frame->core->window);
|
||||
wwin->flags.mapped=1;
|
||||
wWindowMap(wwin);
|
||||
wClientSetState(wwin, NormalState, None);
|
||||
XUngrabServer(dpy);
|
||||
}
|
||||
@@ -748,22 +744,31 @@ handleUnmapNotify(XEvent *event)
|
||||
{
|
||||
WWindow *wwin;
|
||||
XEvent ev;
|
||||
|
||||
Bool withdraw = False;
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("got unmap");
|
||||
#endif
|
||||
|
||||
/* only process windows with StructureNotify selected
|
||||
* (ignore SubstructureNotify) */
|
||||
wwin = wWindowFor(event->xunmap.window);
|
||||
if (!wwin || wwin->client_win!=event->xunmap.window)
|
||||
if (!wwin)
|
||||
return;
|
||||
|
||||
if (!wwin->flags.mapped
|
||||
&& wwin->frame->workspace==wwin->screen_ptr->current_workspace
|
||||
|
||||
/* whether the event is a Withdrawal request */
|
||||
if (event->xunmap.event == wwin->screen_ptr->root_win
|
||||
&& event->xunmap.send_event)
|
||||
withdraw = True;
|
||||
|
||||
if (wwin->client_win != event->xunmap.event && !withdraw)
|
||||
return;
|
||||
|
||||
if (!wwin->flags.mapped && !withdraw
|
||||
&& wwin->frame->workspace == wwin->screen_ptr->current_workspace
|
||||
&& !wwin->flags.miniaturized && !wwin->flags.hidden)
|
||||
return;
|
||||
|
||||
if (wwin->flags.ignore_next_unmap) {
|
||||
return;
|
||||
}
|
||||
XGrabServer(dpy);
|
||||
XUnmapWindow(dpy, wwin->frame->core->window);
|
||||
wwin->flags.mapped = 0;
|
||||
@@ -863,7 +868,7 @@ handleClientMessage(XEvent *event)
|
||||
wIconifyWindow(wwin);
|
||||
} else if (event->xclient.message_type == _XA_WM_COLORMAP_NOTIFY
|
||||
&& event->xclient.format == 32) {
|
||||
WScreen *scr = wScreenForRootWindow(event->xclient.window);
|
||||
WScreen *scr = wScreenSearchForRootWindow(event->xclient.window);
|
||||
|
||||
if (!scr)
|
||||
return;
|
||||
@@ -1026,7 +1031,8 @@ handleEnterNotify(XEvent *event)
|
||||
* is for the frame window and window doesn't have focus yet */
|
||||
if ((wPreferences.focus_mode==WKF_POINTER
|
||||
|| wPreferences.focus_mode==WKF_SLOPPY)
|
||||
&& wwin->frame->core->window==event->xcrossing.window) {
|
||||
&& wwin->frame->core->window==event->xcrossing.window
|
||||
&& !scr->flags.doing_alt_tab) {
|
||||
|
||||
if (!wwin->flags.focused)
|
||||
wSetFocusTo(scr, wwin);
|
||||
@@ -1238,6 +1244,161 @@ windowUnderPointer(WScreen *scr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
|
||||
static WWindow*
|
||||
nextToFocusAfter(WWindow *wwin)
|
||||
{
|
||||
WWindow *tmp = wwin->next;
|
||||
|
||||
while (tmp) {
|
||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||
|
||||
return tmp;
|
||||
}
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
tmp = wwin;
|
||||
/* start over from the beginning of the list */
|
||||
while (tmp->prev)
|
||||
tmp = tmp->prev;
|
||||
|
||||
while (tmp && tmp != wwin) {
|
||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||
|
||||
return tmp;
|
||||
}
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
return wwin;
|
||||
}
|
||||
|
||||
|
||||
static WWindow*
|
||||
nextToFocusBefore(WWindow *wwin)
|
||||
{
|
||||
WWindow *tmp = wwin->prev;
|
||||
|
||||
while (tmp) {
|
||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||
|
||||
return tmp;
|
||||
}
|
||||
tmp = tmp->prev;
|
||||
}
|
||||
|
||||
/* start over from the beginning of the list */
|
||||
tmp = wwin;
|
||||
while (tmp->next)
|
||||
tmp = tmp->next;
|
||||
|
||||
while (tmp && tmp != wwin) {
|
||||
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
|
||||
|
||||
return tmp;
|
||||
}
|
||||
tmp = tmp->prev;
|
||||
}
|
||||
|
||||
return wwin;
|
||||
}
|
||||
|
||||
static void
|
||||
doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
||||
{
|
||||
WScreen *scr = wScreenForRootWindow(event->xkey.root);
|
||||
Bool done = False;
|
||||
WWindow *newFocused;
|
||||
WWindow *oldFocused;
|
||||
int modifiers;
|
||||
XModifierKeymap *keymap;
|
||||
|
||||
if (!wwin)
|
||||
return;
|
||||
|
||||
puts("IN");
|
||||
keymap = XGetModifierMapping(dpy);
|
||||
|
||||
|
||||
XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync,
|
||||
CurrentTime);
|
||||
|
||||
if (next) {
|
||||
newFocused = nextToFocusAfter(wwin);
|
||||
} else {
|
||||
newFocused = nextToFocusBefore(wwin);
|
||||
}
|
||||
|
||||
scr->flags.doing_alt_tab = 1;
|
||||
|
||||
wWindowFocus(newFocused, scr->focused_window);
|
||||
oldFocused = newFocused;
|
||||
|
||||
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
||||
|
||||
while (!done) {
|
||||
XEvent ev;
|
||||
|
||||
WMMaskEvent(dpy,KeyPressMask|KeyReleaseMask|ExposureMask, &ev);
|
||||
/* WMNextEvent(dpy, &ev);*/
|
||||
if (ev.type != KeyRelease && ev.type != KeyPress) {
|
||||
WMHandleEvent(&ev);
|
||||
continue;
|
||||
}
|
||||
puts("EV");
|
||||
/* ignore CapsLock */
|
||||
modifiers = ev.xkey.state & ValidModMask;
|
||||
|
||||
if (ev.type == KeyPress
|
||||
&& wKeyBindings[WKBD_FOCUSNEXT].keycode == ev.xkey.keycode
|
||||
&& wKeyBindings[WKBD_FOCUSNEXT].modifier == modifiers) {
|
||||
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
newFocused = nextToFocusAfter(newFocused);
|
||||
wWindowFocus(newFocused, oldFocused);
|
||||
oldFocused = newFocused;
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
|
||||
} else if (ev.type == KeyPress
|
||||
&& wKeyBindings[WKBD_FOCUSPREV].keycode == ev.xkey.keycode
|
||||
&& wKeyBindings[WKBD_FOCUSPREV].modifier == modifiers) {
|
||||
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
newFocused = nextToFocusBefore(newFocused);
|
||||
wWindowFocus(newFocused, oldFocused);
|
||||
oldFocused = newFocused;
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
}
|
||||
if (ev.type == KeyRelease) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= 8 * keymap->max_keypermod; i++) {
|
||||
if (keymap->modifiermap[i] == ev.xkey.keycode &&
|
||||
wKeyBindings[WKBD_FOCUSNEXT].modifier
|
||||
& 1<<(i/keymap->max_keypermod)) {
|
||||
done = True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
puts("OUT");
|
||||
XFree(keymap);
|
||||
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
wSetFocusTo(scr, newFocused);
|
||||
scr->flags.doing_alt_tab = 0;
|
||||
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
||||
}
|
||||
|
||||
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
handleKeyPress(XEvent *event)
|
||||
{
|
||||
@@ -1407,21 +1568,37 @@ handleKeyPress(XEvent *event)
|
||||
}
|
||||
break;
|
||||
case WKBD_FOCUSNEXT:
|
||||
wwin = NextFocusWindow(scr);
|
||||
if (wwin != NULL) {
|
||||
wSetFocusTo(scr, wwin);
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(wwin->frame->core);
|
||||
}
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
if (wPreferences.windoze_cycling) {
|
||||
doWindozeCycle(wwin, event, True);
|
||||
} else
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
{
|
||||
wwin = NextFocusWindow(scr);
|
||||
if (wwin != NULL) {
|
||||
wSetFocusTo(scr, wwin);
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(wwin->frame->core);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WKBD_FOCUSPREV:
|
||||
wwin = PrevFocusWindow(scr);
|
||||
if (wwin != NULL) {
|
||||
wSetFocusTo(scr, wwin);
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(wwin->frame->core);
|
||||
}
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
if (wPreferences.windoze_cycling) {
|
||||
doWindozeCycle(wwin, event, False);
|
||||
} else
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
{
|
||||
wwin = PrevFocusWindow(scr);
|
||||
if (wwin != NULL) {
|
||||
wSetFocusTo(scr, wwin);
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(wwin->frame->core);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
|
||||
#define GOTOWORKS(wk) case WKBD_WORKSPACE##wk:\
|
||||
i = (scr->current_workspace/10)*10 + wk - 1;\
|
||||
@@ -1543,3 +1720,14 @@ handleMotionNotify(XEvent *event)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleVisibilityNotify(XEvent *event)
|
||||
{
|
||||
WWindow *wwin;
|
||||
|
||||
wwin = wWindowFor(event->xvisibility.window);
|
||||
if (!wwin)
|
||||
return;
|
||||
wwin->flags.obscured =
|
||||
(event->xvisibility.state == VisibilityFullyObscured);
|
||||
}
|
||||
|
||||
+18
-14
@@ -114,10 +114,13 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
int width, height;
|
||||
int i;
|
||||
WScreen *scr = fwin->screen_ptr;
|
||||
|
||||
|
||||
width = fwin->core->width;
|
||||
height = fwin->core->height - fwin->top_width - fwin->bottom_width;
|
||||
|
||||
if (flags & WFF_IS_SHADED)
|
||||
height = -1;
|
||||
else
|
||||
height = fwin->core->height - fwin->top_width - fwin->bottom_width;
|
||||
|
||||
if (flags & WFF_TITLEBAR)
|
||||
theight = (*fwin->font)->height + TITLEBAR_EXTRA_HEIGHT;
|
||||
else
|
||||
@@ -283,10 +286,11 @@ wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags)
|
||||
fwin->resizebar = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (height + fwin->top_width + fwin->bottom_width != fwin->core->height) {
|
||||
|
||||
if (height + fwin->top_width + fwin->bottom_width != fwin->core->height
|
||||
&& !(flags & WFF_IS_SHADED)) {
|
||||
wFrameWindowResize(fwin, width,
|
||||
height + fwin->top_width + fwin->bottom_width);
|
||||
height + fwin->top_width + fwin->bottom_width);
|
||||
}
|
||||
|
||||
/* setup object descriptors */
|
||||
@@ -757,14 +761,6 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
break;
|
||||
}
|
||||
|
||||
XSetForeground(dpy, *fwin->title_gc,
|
||||
fwin->title_pixel[fwin->flags.state]);
|
||||
|
||||
wDrawString(fwin->titlebar->window, *fwin->font,
|
||||
*fwin->title_gc, x,
|
||||
(*fwin->font)->y + TITLEBAR_EXTRA_HEIGHT/2, title,
|
||||
titlelen);
|
||||
|
||||
#ifdef TITLE_TEXT_SHADOW
|
||||
if(wPreferences.title_shadow){
|
||||
int shadowx,shadowy;
|
||||
@@ -781,6 +777,14 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
}
|
||||
#endif /* TITLE_TEXT_SHADOW */
|
||||
|
||||
XSetForeground(dpy, *fwin->title_gc,
|
||||
fwin->title_pixel[fwin->flags.state]);
|
||||
|
||||
wDrawString(fwin->titlebar->window, *fwin->font,
|
||||
*fwin->title_gc, x,
|
||||
(*fwin->font)->y + TITLEBAR_EXTRA_HEIGHT/2, title,
|
||||
titlelen);
|
||||
|
||||
free(title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#define WFF_BORDER (1<<4)
|
||||
#define WFF_SINGLE_STATE (1<<5)
|
||||
|
||||
#define WFF_IS_SHADED (1<<16)
|
||||
|
||||
typedef struct WFrameWindow {
|
||||
WScreen *screen_ptr; /* pointer to the screen structure */
|
||||
|
||||
|
||||
+13
-18
@@ -412,19 +412,13 @@ getnameforicon(WWindow *wwin)
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
prefix = getenv("GNUSTEP_USER_PATH");
|
||||
if (!prefix) {
|
||||
len = strlen(wgethomedir())+64+strlen(suffix);
|
||||
path = wmalloc(len+1);
|
||||
sprintf(path, "%s/GNUstep/.AppInfo", wgethomedir());
|
||||
} else {
|
||||
prefix = wexpandpath(prefix);
|
||||
len = strlen(prefix)+64+strlen(suffix);
|
||||
path = wmalloc(len+1);
|
||||
sprintf(path, "%s/.AppInfo", prefix);
|
||||
free(prefix);
|
||||
}
|
||||
|
||||
prefix = wusergnusteppath();
|
||||
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)) {
|
||||
wsyserror(_("could not create directory %s"), path);
|
||||
@@ -826,7 +820,7 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
|
||||
#ifdef DEBUG
|
||||
puts("Moving miniwindow");
|
||||
#endif
|
||||
if (event->xbutton.button==Button1) {
|
||||
if (event->xbutton.button == Button1) {
|
||||
if (event->xbutton.state & MOD_MASK)
|
||||
wLowerFrame(icon->core);
|
||||
else
|
||||
@@ -835,9 +829,7 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
|
||||
wIconSelect(icon);
|
||||
wSelectWindow(icon->owner, !wwin->flags.selected);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
else if (event->xbutton.button==Button3) {
|
||||
} else if (event->xbutton.button == Button3) {
|
||||
WObjDescriptor *desc;
|
||||
|
||||
OpenMiniwindowMenu(wwin, event->xbutton.x_root,
|
||||
@@ -850,7 +842,7 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (XGrabPointer(dpy, icon->core->window, False, ButtonMotionMask
|
||||
|ButtonReleaseMask|ButtonPressMask, GrabModeAsync,
|
||||
GrabModeAsync, None, None, CurrentTime) !=GrabSuccess) {
|
||||
@@ -901,6 +893,9 @@ miniwindowMouseDown(WObjDescriptor *desc, XEvent *event)
|
||||
puts("End miniwindow move");
|
||||
#endif
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
|
||||
if (wPreferences.auto_arrange_icons)
|
||||
wArrangeIcons(wwin->screen_ptr, True);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
@@ -1424,7 +1424,7 @@ wKWMCheckDestroy(XDestroyWindowEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
scr = wScreenForRootWindow(event->event);
|
||||
scr = wScreenSearchForRootWindow(event->event);
|
||||
if (!scr) {
|
||||
return;
|
||||
}
|
||||
|
||||
+11
-9
@@ -64,7 +64,6 @@ unsigned int ValidModMask = 0xff;
|
||||
/* locale to use. NULL==POSIX or C */
|
||||
char *Locale=NULL;
|
||||
|
||||
|
||||
int wScreenCount=0;
|
||||
|
||||
WPreferences wPreferences;
|
||||
@@ -160,7 +159,8 @@ Exit(int status)
|
||||
#ifdef XSMP_ENABLED
|
||||
wSessionDisconnectManager();
|
||||
#endif
|
||||
XCloseDisplay(dpy);
|
||||
if (dpy)
|
||||
XCloseDisplay(dpy);
|
||||
|
||||
exit(status);
|
||||
}
|
||||
@@ -369,7 +369,7 @@ main(int argc, char **argv)
|
||||
printf("Window Maker %s\n", VERSION);
|
||||
exit(0);
|
||||
} else if (strcmp(argv[i], "--global_defaults_path")==0) {
|
||||
printf("%s/Defaults/WindowMaker", PKGDATADIR);
|
||||
puts(SYSCONFDIR);
|
||||
exit(0);
|
||||
} else if (strcmp(argv[i], "-locale")==0
|
||||
|| strcmp(argv[i], "--locale")==0) {
|
||||
@@ -410,9 +410,12 @@ main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
} else if (strcmp(argv[i], "--help")==0) {
|
||||
print_help();
|
||||
exit(0);
|
||||
} else {
|
||||
printf(_("%s: invalid argument '%s'"), argv[0]);
|
||||
printf(_("Try '%s --help' for more information"), argv[0]);
|
||||
printf(_("%s: invalid argument '%s'\n"), argv[0], argv[i]);
|
||||
printf(_("Try '%s --help' for more information\n"), argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -451,7 +454,7 @@ main(int argc, char **argv)
|
||||
if (getenv("NLSPATH"))
|
||||
bindtextdomain("WindowMaker", getenv("NLSPATH"));
|
||||
else
|
||||
bindtextdomain("WindowMaker", NLSDIR);
|
||||
bindtextdomain("WindowMaker", LOCALEDIR);
|
||||
textdomain("WindowMaker");
|
||||
|
||||
if (!XSupportsLocale()) {
|
||||
@@ -490,9 +493,8 @@ main(int argc, char **argv)
|
||||
str = strchr(DisplayName, ':');
|
||||
else
|
||||
str = NULL;
|
||||
if (!str)
|
||||
str = "";
|
||||
if (sscanf(str, "%i.%i", &d, &s)==2)
|
||||
|
||||
if (str && sscanf(str, "%i.%i", &d, &s)==2)
|
||||
multiHead = False;
|
||||
|
||||
DisplayName = XDisplayName(DisplayName);
|
||||
|
||||
+7
-10
@@ -2164,15 +2164,6 @@ menuTitleMouseDown(WCoreWindow *sender, void *data, XEvent *event)
|
||||
|
||||
if (event->xbutton.button != Button1 && event->xbutton.button != Button2)
|
||||
return;
|
||||
if (XGrabPointer(dpy, menu->frame->titlebar->window, False,
|
||||
ButtonMotionMask|ButtonReleaseMask|ButtonPressMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
wCursor[WCUR_MOVE], CurrentTime)!=GrabSuccess) {
|
||||
#ifdef DEBUG0
|
||||
wwarning("pointer grab failed for menu move\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->xbutton.state & MOD_MASK) {
|
||||
wLowerFrame(menu->frame->core);
|
||||
@@ -2233,8 +2224,14 @@ menuTitleMouseDown(WCoreWindow *sender, void *data, XEvent *event)
|
||||
wMenuMove(menu, x, y, True);
|
||||
} else {
|
||||
if (abs(ev.xmotion.x_root - dx) > MOVE_THRESHOLD
|
||||
|| abs(ev.xmotion.y_root - dy) > MOVE_THRESHOLD)
|
||||
|| abs(ev.xmotion.y_root - dy) > MOVE_THRESHOLD) {
|
||||
started = True;
|
||||
XGrabPointer(dpy, menu->frame->titlebar->window, False,
|
||||
ButtonMotionMask|ButtonReleaseMask
|
||||
|ButtonPressMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
wCursor[WCUR_MOVE], CurrentTime);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
+4
-5
@@ -56,8 +56,6 @@ extern WPreferences wPreferences;
|
||||
|
||||
extern Time LastTimestamp;
|
||||
|
||||
|
||||
|
||||
#ifdef OFFIX_DND
|
||||
extern Atom _XA_DND_SELECTION;
|
||||
#endif
|
||||
@@ -191,13 +189,12 @@ MakeCPPArgs(char *path)
|
||||
#endif /* USECPP */
|
||||
|
||||
|
||||
|
||||
WWindow*
|
||||
NextFocusWindow(WScreen *scr)
|
||||
{
|
||||
WWindow *tmp, *wwin, *closest, *min;
|
||||
Window d;
|
||||
|
||||
|
||||
if (!(wwin = scr->focused_window))
|
||||
return NULL;
|
||||
tmp = wwin->prev;
|
||||
@@ -853,6 +850,7 @@ getuserinput(WScreen *scr, char *line, int *ptr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
(*ptr)--;
|
||||
#undef _STARTING
|
||||
#undef _TITLE
|
||||
#undef _PROMPT
|
||||
@@ -1309,7 +1307,7 @@ UnescapeWM_CLASS(char *str, char **name, char **class)
|
||||
{
|
||||
int i, j, k, dot;
|
||||
Bool esc;
|
||||
|
||||
|
||||
j = strlen(str);
|
||||
*name = wmalloc(j);
|
||||
**name = 0;
|
||||
@@ -1343,6 +1341,7 @@ UnescapeWM_CLASS(char *str, char **name, char **class)
|
||||
(*name)[k++] = str[i];
|
||||
}
|
||||
} else {
|
||||
(*name)[k++] = str[i];
|
||||
esc = False;
|
||||
}
|
||||
}
|
||||
|
||||
+664
-245
File diff suppressed because it is too large
Load Diff
@@ -164,8 +164,6 @@ getWindowHints(Window window, OLHints *hints)
|
||||
return False;
|
||||
}
|
||||
|
||||
printf("WINDOW TYPE %s\n", XGetAtomName(dpy, hints->winType));
|
||||
|
||||
XFree(data);
|
||||
|
||||
/* do backward compatibility stuff */
|
||||
|
||||
+24
-2
@@ -78,16 +78,28 @@ iconPosition(WCoreWindow *wcore, int sx1, int sy1, int sx2, int sy2,
|
||||
|
||||
ok = 1;
|
||||
} else if (wcore->descriptor.parent_type == WCLASS_MINIWINDOW &&
|
||||
(((WIcon*)parent)->owner->frame->workspace==workspace
|
||||
(((WIcon*)parent)->owner->frame->workspace == workspace
|
||||
|| IS_OMNIPRESENT(((WIcon*)parent)->owner)
|
||||
|| wPreferences.sticky_icons)
|
||||
&& !((WIcon*)parent)->owner->flags.hidden) {
|
||||
&& (!((WIcon*)parent)->owner->flags.hidden
|
||||
|| wcore->screen_ptr->flags.startup)) {
|
||||
|
||||
*retX = ((WIcon*)parent)->owner->icon_x;
|
||||
*retY = ((WIcon*)parent)->owner->icon_y;
|
||||
|
||||
ok = 1;
|
||||
} else if (wcore->descriptor.parent_type == WCLASS_WINDOW
|
||||
&& (((WWindow*)parent)->flags.icon_moved
|
||||
|| ((WWindow*)parent)->flags.hidden)
|
||||
&& (((WWindow*)parent)->frame->workspace == workspace
|
||||
|| IS_OMNIPRESENT((WWindow*)parent)
|
||||
|| wPreferences.sticky_icons)) {
|
||||
*retX = ((WWindow*)parent)->icon_x;
|
||||
*retY = ((WWindow*)parent)->icon_y;
|
||||
|
||||
ok = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if it is inside the screen.
|
||||
@@ -280,11 +292,16 @@ smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
test_window = test_window->next;
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
tw = test_window->client.width;
|
||||
if (test_window->flags.shaded)
|
||||
th = test_window->frame->top_width;
|
||||
else
|
||||
th = test_window->client.height + extra_height;
|
||||
#else
|
||||
tw = test_window->frame->core->width;
|
||||
th = test_window->frame->core->height;
|
||||
#endif
|
||||
tx = test_window->frame_x;
|
||||
ty = test_window->frame_y;
|
||||
|
||||
@@ -309,11 +326,16 @@ smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
test_window = test_window->prev;
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
tw = test_window->client.width;
|
||||
if (test_window->flags.shaded)
|
||||
th = test_window->frame->top_width;
|
||||
else
|
||||
th = test_window->client.height + extra_height;
|
||||
#else
|
||||
tw = test_window->frame->core->width;
|
||||
th = test_window->frame->core->height;
|
||||
#endif
|
||||
tx = test_window->frame_x;
|
||||
ty = test_window->frame_y;
|
||||
|
||||
|
||||
+2
-2
@@ -79,8 +79,8 @@ wLoadFont(char *font_name)
|
||||
}
|
||||
if (!font->font) {
|
||||
wwarning(_("could not create font set %s. Trying fixed"), font_name);
|
||||
font->font = XCreateFontSet(dpy, "fixed", &missing, &num_missing,
|
||||
&default_string);
|
||||
font->font = XCreateFontSet(dpy, "-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*",
|
||||
&missing, &num_missing, &default_string);
|
||||
if (num_missing > 0) {
|
||||
XFreeStringList(missing);
|
||||
}
|
||||
|
||||
+50
-66
@@ -325,9 +325,46 @@ legalPanelCommand(WMenu *menu, WMenuEntry *entry)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
|
||||
static char*
|
||||
getLocalizedMenuFile(char *menu)
|
||||
{
|
||||
char *buffer;
|
||||
char *ptr;
|
||||
|
||||
if (!Locale)
|
||||
return NULL;
|
||||
|
||||
buffer = wmalloc(strlen(menu)+32);
|
||||
|
||||
/* try menu.locale_name */
|
||||
sprintf(buffer, "%s.%s", menu, Locale);
|
||||
if (access(buffer, F_OK)==0) {
|
||||
return buffer;
|
||||
}
|
||||
/* check if it is in the form aa_bb.encoding and check for aa_bb */
|
||||
ptr = strchr(Locale, '.');
|
||||
if (ptr) {
|
||||
*ptr = 0;
|
||||
if (access(buffer, F_OK)==0) {
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
/* now check for aa */
|
||||
ptr = strchr(buffer, '_');
|
||||
if (ptr) {
|
||||
*ptr = 0;
|
||||
if (access(buffer, F_OK)==0) {
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
raiseMenus(WMenu *menu)
|
||||
{
|
||||
@@ -633,7 +670,6 @@ constructMenu(WMenu *menu, WMenuEntry *entry)
|
||||
i=0;
|
||||
while(path[i] != NULL) {
|
||||
char *tmp;
|
||||
Bool statted = False;
|
||||
|
||||
if (strcmp(path[i], "-noext")==0) {
|
||||
i++;
|
||||
@@ -642,40 +678,16 @@ constructMenu(WMenu *menu, WMenuEntry *entry)
|
||||
|
||||
tmp = wexpandpath(path[i]);
|
||||
free(path[i]);
|
||||
path[i] = tmp;
|
||||
lpath = getLocalizedMenuFile(tmp);
|
||||
if (lpath) {
|
||||
free(tmp);
|
||||
path[i] = lpath;
|
||||
lpath = NULL;
|
||||
} else {
|
||||
path[i] = tmp;
|
||||
}
|
||||
|
||||
if (Locale) {
|
||||
lpath = wmalloc(strlen(path[i])+32);
|
||||
|
||||
strcpy(lpath, path[i]);
|
||||
strcat(lpath, ".");
|
||||
strcat(lpath, Locale);
|
||||
if (stat(lpath, &stat_buf)<0) {
|
||||
int i;
|
||||
i = strlen(Locale);
|
||||
if (i>2) {
|
||||
lpath[strlen(lpath)-(i-2)]=0;
|
||||
if (stat(lpath, &stat_buf)==0) {
|
||||
statted = True;
|
||||
free(path[i]);
|
||||
path[i] = lpath;
|
||||
lpath = NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
statted = True;
|
||||
free(path[i]);
|
||||
path[i] = lpath;
|
||||
lpath = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (lpath) {
|
||||
free(lpath);
|
||||
lpath = NULL;
|
||||
}
|
||||
|
||||
if (statted || stat(path[i], &stat_buf)==0) {
|
||||
if (stat(path[i], &stat_buf)==0) {
|
||||
if (last < stat_buf.st_mtime)
|
||||
last = stat_buf.st_mtime;
|
||||
if (first<0)
|
||||
@@ -1508,38 +1520,10 @@ configureMenu(WScreen *scr, proplist_t definition)
|
||||
Bool menu_is_default = False;
|
||||
|
||||
/* menu definition is a string. Probably a path, so parse the file */
|
||||
|
||||
|
||||
tmp = wexpandpath(PLGetString(definition));
|
||||
|
||||
if (Locale) {
|
||||
path = wmalloc(strlen(tmp)+32);
|
||||
|
||||
strcpy(path, tmp);
|
||||
strcat(path, ".");
|
||||
strcat(path, Locale);
|
||||
|
||||
/* look for menu.xy */
|
||||
if (stat(path, &stat_buf)<0) {
|
||||
int i;
|
||||
i = strlen(Locale);
|
||||
if (i>2) {
|
||||
path[strlen(path)-(i-2)]=0;
|
||||
/* look for menu.xy_zw */
|
||||
if (stat(path, &stat_buf)<0) {
|
||||
free(path);
|
||||
/* If did not find any localized menus, try
|
||||
* only menu. This can also mean that
|
||||
* the path in WMRootMenu was already the
|
||||
* path for the localized menu (eg: menu = "menu.ab")
|
||||
*/
|
||||
path = NULL;
|
||||
}
|
||||
} else {
|
||||
free(path);
|
||||
path = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
path = getLocalizedMenuFile(tmp);
|
||||
|
||||
if (!path)
|
||||
path = wfindfile(DEF_CONFIG_PATHS, tmp);
|
||||
@@ -1555,7 +1539,7 @@ configureMenu(WScreen *scr, proplist_t definition)
|
||||
free(tmp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
if (stat(path, &stat_buf)<0) {
|
||||
wsyserror(_("could not access menu \"%s\" referenced in WMRootMenu"), path);
|
||||
free(path);
|
||||
|
||||
@@ -707,7 +707,6 @@ wScreenInit(int screen_number)
|
||||
break;
|
||||
}
|
||||
}
|
||||
RFreeStringList(formats);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,6 +293,7 @@ typedef struct _WScreen {
|
||||
unsigned int backimage_helper_launched:1;
|
||||
/* some client has issued a WM_COLORMAP_NOTIFY */
|
||||
unsigned int colormap_stuff_blocked:1;
|
||||
unsigned int doing_alt_tab:1;
|
||||
#ifdef KWM_HINTS
|
||||
unsigned int kwm_syncing_name:1;
|
||||
unsigned int kwm_syncing_count:1;
|
||||
@@ -326,6 +327,7 @@ int wScreenBringInside(WScreen *scr, int *x, int *y, int width, int height);
|
||||
/* in startup.c */
|
||||
WScreen *wScreenWithNumber(int i);
|
||||
WScreen *wScreenForRootWindow(Window window); /* window must be valid */
|
||||
WScreen *wScreenSearchForRootWindow(Window window);
|
||||
WScreen *wScreenForWindow(Window window); /* slower than above functions */
|
||||
|
||||
void wScreenFinish(WScreen *scr);
|
||||
|
||||
+2
-2
@@ -872,7 +872,7 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data)
|
||||
if (!statefile) {
|
||||
if (gsPrefix)
|
||||
free(prefix);
|
||||
wwarning(_("end of memory while saving session state"));
|
||||
wwarning(_("out of memory while saving session state"));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -880,7 +880,7 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data)
|
||||
i = 0;
|
||||
do {
|
||||
if (gsPrefix)
|
||||
sprintf(statefile, "%s/.AppInfo/WindowMaker/%l%i.state",
|
||||
sprintf(statefile, "%s/.AppInfo/WindowMaker/wmaker.%l%i.state",
|
||||
prefix, t, i);
|
||||
else
|
||||
sprintf(statefile, "%s/wmaker.%l%i.state", prefix, t, i);
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ RestoreDesktop(WScreen *scr)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (scr->helper_pid) {
|
||||
if (scr->helper_pid > 0) {
|
||||
kill(scr->helper_pid, SIGTERM);
|
||||
scr->helper_pid = 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ CommitStacking(WScreen *scr)
|
||||
* Changes the stacking order of frame.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
static void
|
||||
moveFrameToUnder(WCoreWindow *under, WCoreWindow *frame)
|
||||
{
|
||||
Window wins[2];
|
||||
|
||||
@@ -42,5 +42,4 @@ void RemakeStackList(WScreen *scr);
|
||||
|
||||
void CommitStacking(WScreen *scr);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+66
-34
@@ -206,6 +206,7 @@ catchXError(Display *dpy, XErrorEvent *error)
|
||||
static int
|
||||
handleXIO(Display *dpy)
|
||||
{
|
||||
dpy = NULL;
|
||||
Exit(0);
|
||||
return 0;
|
||||
}
|
||||
@@ -531,10 +532,11 @@ WScreen*
|
||||
wScreenWithNumber(int i)
|
||||
{
|
||||
assert(i < wScreenCount);
|
||||
|
||||
|
||||
return wScreen[i];
|
||||
}
|
||||
|
||||
|
||||
WScreen*
|
||||
wScreenForRootWindow(Window window)
|
||||
{
|
||||
@@ -559,6 +561,30 @@ wScreenForRootWindow(Window window)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
WScreen*
|
||||
wScreenSearchForRootWindow(Window window)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (wScreenCount==1)
|
||||
return wScreen[0];
|
||||
|
||||
/*
|
||||
* Since the number of heads will probably be small (normally 2),
|
||||
* it should be faster to use this than a hash table, because
|
||||
* of the overhead.
|
||||
*/
|
||||
for (i=0; i<wScreenCount; i++) {
|
||||
if (wScreen[i]->root_win == window) {
|
||||
return wScreen[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
WScreen*
|
||||
wScreenForWindow(Window window)
|
||||
{
|
||||
@@ -899,7 +925,7 @@ manageAllWindows(WScreen *scr)
|
||||
scr->flags.startup = 1;
|
||||
|
||||
/* first remove all icon windows */
|
||||
for (i=0; i<nchildren; i++) {
|
||||
for (i = 0; i < nchildren; i++) {
|
||||
if (children[i]==None)
|
||||
continue;
|
||||
|
||||
@@ -919,9 +945,10 @@ manageAllWindows(WScreen *scr)
|
||||
}
|
||||
}
|
||||
/* map all windows without OverrideRedirect */
|
||||
for (i=0; i<nchildren; i++) {
|
||||
if (children[i]==None)
|
||||
continue;
|
||||
for (i = 0; i < nchildren; i++) {
|
||||
if (children[i] == None)
|
||||
continue;
|
||||
|
||||
|
||||
#ifdef KWM_HINTS
|
||||
wKWMCheckModule(scr, children[i]);
|
||||
@@ -932,7 +959,6 @@ manageAllWindows(WScreen *scr)
|
||||
state = getState(children[i]);
|
||||
if (!wattribs.override_redirect
|
||||
&& (state>=0 || wattribs.map_state!=IsUnmapped)) {
|
||||
XUnmapWindow(dpy, children[i]);
|
||||
|
||||
if (state==WithdrawnState) {
|
||||
/* move the window far away so that it doesn't flash */
|
||||
@@ -941,7 +967,7 @@ manageAllWindows(WScreen *scr)
|
||||
}
|
||||
wwin = wManageWindow(scr, children[i]);
|
||||
if (wwin) {
|
||||
if (state==WithdrawnState) {
|
||||
if (state == WithdrawnState) {
|
||||
wwin->flags.mapped = 0;
|
||||
wClientSetState(wwin, WithdrawnState, None);
|
||||
XSelectInput(dpy, wwin->client_win, NoEventMask);
|
||||
@@ -954,40 +980,46 @@ manageAllWindows(WScreen *scr)
|
||||
wwin->flags.shaded = 0;
|
||||
wShadeWindow(wwin);
|
||||
}
|
||||
if (wwin->flags.hidden) {
|
||||
WApplication *wapp = wApplicationOf(wwin->main_window);
|
||||
wwin->flags.hidden = 0;
|
||||
if (wapp) {
|
||||
wHideApplication(wapp);
|
||||
}
|
||||
wwin->flags.ignore_next_unmap=1;
|
||||
} else {
|
||||
if (wwin->wm_hints &&
|
||||
(wwin->wm_hints->flags & StateHint) && state<0)
|
||||
state=wwin->wm_hints->initial_state;
|
||||
if (state==IconicState) {
|
||||
/* iconify if it's not a transient */
|
||||
if (wwin->transient_for==None
|
||||
|| wwin->transient_for==wwin->client_win
|
||||
|| !windowInList(wwin->transient_for,
|
||||
children, nchildren)) {
|
||||
wwin->flags.miniaturized = 0;
|
||||
wIconifyWindow(wwin);
|
||||
wwin->flags.ignore_next_unmap=1;
|
||||
}
|
||||
} else {
|
||||
wClientSetState(wwin, NormalState, None);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wwin->wm_hints &&
|
||||
(wwin->wm_hints->flags & StateHint) && state < 0)
|
||||
state = wwin->wm_hints->initial_state;
|
||||
|
||||
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) {
|
||||
if (state == WithdrawnState) {
|
||||
/* move the window back to it's old position */
|
||||
XMoveWindow(dpy, children[i], wattribs.x, wattribs.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
XUngrabServer(dpy);
|
||||
|
||||
/* hide apps */
|
||||
wwin = scr->focused_window;
|
||||
while (wwin) {
|
||||
if (wwin->flags.hidden) {
|
||||
WApplication *wapp = wApplicationOf(wwin->main_window);
|
||||
|
||||
if (wapp) {
|
||||
wwin->flags.hidden = 0;
|
||||
wHideApplication(wapp);
|
||||
} else {
|
||||
wwin->flags.hidden = 0;
|
||||
}
|
||||
}
|
||||
wwin = wwin->prev;
|
||||
}
|
||||
|
||||
XFree(children);
|
||||
scr->flags.startup = 0;
|
||||
scr->flags.startup2 = 1;
|
||||
|
||||
+4
-3
@@ -182,8 +182,8 @@ DoKaboom(WScreen *scr, Window win, int x, int y)
|
||||
while (k>0) {
|
||||
XEvent foo;
|
||||
|
||||
if (XCheckTypedWindowEvent(dpy, scr->root_win, ButtonPressMask,
|
||||
&foo)) {
|
||||
if (XCheckTypedEvent(dpy, ButtonPress, &foo)) {
|
||||
XPutBackEvent(dpy, &foo);
|
||||
XClearWindow(dpy, scr->root_win);
|
||||
break;
|
||||
}
|
||||
@@ -256,6 +256,7 @@ DoKaboom(WScreen *scr, Window win, int x, int y)
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
XFreePixmap(dpy, tmp);
|
||||
}
|
||||
#endif /* !DEMATERIALIZE_ICON */
|
||||
@@ -510,7 +511,7 @@ InitXThing(WScreen *scr)
|
||||
if ((l->tm_mon!=12||l->tm_mday<24||l->tm_mday>26)) {
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
if (!loadData(scr))
|
||||
return False;
|
||||
|
||||
|
||||
@@ -162,10 +162,7 @@ menuIndexForWindow(WMenu *menu, WWindow *wwin, int old_pos)
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Update switch menu
|
||||
*
|
||||
*
|
||||
*/
|
||||
void
|
||||
UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
@@ -317,7 +314,6 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
entry->flags.indicator_on = wwin->flags.focused;
|
||||
entry->flags.indicator_type = MI_DIAMOND;
|
||||
}
|
||||
wMenuPaint(switchmenu);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
+22
-6
@@ -37,6 +37,15 @@
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* undefine WEENDOZE_CYCLING to remove all Windoze style Alt-Tab cycling
|
||||
* If define, windoze cycling must still be enabled with the
|
||||
* WindozeCycling = YES and FinishedCyclingKey = Meta_L options
|
||||
|
||||
not working yet
|
||||
*/
|
||||
#undef WEENDOZE_CYCLING
|
||||
|
||||
|
||||
/* undefine ANIMATIONS if you don't want animations for iconification,
|
||||
* shading, icon arrangement etc. */
|
||||
#define ANIMATIONS
|
||||
@@ -169,6 +178,10 @@
|
||||
*/
|
||||
#undef SHADOW_RESIZEBAR
|
||||
|
||||
/*
|
||||
* Titlebar text shadow
|
||||
*/
|
||||
#undef TITLE_TEXT_SHADOW
|
||||
|
||||
/*
|
||||
* Define DEMATERIALIZE_ICON if you want the undocked icon animation
|
||||
@@ -263,12 +276,8 @@
|
||||
#define DEF_APPMENU_X 10
|
||||
#define DEF_APPMENU_Y 10
|
||||
|
||||
/* number of window shortcuts */
|
||||
#ifdef EXTEND_WINDOWSHORTCUT
|
||||
# define MAX_WINDOW_SHORTCUTS 10
|
||||
#else
|
||||
# define MAX_WINDOW_SHORTCUTS 4
|
||||
#endif
|
||||
/* calculate window edge resistance from edge resistance */
|
||||
#define WIN_RESISTANCE(x) (((x)*20)/30)
|
||||
|
||||
/* Window level where icons reside */
|
||||
#define NORMAL_ICON_LEVEL WMNormalLevel
|
||||
@@ -449,6 +458,13 @@
|
||||
*/
|
||||
|
||||
|
||||
/* number of window shortcuts */
|
||||
#ifdef EXTEND_WINDOWSHORTCUT
|
||||
# define MAX_WINDOW_SHORTCUTS 10
|
||||
#else
|
||||
# define MAX_WINDOW_SHORTCUTS 4
|
||||
#endif
|
||||
|
||||
|
||||
#define WM_PI 3.14159265358979323846
|
||||
|
||||
|
||||
+22
-6
@@ -37,6 +37,15 @@
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* undefine WEENDOZE_CYCLING to remove all Windoze style Alt-Tab cycling
|
||||
* If define, windoze cycling must still be enabled with the
|
||||
* WindozeCycling = YES and FinishedCyclingKey = Meta_L options
|
||||
|
||||
not working yet
|
||||
*/
|
||||
#undef WEENDOZE_CYCLING
|
||||
|
||||
|
||||
/* undefine ANIMATIONS if you don't want animations for iconification,
|
||||
* shading, icon arrangement etc. */
|
||||
#define ANIMATIONS
|
||||
@@ -169,6 +178,10 @@
|
||||
*/
|
||||
#undef SHADOW_RESIZEBAR
|
||||
|
||||
/*
|
||||
* Titlebar text shadow
|
||||
*/
|
||||
#undef TITLE_TEXT_SHADOW
|
||||
|
||||
/*
|
||||
* Define DEMATERIALIZE_ICON if you want the undocked icon animation
|
||||
@@ -263,12 +276,8 @@
|
||||
#define DEF_APPMENU_X 10
|
||||
#define DEF_APPMENU_Y 10
|
||||
|
||||
/* number of window shortcuts */
|
||||
#ifdef EXTEND_WINDOWSHORTCUT
|
||||
# define MAX_WINDOW_SHORTCUTS 10
|
||||
#else
|
||||
# define MAX_WINDOW_SHORTCUTS 4
|
||||
#endif
|
||||
/* calculate window edge resistance from edge resistance */
|
||||
#define WIN_RESISTANCE(x) (((x)*20)/30)
|
||||
|
||||
/* Window level where icons reside */
|
||||
#define NORMAL_ICON_LEVEL WMNormalLevel
|
||||
@@ -449,6 +458,13 @@
|
||||
*/
|
||||
|
||||
|
||||
/* number of window shortcuts */
|
||||
#ifdef EXTEND_WINDOWSHORTCUT
|
||||
# define MAX_WINDOW_SHORTCUTS 10
|
||||
#else
|
||||
# define MAX_WINDOW_SHORTCUTS 4
|
||||
#endif
|
||||
|
||||
|
||||
#define WM_PI 3.14159265358979323846
|
||||
|
||||
|
||||
+124
-66
@@ -1,4 +1,4 @@
|
||||
/* window.c - client window managing class
|
||||
/* window.c - client window managing stuffs
|
||||
*
|
||||
* Window Maker window manager
|
||||
*
|
||||
@@ -500,7 +500,7 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|
||||
/* mutex. */
|
||||
XGrabServer(dpy);
|
||||
XSync(dpy, 0);
|
||||
XSync(dpy, False);
|
||||
/* make sure the window is still there */
|
||||
if (!XGetWindowAttributes(dpy, window, &wattribs)) {
|
||||
XUngrabServer(dpy);
|
||||
@@ -557,6 +557,7 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|
||||
wwin->old_border_width = wattribs.border_width;
|
||||
|
||||
wwin->event_mask = CLIENT_EVENTS;
|
||||
attribs.event_mask = CLIENT_EVENTS;
|
||||
attribs.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask;
|
||||
attribs.save_under = False;
|
||||
@@ -566,7 +567,7 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|
||||
/* get hints from GNUstep app */
|
||||
if (!PropGetGNUstepWMAttr(window, &wwin->wm_gnustep_attr)) {
|
||||
wwin->wm_gnustep_attr=NULL;
|
||||
wwin->wm_gnustep_attr = NULL;
|
||||
}
|
||||
|
||||
wwin->client_leader = PropGetClientLeader(window);
|
||||
@@ -626,7 +627,6 @@ wManageWindow(WScreen *scr, Window window)
|
||||
/* get colormap windows */
|
||||
GetColormapWindows(wwin);
|
||||
|
||||
|
||||
/*
|
||||
*--------------------------------------------------
|
||||
*
|
||||
@@ -640,7 +640,7 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|
||||
#ifdef OLWM_HINTS
|
||||
if (wwin->client_flags.olwm_transient && wwin->transient_for==None
|
||||
&& wwin->group_id!=None && wwin->group_id != window) {
|
||||
&& wwin->group_id != None && wwin->group_id != window) {
|
||||
|
||||
transientOwner = wWindowFor(wwin->group_id);
|
||||
|
||||
@@ -860,9 +860,16 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|
||||
wwin->frame->on_mousedown_resizebar = resizebarMouseDown;
|
||||
|
||||
|
||||
XSelectInput(dpy, wwin->client_win,
|
||||
wwin->event_mask & ~StructureNotifyMask);
|
||||
|
||||
XReparentWindow(dpy, wwin->client_win, wwin->frame->core->window,
|
||||
0, wwin->frame->top_width);
|
||||
|
||||
XSelectInput(dpy, wwin->client_win, wwin->event_mask);
|
||||
|
||||
|
||||
{
|
||||
int gx, gy;
|
||||
|
||||
@@ -872,7 +879,6 @@ wManageWindow(WScreen *scr, Window window)
|
||||
if (gy > 0)
|
||||
y -= wwin->frame->top_width + wwin->frame->bottom_width;
|
||||
}
|
||||
|
||||
/*
|
||||
* wWindowConfigure() will init the client window's size
|
||||
* (wwin->client.{width,height}) and all other geometry
|
||||
@@ -880,13 +886,16 @@ wManageWindow(WScreen *scr, Window window)
|
||||
*/
|
||||
wWindowConfigure(wwin, x, y, width, height);
|
||||
|
||||
/* to make sure the window receives it's new position after reparenting */
|
||||
wWindowSynthConfigureNotify(wwin);
|
||||
|
||||
/*
|
||||
*--------------------------------------------------
|
||||
*
|
||||
* Setup descriptors and save window to internal
|
||||
* lists
|
||||
*
|
||||
*--------------------------------------------------
|
||||
*--------------------------------------------------
|
||||
*/
|
||||
|
||||
if (wwin->main_window!=None) {
|
||||
@@ -932,11 +941,12 @@ 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 && (workspace == scr->current_workspace
|
||||
|| IS_OMNIPRESENT(wwin))
|
||||
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)) {
|
||||
|
||||
/* The following "if" is to avoid crashing of clients that expect
|
||||
* WM_STATE set before they get mapped. Else WM_STATE is set later,
|
||||
* after the return from this function.
|
||||
@@ -952,11 +962,12 @@ 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
|
||||
&& wWindowObscuresWindow(wwin, scr->focused_window)
|
||||
&& (_WIDTH(wwin) > (_WIDTH(scr->focused_window)*5)/3
|
||||
|| _HEIGHT(wwin) > (_HEIGHT(scr->focused_window)*5)/3)
|
||||
&& WINDOW_LEVEL(scr->focused_window) == WINDOW_LEVEL(wwin)) {
|
||||
&& !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)
|
||||
&& WINDOW_LEVEL(scr->focused_window) == WINDOW_LEVEL(wwin))
|
||||
|| wwin->flags.maximized)) {
|
||||
MoveInStackListUnder(scr->focused_window->frame->core,
|
||||
wwin->frame->core);
|
||||
}
|
||||
@@ -985,11 +996,8 @@ wManageWindow(WScreen *scr, Window window)
|
||||
|| wPreferences.auto_focus)) {
|
||||
DoWindowBirth(wwin);
|
||||
}
|
||||
XMapSubwindows(dpy, wwin->frame->core->window);
|
||||
|
||||
wWindowMap(wwin);
|
||||
} else {
|
||||
XMapSubwindows(dpy, wwin->frame->core->window);
|
||||
}
|
||||
|
||||
/* setup stacking descriptor */
|
||||
@@ -1031,7 +1039,7 @@ wManageWindow(WScreen *scr, Window window)
|
||||
#endif
|
||||
|
||||
XUngrabServer(dpy);
|
||||
|
||||
|
||||
/*
|
||||
*--------------------------------------------------
|
||||
*
|
||||
@@ -1043,12 +1051,11 @@ wManageWindow(WScreen *scr, Window window)
|
||||
wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED);
|
||||
|
||||
|
||||
if (!wwin->flags.miniaturized && workspace == scr->current_workspace) {
|
||||
if (!wwin->flags.miniaturized && workspace == scr->current_workspace
|
||||
&& !wwin->flags.hidden) {
|
||||
if ((transientOwner && transientOwner->flags.focused)
|
||||
|| wPreferences.auto_focus)
|
||||
wSetFocusTo(scr, wwin);
|
||||
} else {
|
||||
wwin->flags.ignore_next_unmap = 1;
|
||||
}
|
||||
wWindowResetMouseGrabs(wwin);
|
||||
|
||||
@@ -1061,13 +1068,6 @@ wManageWindow(WScreen *scr, Window window)
|
||||
#ifdef KWM_HINTS
|
||||
wKWMSendEventMessage(wwin, WKWMAddWindow);
|
||||
#endif
|
||||
/*
|
||||
* Prevent window withdrawal when getting the
|
||||
* unmap notifies generated during reparenting
|
||||
*/
|
||||
wwin->flags.mapped = 0;
|
||||
|
||||
XSync(dpy, 0);
|
||||
|
||||
wColormapInstallForWindow(wwin->screen_ptr, scr->cmap_window);
|
||||
|
||||
@@ -1325,7 +1325,7 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
||||
scr->focused_window = wwin->prev;
|
||||
scr->focused_window->next = NULL;
|
||||
}
|
||||
|
||||
|
||||
/* if in click to focus mode and the window
|
||||
* was a transient, focus the owner window
|
||||
*/
|
||||
@@ -1395,34 +1395,17 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wWindowFocus(WWindow *wwin)
|
||||
{
|
||||
#ifdef KEEP_XKB_LOCK_STATUS
|
||||
if (wPreferences.modelock) {
|
||||
if (!wwin->flags.focused) {
|
||||
XkbLockGroup(dpy, XkbUseCoreKbd, wwin->languagemode);
|
||||
}
|
||||
}
|
||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||
|
||||
wFrameWindowChangeState(wwin->frame, WS_FOCUSED);
|
||||
|
||||
wwin->flags.focused=1;
|
||||
|
||||
wWindowResetMouseGrabs(wwin);
|
||||
|
||||
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wWindowMap(WWindow *wwin)
|
||||
{
|
||||
XMapWindow(dpy, wwin->frame->core->window);
|
||||
if (!wwin->flags.shaded) {
|
||||
/* window will be remapped when getting MapNotify */
|
||||
XSelectInput(dpy, wwin->client_win,
|
||||
wwin->event_mask & ~StructureNotifyMask);
|
||||
XMapWindow(dpy, wwin->client_win);
|
||||
XSelectInput(dpy, wwin->client_win, wwin->event_mask);
|
||||
|
||||
wwin->flags.mapped = 1;
|
||||
}
|
||||
}
|
||||
@@ -1431,21 +1414,84 @@ wWindowMap(WWindow *wwin)
|
||||
void
|
||||
wWindowUnmap(WWindow *wwin)
|
||||
{
|
||||
XWindowAttributes attribs;
|
||||
|
||||
XGetWindowAttributes(dpy, wwin->client_win, &attribs);
|
||||
wwin->flags.mapped = 0;
|
||||
|
||||
/* prevent window withdrawal when getting UnmapNotify */
|
||||
XSelectInput(dpy, wwin->client_win,
|
||||
attribs.your_event_mask & ~StructureNotifyMask);
|
||||
XSelectInput(dpy, wwin->client_win,
|
||||
wwin->event_mask & ~StructureNotifyMask);
|
||||
XUnmapWindow(dpy, wwin->client_win);
|
||||
XSelectInput(dpy, wwin->client_win, attribs.your_event_mask);
|
||||
XSelectInput(dpy, wwin->client_win, wwin->event_mask);
|
||||
|
||||
XUnmapWindow(dpy, wwin->frame->core->window);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
wWindowFocus(WWindow *wwin, WWindow *owin)
|
||||
{
|
||||
WWindow *nowner;
|
||||
WWindow *oowner;
|
||||
|
||||
#ifdef KEEP_XKB_LOCK_STATUS
|
||||
if (wPreferences.modelock) {
|
||||
if (!wwin->flags.focused) {
|
||||
XkbLockGroup(dpy, XkbUseCoreKbd, wwin->languagemode);
|
||||
}
|
||||
}
|
||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||
|
||||
wwin->flags.semi_focused = 0;
|
||||
|
||||
wFrameWindowChangeState(wwin->frame, WS_FOCUSED);
|
||||
|
||||
wWindowResetMouseGrabs(wwin);
|
||||
|
||||
wwin->flags.focused = 1;
|
||||
|
||||
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
||||
|
||||
if (owin == wwin || !owin)
|
||||
return;
|
||||
|
||||
nowner = wWindowFor(wwin->transient_for);
|
||||
|
||||
/* new window is a transient for the old window */
|
||||
if (nowner == owin) {
|
||||
owin->flags.semi_focused = 1;
|
||||
wWindowUnfocus(nowner);
|
||||
return;
|
||||
}
|
||||
|
||||
/* new window is owner of old window */
|
||||
if (wwin == oowner) {
|
||||
wWindowUnfocus(owin);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nowner) {
|
||||
wWindowUnfocus(owin);
|
||||
return;
|
||||
}
|
||||
|
||||
/* new window has same owner of old window */
|
||||
oowner = wWindowFor(owin->transient_for);
|
||||
if (oowner == nowner) {
|
||||
/* prevent unfocusing of owner */
|
||||
oowner->flags.semi_focused = 0;
|
||||
wWindowUnfocus(owin);
|
||||
oowner->flags.semi_focused = 1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* nowner != NULL && oowner != nowner */
|
||||
nowner->flags.semi_focused = 1;
|
||||
wWindowUnfocus(nowner);
|
||||
wWindowUnfocus(owin);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wWindowUnfocus(WWindow *wwin)
|
||||
{
|
||||
@@ -1477,7 +1523,7 @@ wWindowUnfocus(WWindow *wwin)
|
||||
}
|
||||
}
|
||||
}
|
||||
wwin->flags.focused=0;
|
||||
wwin->flags.focused = 0;
|
||||
wWindowResetMouseGrabs(wwin);
|
||||
|
||||
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
|
||||
@@ -1591,19 +1637,29 @@ wWindowChangeWorkspace(WWindow *wwin, int workspace)
|
||||
|
||||
if (workspace != scr->current_workspace) {
|
||||
/* Sent to other workspace. Unmap window */
|
||||
if ((wwin->flags.mapped||wwin->flags.shaded)
|
||||
if ((wwin->flags.mapped
|
||||
|| wwin->flags.shaded
|
||||
|| (wwin->flags.miniaturized && !wPreferences.sticky_icons))
|
||||
&& !IS_OMNIPRESENT(wwin) && !wwin->flags.changing_workspace) {
|
||||
|
||||
|
||||
wapp = wApplicationOf(wwin->main_window);
|
||||
if (wapp) {
|
||||
wapp->last_workspace = workspace;
|
||||
}
|
||||
unmap = 1;
|
||||
wSetFocusTo(scr, NULL);
|
||||
if (wwin->flags.miniaturized) {
|
||||
XUnmapWindow(dpy, wwin->icon->core->window);
|
||||
wwin->icon->mapped = 0;
|
||||
} else {
|
||||
unmap = 1;
|
||||
wSetFocusTo(scr, NULL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* brought to current workspace. Map window */
|
||||
if (!wwin->flags.mapped &&
|
||||
if (wwin->flags.miniaturized && !wPreferences.sticky_icons) {
|
||||
XMapWindow(dpy, wwin->icon->core->window);
|
||||
wwin->icon->mapped = 1;
|
||||
} else if (!wwin->flags.mapped &&
|
||||
!(wwin->flags.miniaturized || wwin->flags.hidden)) {
|
||||
wWindowMap(wwin);
|
||||
}
|
||||
@@ -1893,23 +1949,25 @@ wWindowConfigureBorders(WWindow *wwin)
|
||||
if (wwin->frame) {
|
||||
int flags;
|
||||
int newy, oldh;
|
||||
|
||||
|
||||
flags = WFF_LEFT_BUTTON|WFF_RIGHT_BUTTON;
|
||||
if (!WFLAGP(wwin, no_titlebar))
|
||||
flags |= WFF_TITLEBAR;
|
||||
if (!WFLAGP(wwin, no_resizebar))
|
||||
flags |= WFF_RESIZEBAR;
|
||||
if (wwin->flags.shaded)
|
||||
flags |= WFF_IS_SHADED;
|
||||
|
||||
oldh = wwin->frame->top_width;
|
||||
wFrameWindowUpdateBorders(wwin->frame, flags);
|
||||
if (oldh != wwin->frame->top_width) {
|
||||
newy = wwin->frame_y + oldh - wwin->frame->top_width;
|
||||
|
||||
|
||||
XMoveWindow(dpy, wwin->client_win, 0, wwin->frame->top_width);
|
||||
wWindowConfigure(wwin, wwin->frame_x, newy,
|
||||
wwin->client.width, wwin->client.height);
|
||||
}
|
||||
|
||||
|
||||
flags = 0;
|
||||
if (!WFLAGP(wwin, no_miniaturize_button)
|
||||
&& wwin->frame->flags.hide_left_button)
|
||||
|
||||
+7
-4
@@ -45,7 +45,7 @@
|
||||
|
||||
#define CLIENT_EVENTS (StructureNotifyMask | PropertyChangeMask\
|
||||
| EnterWindowMask | LeaveWindowMask | ColormapChangeMask \
|
||||
| FocusChangeMask)
|
||||
| FocusChangeMask | VisibilityChangeMask)
|
||||
|
||||
typedef enum {
|
||||
WFM_PASSIVE, WFM_NO_INPUT, WFM_LOCALLY_ACTIVE, WFM_GLOBALLY_ACTIVE
|
||||
@@ -224,6 +224,8 @@ typedef struct WWindow {
|
||||
struct WOLWindowState ol_window_state;
|
||||
#endif
|
||||
|
||||
long event_mask; /* the event mask thats selected */
|
||||
|
||||
#ifdef MONITOR_HEARTBEAT
|
||||
time_t last_beat;
|
||||
#endif
|
||||
@@ -252,19 +254,20 @@ typedef struct WWindow {
|
||||
* window next time it's painted */
|
||||
unsigned int icon_moved:1; /* icon for this window was moved
|
||||
* by the user */
|
||||
unsigned int ignore_next_unmap:1;
|
||||
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 destroyed:1; /* window was already destroyed */
|
||||
|
||||
unsigned int menu_open_for_me:1; /* window commands menu */
|
||||
|
||||
unsigned int waiting_save_ack:1; /* waiting for SAVE_YOURSELF ack */
|
||||
|
||||
unsigned int obscured:1; /* window is obscured */
|
||||
#ifdef KWM_HINTS
|
||||
unsigned int kwm_hidden_for_modules:1;
|
||||
#endif
|
||||
@@ -328,7 +331,7 @@ WWindow *wManageWindow(WScreen *scr, Window window);
|
||||
|
||||
void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed);
|
||||
|
||||
void wWindowFocus(WWindow *wwin);
|
||||
void wWindowFocus(WWindow *wwin, WWindow *owin);
|
||||
void wWindowUnfocus(WWindow *wwin);
|
||||
void wWindowConstrainSize(WWindow *wwin, int *nwidth, int *nheight);
|
||||
void wWindowConfigure(WWindow *wwin, int req_x, int req_y,
|
||||
|
||||
+12
-4
@@ -43,6 +43,7 @@
|
||||
#include "winspector.h"
|
||||
#include "dialog.h"
|
||||
#include "stacking.h"
|
||||
#include "icon.h"
|
||||
|
||||
#define MC_MAXIMIZE 0
|
||||
#define MC_MINIATURIZE 1
|
||||
@@ -157,7 +158,10 @@ execMenuCommand(WMenu *menu, WMenuEntry *entry)
|
||||
break;
|
||||
|
||||
case MC_SELECT:
|
||||
wSelectWindow(wwin, !wwin->flags.selected);
|
||||
if (!wwin->flags.miniaturized)
|
||||
wSelectWindow(wwin, !wwin->flags.selected);
|
||||
else
|
||||
wIconSelect(wwin->icon);
|
||||
break;
|
||||
|
||||
case MC_MOVERESIZE:
|
||||
@@ -308,11 +312,13 @@ updateOptionsMenu(WMenu *menu, WWindow *wwin)
|
||||
smenu->entries[WO_KEEP_ON_TOP]->clientdata = wwin;
|
||||
smenu->entries[WO_KEEP_ON_TOP]->flags.indicator_on =
|
||||
(wwin->frame->core->stacking->window_level == WMFloatingLevel)?1:0;
|
||||
wMenuSetEnabled(smenu, WO_KEEP_ON_TOP, !wwin->flags.miniaturized);
|
||||
|
||||
/* keep at bottom check */
|
||||
smenu->entries[WO_KEEP_AT_BOTTOM]->clientdata = wwin;
|
||||
smenu->entries[WO_KEEP_AT_BOTTOM]->flags.indicator_on =
|
||||
(wwin->frame->core->stacking->window_level == WMSunkenLevel)?1:0;
|
||||
wMenuSetEnabled(smenu, WO_KEEP_AT_BOTTOM, !wwin->flags.miniaturized);
|
||||
|
||||
/* omnipresent check */
|
||||
smenu->entries[WO_OMNIPRESENT]->clientdata = wwin;
|
||||
@@ -552,8 +558,11 @@ updateMenuForWindow(WMenu *menu, WWindow *wwin)
|
||||
|
||||
menu->entries[MC_MAXIMIZE]->text = text;
|
||||
}
|
||||
wMenuSetEnabled(menu, MC_MAXIMIZE, !WFLAGP(wwin, no_resizable));
|
||||
|
||||
wMenuSetEnabled(menu, MC_MOVERESIZE, !WFLAGP(wwin, no_resizable));
|
||||
|
||||
wMenuSetEnabled(menu, MC_MOVERESIZE, !WFLAGP(wwin, no_resizable)
|
||||
&& !wwin->flags.miniaturized);
|
||||
|
||||
if (wwin->flags.shaded) {
|
||||
static char *text = NULL;
|
||||
@@ -637,7 +646,6 @@ OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard)
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
void
|
||||
OpenMiniwindowMenu(WWindow *wwin, int x, int y)
|
||||
{
|
||||
@@ -671,4 +679,4 @@ OpenMiniwindowMenu(WWindow *wwin, int x, int y)
|
||||
|
||||
wMenuMapAt(menu, x, y, False);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+15
-14
@@ -169,7 +169,7 @@ destroyInspector(WCoreWindow *foo, void *data, XEvent *event)
|
||||
|
||||
WMRemoveNotificationObserver(panel);
|
||||
|
||||
panel->frame->flags.mapped = 0;
|
||||
wWindowUnmap(panel->frame);
|
||||
wUnmanageWindow(panel->frame, True, False);
|
||||
|
||||
freeInspector(panel);
|
||||
@@ -987,6 +987,7 @@ createInspectorForWindow(WWindow *wwin)
|
||||
WMPixmap *pixmap;
|
||||
#endif
|
||||
panel = wmalloc(sizeof(InspectorPanel));
|
||||
memset(panel, 0, sizeof(InspectorPanel));
|
||||
|
||||
panel->destroyed = 0;
|
||||
|
||||
@@ -1114,27 +1115,27 @@ createInspectorForWindow(WWindow *wwin)
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
caption = _("Disable titlebar");
|
||||
caption = _("Disable Titlebar");
|
||||
flag = WFLAGP(wwin, no_titlebar);
|
||||
break;
|
||||
case 1:
|
||||
caption = _("Disable resizebar");
|
||||
caption = _("Disable Resizebar");
|
||||
flag = WFLAGP(wwin, no_resizebar);
|
||||
break;
|
||||
case 2:
|
||||
caption = _("Disable close button");
|
||||
caption = _("Disable Close Button");
|
||||
flag = WFLAGP(wwin, no_close_button);
|
||||
break;
|
||||
case 3:
|
||||
caption = _("Disable miniaturize button");
|
||||
caption = _("Disable Miniaturize Button");
|
||||
flag = WFLAGP(wwin, no_miniaturize_button);
|
||||
break;
|
||||
case 4:
|
||||
caption = _("Keep on top / floating");
|
||||
caption = _("Keep on Top / Floating");
|
||||
flag = WFLAGP(wwin, floating);
|
||||
break;
|
||||
case 5:
|
||||
caption = _("Keep at bottom / sunken");
|
||||
caption = _("Keep at Bottom / Sunken");
|
||||
flag = WFLAGP(wwin, sunken);
|
||||
break;
|
||||
case 6:
|
||||
@@ -1150,7 +1151,7 @@ createInspectorForWindow(WWindow *wwin)
|
||||
flag = WFLAGP(wwin, start_maximized!=0);
|
||||
break;
|
||||
case 9:
|
||||
caption = _("Skip window list");
|
||||
caption = _("Skip Window List");
|
||||
flag = WFLAGP(wwin, skip_window_list);
|
||||
break;
|
||||
}
|
||||
@@ -1178,19 +1179,19 @@ createInspectorForWindow(WWindow *wwin)
|
||||
flag = WFLAGP(wwin, no_hide_others);
|
||||
break;
|
||||
case 1:
|
||||
caption = _("Don't bind keyboard shortcuts");
|
||||
caption = _("Don't Bind Keyboard Shortcuts");
|
||||
flag = WFLAGP(wwin, no_bind_keys);
|
||||
break;
|
||||
case 2:
|
||||
caption = _("Don't bind mouse clicks");
|
||||
caption = _("Don't Bind Mouse Clicks");
|
||||
flag = WFLAGP(wwin, no_bind_mouse);
|
||||
break;
|
||||
case 3:
|
||||
caption = _("Keep inside screen");
|
||||
caption = _("Keep Inside Screen");
|
||||
flag = WFLAGP(wwin, dont_move_off);
|
||||
break;
|
||||
case 4:
|
||||
caption = _("Don't let it take focus");
|
||||
caption = _("Don't Let It Take Focus");
|
||||
flag = WFLAGP(wwin, no_focusable);
|
||||
break;
|
||||
case 5:
|
||||
@@ -1254,7 +1255,7 @@ createInspectorForWindow(WWindow *wwin)
|
||||
panel->fileLbl = WMCreateLabel(panel->iconFrm);
|
||||
WMMoveWidget(panel->fileLbl, 20, 95);
|
||||
WMResizeWidget(panel->fileLbl, PWIDTH - (2 * 15) - (2 * 20), 14);
|
||||
WMSetLabelText(panel->fileLbl, _("Icon file name:"));
|
||||
WMSetLabelText(panel->fileLbl, _("Icon File Name:"));
|
||||
|
||||
panel->fileText = WMCreateTextField(panel->iconFrm);
|
||||
WMMoveWidget(panel->fileText, 20, 115);
|
||||
@@ -1326,7 +1327,7 @@ createInspectorForWindow(WWindow *wwin)
|
||||
flag = WFLAGP(wapp->main_window_desc, start_hidden);
|
||||
break;
|
||||
case 1:
|
||||
caption = _("No application icon");
|
||||
caption = _("No Application Icon");
|
||||
flag = WFLAGP(wapp->main_window_desc, no_appicon);
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -252,7 +252,7 @@ wWorkspaceRelativeChange(WScreen *scr, int amount)
|
||||
if (w < scr->workspace_count)
|
||||
wWorkspaceChange(scr, w);
|
||||
else if (wPreferences.ws_advance)
|
||||
wWorkspaceChange(scr, WMAX(w, MAX_WORKSPACES-1));
|
||||
wWorkspaceChange(scr, WMIN(w, MAX_WORKSPACES-1));
|
||||
else if (wPreferences.ws_cycle)
|
||||
wWorkspaceChange(scr, w % scr->workspace_count);
|
||||
}
|
||||
@@ -283,7 +283,7 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
wWorkspaceMenuUpdate(scr, scr->clip_ws_menu);
|
||||
|
||||
if ((tmp = scr->focused_window)!= NULL) {
|
||||
if (IS_OMNIPRESENT(tmp))
|
||||
if (IS_OMNIPRESENT(tmp) || tmp->flags.changing_workspace)
|
||||
foc = tmp;
|
||||
|
||||
while (tmp) {
|
||||
@@ -401,7 +401,7 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
#ifdef KWM_HINTS
|
||||
wKWMUpdateCurrentWorkspaceHint(scr);
|
||||
#endif
|
||||
XSync(dpy, False);
|
||||
/* XSync(dpy, False); */
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user