mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 12:54:20 +01:00
fixed bug with icons of different sizes
made Apply work in window inspector for windows with no WM_CLASS
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
@@ -46,9 +46,10 @@ AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_FLAG =
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
@@ -206,8 +207,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
@@ -328,7 +329,7 @@ uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) config.h
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
@@ -423,6 +423,7 @@ typedef struct WPreferences {
|
||||
unsigned int noclip:1; /* don't display the clip */
|
||||
unsigned int nocpp:1; /* don't use cpp */
|
||||
unsigned int noupdates:1; /* don't require ~/GNUstep (-static) */
|
||||
unsigned int noautolaunch:1; /* don't autolaunch apps */
|
||||
} flags; /* internal flags */
|
||||
} WPreferences;
|
||||
|
||||
|
||||
@@ -469,14 +469,13 @@ wMaximizeWindow(WWindow *wwin, int directions)
|
||||
|
||||
new_height = (usableArea.y2-usableArea.y1)-FRAME_BORDER_WIDTH*2;
|
||||
new_y = usableArea.y1;
|
||||
if (WFLAGP(wwin, full_maximize))
|
||||
new_y -= wwin->frame->top_width;
|
||||
|
||||
if (WFLAGP(wwin, full_maximize)) {
|
||||
new_y -= wwin->frame->top_width - 1;
|
||||
new_height += wwin->frame->bottom_width - 3;
|
||||
}
|
||||
} else {
|
||||
|
||||
new_y = wwin->frame_y;
|
||||
new_height = wwin->frame->core->height;
|
||||
|
||||
}
|
||||
|
||||
if (!WFLAGP(wwin, full_maximize)) {
|
||||
|
||||
@@ -109,6 +109,10 @@
|
||||
* set by configure */
|
||||
#undef SHAPE
|
||||
|
||||
/* define if you want support for the XINERAMA extension
|
||||
* set by configure */
|
||||
#undef XINERAMA
|
||||
|
||||
/* define if you want support for X window's X_LOCALE
|
||||
* set by configure */
|
||||
#undef X_LOCALE
|
||||
|
||||
@@ -325,13 +325,13 @@ static WOptionEnumeration seDisplayPositions[] = {
|
||||
* created after these defaults are read
|
||||
*/
|
||||
WDefaultEntry staticOptionList[] = {
|
||||
|
||||
{"DisableDithering", "NO", NULL,
|
||||
&wPreferences.no_dithering, getBool, NULL
|
||||
},
|
||||
|
||||
{"ColormapSize", "4", NULL,
|
||||
&wPreferences.cmap_size, getInt, NULL
|
||||
},
|
||||
{"DisableDithering", "NO", NULL,
|
||||
&wPreferences.no_dithering, getBool, NULL
|
||||
},
|
||||
/* static by laziness */
|
||||
{"IconSize", "64", NULL,
|
||||
&wPreferences.icon_size, getInt, NULL
|
||||
|
||||
@@ -1092,7 +1092,7 @@ static void
|
||||
handleLeaveNotify(XEvent *event)
|
||||
{
|
||||
WObjDescriptor *desc = NULL;
|
||||
|
||||
|
||||
if (XFindContext(dpy, event->xcrossing.window, wWinContext,
|
||||
(XPointer *)&desc)!=XCNOENT) {
|
||||
if(desc->handle_leavenotify)
|
||||
|
||||
@@ -399,7 +399,7 @@ wIconValidateIconSize(WScreen *scr, RImage *icon)
|
||||
|
||||
if (!icon)
|
||||
return NULL;
|
||||
|
||||
#ifndef DONT_SCALE_ICONS
|
||||
if (wPreferences.icon_size != 64) {
|
||||
w = wPreferences.icon_size * icon->width / 64;
|
||||
h = wPreferences.icon_size * icon->height / 64;
|
||||
@@ -408,6 +408,7 @@ wIconValidateIconSize(WScreen *scr, RImage *icon)
|
||||
RDestroyImage(icon);
|
||||
icon = tmp;
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
if (icon->width > wPreferences.icon_size
|
||||
|| icon->height > wPreferences.icon_size) {
|
||||
|
||||
42
src/main.c
42
src/main.c
@@ -421,6 +421,7 @@ print_help()
|
||||
#endif
|
||||
puts(_(" --no-dock do not open the application Dock"));
|
||||
puts(_(" --no-clip do not open the workspace Clip"));
|
||||
puts(_(" --no-autolaunch do not autolaunch applications"));
|
||||
|
||||
puts(_(" --locale locale locale to use"));
|
||||
|
||||
@@ -548,18 +549,14 @@ main(int argc, char **argv)
|
||||
#ifdef DEBUG
|
||||
Bool doSync = False;
|
||||
#endif
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
wsetabort(wAbort);
|
||||
|
||||
/* for telling WPrefs what's the name of the wmaker binary being ran */
|
||||
{
|
||||
/* char *tmp;
|
||||
|
||||
tmp = getFullPath(argv[0]);*/
|
||||
str = wstrappend("WMAKER_BIN_NAME=", argv[0]);
|
||||
/* free(tmp);*/
|
||||
putenv(str);
|
||||
}
|
||||
str = wstrappend("WMAKER_BIN_NAME=", argv[0]);
|
||||
putenv(str);
|
||||
|
||||
ArgCount = argc;
|
||||
Arguments = argv;
|
||||
@@ -586,7 +583,10 @@ main(int argc, char **argv)
|
||||
wPreferences.flags.nocpp=1;
|
||||
} else
|
||||
#endif
|
||||
if (strcmp(argv[i], "-nodock")==0
|
||||
if (strcmp(argv[i], "-no-autolaunch")==0
|
||||
|| strcmp(argv[i], "--no-autolaunch")==0) {
|
||||
wPreferences.flags.noautolaunch = 1;
|
||||
} else if (strcmp(argv[i], "-nodock")==0
|
||||
|| strcmp(argv[i], "--no-dock")==0) {
|
||||
wPreferences.flags.nodock=1;
|
||||
} else if (strcmp(argv[i], "-noclip")==0
|
||||
@@ -658,28 +658,16 @@ main(int argc, char **argv)
|
||||
check_defaults();
|
||||
}
|
||||
|
||||
#if 0
|
||||
tmp = getenv("LANG");
|
||||
if (tmp) {
|
||||
if (setlocale(LC_ALL,"") == NULL) {
|
||||
wwarning("cannot set locale %s", tmp);
|
||||
wwarning("falling back to C locale");
|
||||
setlocale(LC_ALL,"C");
|
||||
Locale = NULL;
|
||||
} else {
|
||||
if (strcmp(tmp, "C")==0 || strcmp(tmp, "POSIX")==0)
|
||||
Locale = NULL;
|
||||
else
|
||||
Locale = tmp;
|
||||
}
|
||||
} else {
|
||||
Locale = NULL;
|
||||
|
||||
if (!Locale) {
|
||||
Locale = getenv("LC_ALL");
|
||||
}
|
||||
#endif
|
||||
if (!Locale) {
|
||||
Locale = getenv("LANG");
|
||||
}
|
||||
setlocale(LC_ALL, Locale);
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
if (!Locale || strcmp(Locale, "C")==0 || strcmp(Locale, "POSIX")==0)
|
||||
Locale = NULL;
|
||||
#ifdef I18N
|
||||
@@ -692,6 +680,7 @@ main(int argc, char **argv)
|
||||
if (!XSupportsLocale()) {
|
||||
wwarning(_("X server does not support locale"));
|
||||
}
|
||||
|
||||
if (XSetLocaleModifiers("") == NULL) {
|
||||
wwarning(_("cannot set locale modifiers"));
|
||||
}
|
||||
@@ -706,7 +695,6 @@ main(int argc, char **argv)
|
||||
*ptr = 0;
|
||||
}
|
||||
|
||||
|
||||
/* open display */
|
||||
dpy = XOpenDisplay(DisplayName);
|
||||
if (dpy == NULL) {
|
||||
|
||||
@@ -626,6 +626,26 @@ wScreenForWindow(Window window)
|
||||
}
|
||||
|
||||
|
||||
static char *atomNames[] = {
|
||||
"WM_STATE",
|
||||
"WM_CHANGE_STATE",
|
||||
"WM_PROTOCOLS",
|
||||
"WM_TAKE_FOCUS",
|
||||
"WM_DELETE_WINDOW",
|
||||
"WM_SAVE_YOURSELF",
|
||||
"WM_CLIENT_LEADER",
|
||||
"WM_COLORMAP_WINDOWS",
|
||||
"WM_COLORMAP_NOTIFY",
|
||||
GNUSTEP_WM_ATTR_NAME,
|
||||
"_WINDOWMAKER_MENU",
|
||||
"_WINDOWMAKER_STATE",
|
||||
"_WINDOWMAKER_WM_PROTOCOLS",
|
||||
GNUSTEP_WM_MINIATURIZE_WINDOW,
|
||||
"_WINDOWMAKER_WM_FUNCTION",
|
||||
"_WINDOWMAKER_NOTICEBOARD",
|
||||
"_WINDOWMAKER_COMMAND"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------
|
||||
@@ -643,6 +663,7 @@ StartUp(Bool defaultScreenOnly)
|
||||
WWorkspaceState *ws_state;
|
||||
struct sigaction sig_action;
|
||||
int j, max;
|
||||
Atom atom[sizeof(atomNames)/sizeof(char*)];
|
||||
|
||||
/*
|
||||
* Ignore CapsLock in modifiers
|
||||
@@ -664,34 +685,34 @@ StartUp(Bool defaultScreenOnly)
|
||||
|
||||
/* _XA_VERSION = XInternAtom(dpy, "VERSION", False);*/
|
||||
|
||||
_XA_WM_STATE = XInternAtom(dpy, "WM_STATE", False);
|
||||
_XA_WM_CHANGE_STATE = XInternAtom(dpy, "WM_CHANGE_STATE", False);
|
||||
_XA_WM_PROTOCOLS = XInternAtom(dpy, "WM_PROTOCOLS", False);
|
||||
_XA_WM_TAKE_FOCUS = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
|
||||
_XA_WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
||||
_XA_WM_SAVE_YOURSELF = XInternAtom(dpy, "WM_SAVE_YOURSELF", False);
|
||||
_XA_WM_CLIENT_LEADER = XInternAtom(dpy, "WM_CLIENT_LEADER", False);
|
||||
_XA_WM_COLORMAP_WINDOWS = XInternAtom(dpy, "WM_COLORMAP_WINDOWS", False);
|
||||
_XA_WM_COLORMAP_NOTIFY = XInternAtom(dpy, "WM_COLORMAP_NOTIFY", False);
|
||||
|
||||
_XA_GNUSTEP_WM_ATTR = XInternAtom(dpy, GNUSTEP_WM_ATTR_NAME, False);
|
||||
|
||||
_XA_WINDOWMAKER_MENU = XInternAtom(dpy, "_WINDOWMAKER_MENU", False);
|
||||
_XA_WINDOWMAKER_STATE = XInternAtom(dpy, "_WINDOWMAKER_STATE", False);
|
||||
|
||||
_XA_WINDOWMAKER_WM_PROTOCOLS =
|
||||
XInternAtom(dpy, "_WINDOWMAKER_WM_PROTOCOLS", False);
|
||||
|
||||
_XA_GNUSTEP_WM_MINIATURIZE_WINDOW =
|
||||
XInternAtom(dpy, GNUSTEP_WM_MINIATURIZE_WINDOW, False);
|
||||
XInternAtoms(dpy, atomNames, sizeof(atomNames)/sizeof(char*),
|
||||
False, atom);
|
||||
|
||||
_XA_WINDOWMAKER_WM_FUNCTION = XInternAtom(dpy, "_WINDOWMAKER_WM_FUNCTION",
|
||||
False);
|
||||
_XA_WM_STATE = atom[0];
|
||||
_XA_WM_CHANGE_STATE = atom[1];
|
||||
_XA_WM_PROTOCOLS = atom[2];
|
||||
_XA_WM_TAKE_FOCUS = atom[3];
|
||||
_XA_WM_DELETE_WINDOW = atom[4];
|
||||
_XA_WM_SAVE_YOURSELF = atom[5];
|
||||
_XA_WM_CLIENT_LEADER = atom[6];
|
||||
_XA_WM_COLORMAP_WINDOWS = atom[7];
|
||||
_XA_WM_COLORMAP_NOTIFY = atom[8];
|
||||
|
||||
_XA_WINDOWMAKER_NOTICEBOARD = XInternAtom(dpy, "_WINDOWMAKER_NOTICEBOARD",
|
||||
False);
|
||||
_XA_GNUSTEP_WM_ATTR = atom[9];
|
||||
|
||||
_XA_WINDOWMAKER_MENU = atom[10];
|
||||
_XA_WINDOWMAKER_STATE = atom[11];
|
||||
|
||||
_XA_WINDOWMAKER_WM_PROTOCOLS = atom[12];
|
||||
|
||||
_XA_GNUSTEP_WM_MINIATURIZE_WINDOW = atom[13];
|
||||
|
||||
_XA_WINDOWMAKER_COMMAND = XInternAtom(dpy, "_WINDOWMAKER_COMMAND", False);
|
||||
_XA_WINDOWMAKER_WM_FUNCTION = atom[14];
|
||||
|
||||
_XA_WINDOWMAKER_NOTICEBOARD = atom[15];
|
||||
|
||||
_XA_WINDOWMAKER_COMMAND = atom[16];
|
||||
|
||||
|
||||
#ifdef OFFIX_DND
|
||||
_XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False);
|
||||
@@ -857,7 +878,8 @@ StartUp(Bool defaultScreenOnly)
|
||||
if (ws_state == NULL)
|
||||
wSessionRestoreState(wScreen[j]);
|
||||
|
||||
|
||||
if(!wPreferences.flags.noautolaunch)
|
||||
{
|
||||
/* auto-launch apps */
|
||||
if (!wPreferences.flags.nodock && wScreen[j]->dock) {
|
||||
wScreen[j]->last_dock = wScreen[j]->dock;
|
||||
@@ -873,6 +895,7 @@ StartUp(Bool defaultScreenOnly)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* go to workspace where we were before restart */
|
||||
if (ws_state) {
|
||||
|
||||
@@ -178,15 +178,19 @@
|
||||
#undef IGNORE_PPOSITION
|
||||
|
||||
|
||||
/*
|
||||
* Do not scale application icon and miniwindow icon images.
|
||||
*/
|
||||
#undef DONT_SCALE_ICONS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define SILLYNESS
|
||||
|
||||
|
||||
/*
|
||||
* Define if you're experiencing crashes when launching programs.
|
||||
* This will disable some important but not essential code.
|
||||
* Use it until we figure what's wrong.
|
||||
*/
|
||||
#undef NO_CRASHES
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1102,7 +1102,8 @@ selectSpecification(WMWidget *bPtr, void *data)
|
||||
char *str;
|
||||
WWindow *wwin = panel->inspected;
|
||||
|
||||
if (bPtr == panel->defaultRb) {
|
||||
|
||||
if (bPtr == panel->defaultRb && (wwin->wm_instance || wwin->wm_class)) {
|
||||
WMSetButtonEnabled(panel->applyBtn, False);
|
||||
} else {
|
||||
WMSetButtonEnabled(panel->applyBtn, True);
|
||||
@@ -1303,9 +1304,6 @@ createInspectorForWindow(WWindow *wwin, int xpos, int ypos,
|
||||
WMSetButtonAction(panel->clsRb, selectSpecification, panel);
|
||||
}
|
||||
|
||||
if (selectedBtn)
|
||||
WMSetButtonSelected(selectedBtn, True);
|
||||
|
||||
|
||||
panel->selWinB = WMCreateCommandButton(panel->specFrm);
|
||||
WMMoveWidget(panel->selWinB, 20, 145-24 - 10);
|
||||
|
||||
Reference in New Issue
Block a user