1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

various bug fixes

This commit is contained in:
kojima
1999-04-18 21:08:00 +00:00
parent 674eb20ec4
commit 2effbfafde
13 changed files with 108 additions and 59 deletions

View File

@@ -8,7 +8,6 @@ Changes since version 0.52.0:
- fixed window move through workspaces in nonopaquemove - fixed window move through workspaces in nonopaquemove
- added message to immediately reread configuration data - added message to immediately reread configuration data
- fixed some bug in XKB modelock toggling - fixed some bug in XKB modelock toggling
- KDE: added kfm icon selection
- fixed crash bug when hiding apps with appicon disabled - fixed crash bug when hiding apps with appicon disabled
- fixed wrong initial workspace # being shown on attributes panel - fixed wrong initial workspace # being shown on attributes panel
- XSMP updates - XSMP updates
@@ -24,10 +23,13 @@ Changes since version 0.52.0:
- fixed the problem with showing a window as focused in the window list menu - fixed the problem with showing a window as focused in the window list menu
while it was on another workspace. while it was on another workspace.
- show workspace name on screen when switching workspaces - show workspace name on screen when switching workspaces
- made setstyle support WorkspaceSpecificBack
- fixed getstyle prob with filenames with spaces (Pierre Phaneuf
<pp@ludusdesign.com)
- fixed crash with InfoPanel in multihead dpy
- Fixed bug in WPrefs that added a new line at the end of autostart script - Fixed bug in WPrefs that added a new line at the end of autostart script
at every save, growing it indefinitely. at every save, growing it indefinitely.
Changes since version 0.51.2: Changes since version 0.51.2:
............................. .............................

7
NEWS
View File

@@ -4,6 +4,13 @@ NEWS for veteran Window Maker users
--- 0.53.0 --- 0.53.0
KDE 1.1 compatibility
---------------------
New Options New Options
----------- -----------

View File

@@ -438,6 +438,7 @@ performCommand(WMWidget *w, void *data)
int row; int row;
static int cmdIndex=0; static int cmdIndex=0;
char *title = NULL; char *title = NULL;
Bool removed = False;
column = WMGetBrowserFirstVisibleColumn(panel->browser); column = WMGetBrowserFirstVisibleColumn(panel->browser);
if (pop == panel->cmd2P) { if (pop == panel->cmd2P) {
@@ -494,6 +495,10 @@ performCommand(WMWidget *w, void *data)
updateForItemType(panel, TNothing); updateForItemType(panel, TNothing);
panel->editedItem = NULL; panel->editedItem = NULL;
panel->unsaved = 1; panel->unsaved = 1;
if (pop == panel->cmd1P) {
WMSetTextFieldText(panel->tit2T, NULL);
}
removed = True;
return; return;
case CCut: case CCut:
if (row < 0) if (row < 0)
@@ -505,7 +510,6 @@ performCommand(WMWidget *w, void *data)
} }
if (panel->itemClipboard) if (panel->itemClipboard)
PLRelease(panel->itemClipboard); PLRelease(panel->itemClipboard);
WMRemoveBrowserItem(panel->browser, column, row); WMRemoveBrowserItem(panel->browser, column, row);
menuItem = PLGetArrayElement(menu, row+1); menuItem = PLGetArrayElement(menu, row+1);
PLRemoveArrayElement(menu, row+1); PLRemoveArrayElement(menu, row+1);
@@ -516,6 +520,7 @@ performCommand(WMWidget *w, void *data)
WMSetPopUpButtonItemEnabled(panel->cmd1P, CPaste, True); WMSetPopUpButtonItemEnabled(panel->cmd1P, CPaste, True);
WMSetPopUpButtonItemEnabled(panel->cmd2P, CPaste, True); WMSetPopUpButtonItemEnabled(panel->cmd2P, CPaste, True);
panel->unsaved = 1; panel->unsaved = 1;
removed = True;
return; return;
case CCopy: case CCopy:
if (row < 0) if (row < 0)
@@ -553,6 +558,12 @@ performCommand(WMWidget *w, void *data)
PLInsertArrayElement(menu, menuItem, row+1); PLInsertArrayElement(menu, menuItem, row+1);
free(title); free(title);
panel->unsaved = 1; panel->unsaved = 1;
if (removed) {
if (pop == panel->cmd1P) {
WMSetTextFieldText(panel->tit2T, NULL);
}
}
} }

View File

@@ -777,13 +777,10 @@ static void
storeCommandInScript(char *cmd, char *line) storeCommandInScript(char *cmd, char *line)
{ {
char *path; char *path;
char *p;
FILE *f; FILE *f;
char buffer[128]; char buffer[128];
p = wusergnusteppath(); path = wstrappend(wusergnusteppath(), "/Library/WindowMaker/autostart");
path = wmalloc(strlen(p)+64);
sprintf(path, "%s/Library/WindowMaker/autostart", p);
f = fopen(path, "r"); f = fopen(path, "r");
if (!f) { if (!f) {
@@ -801,8 +798,8 @@ storeCommandInScript(char *cmd, char *line)
char *tmppath; char *tmppath;
FILE *fo; FILE *fo;
tmppath = wmalloc(strlen(p)+64); tmppath = wstrappend(wusergnusteppath(),
sprintf(tmppath, "%s/Library/WindowMaker/autostart.tmp", p); "/Library/WindowMaker/autostart.tmp");
fo = fopen(tmppath, "w"); fo = fopen(tmppath, "w");
if (!fo) { if (!fo) {
wsyserror(_("could not create temporary file %s"), tmppath); wsyserror(_("could not create temporary file %s"), tmppath);

View File

@@ -968,8 +968,10 @@ wShowInfoPanel(WScreen *scr)
if (thePanel) { if (thePanel) {
if (thePanel->scr == scr) {
wRaiseFrame(thePanel->wwin->frame->core); wRaiseFrame(thePanel->wwin->frame->core);
wSetFocusTo(scr, thePanel->wwin); wSetFocusTo(scr, thePanel->wwin);
}
return; return;
} }

View File

@@ -425,7 +425,6 @@ wClipMakeTile(WScreen *scr, RImage *normalTile)
ROperateLine(tile, RAddOperation, tp, 2, wPreferences.icon_size-3, ROperateLine(tile, RAddOperation, tp, 2, wPreferences.icon_size-3,
pt, &light); pt, &light);
//RDrawLine(tile, ICON_SIZE - 6 - as, 5, ICON_SIZE - 6, 5, &black);
ROperateLine(tile, RSubtractOperation, ICON_SIZE - 5 - as, 5, ROperateLine(tile, RSubtractOperation, ICON_SIZE - 5 - as, 5,
ICON_SIZE - 6, 5, &dark); ICON_SIZE - 6, 5, &dark);
ROperateLine(tile, RSubtractOperation, ICON_SIZE - 6 - as, 5, ROperateLine(tile, RSubtractOperation, ICON_SIZE - 6 - as, 5,
@@ -433,7 +432,6 @@ wClipMakeTile(WScreen *scr, RImage *normalTile)
ROperateLine(tile, RAddOperation, ICON_SIZE - 6, 5, ICON_SIZE - 6, 5 + as, ROperateLine(tile, RAddOperation, ICON_SIZE - 6, 5, ICON_SIZE - 6, 5 + as,
&light); &light);
/* bottom left */ /* bottom left */
ROperateLine(tile, RAddOperation, 2, tp+2, pt-2, ROperateLine(tile, RAddOperation, 2, tp+2, pt-2,
wPreferences.icon_size-3, &dark); wPreferences.icon_size-3, &dark);
@@ -443,14 +441,12 @@ wClipMakeTile(WScreen *scr, RImage *normalTile)
ROperateLine(tile, RSubtractOperation, 5, ICON_SIZE - 6 - as, ROperateLine(tile, RSubtractOperation, 5, ICON_SIZE - 6 - as,
5 + as, ICON_SIZE - 6, &dark); 5 + as, ICON_SIZE - 6, &dark);
//RDrawLine(tile, 5, ICON_SIZE - 6 - as, 5, ICON_SIZE - 6, &black);
ROperateLine(tile, RSubtractOperation, 5, ICON_SIZE - 5 - as, 5, ROperateLine(tile, RSubtractOperation, 5, ICON_SIZE - 5 - as, 5,
ICON_SIZE - 6, &dark); ICON_SIZE - 6, &dark);
ROperateLine(tile, RAddOperation, 5, ICON_SIZE - 6, 5 + as, ICON_SIZE - 6, ROperateLine(tile, RAddOperation, 5, ICON_SIZE - 6, 5 + as, ICON_SIZE - 6,
&light); &light);
return tile; return tile;
} }
@@ -3314,7 +3310,8 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
unhideHere = (event->xbutton.state & ShiftMask); unhideHere = (event->xbutton.state & ShiftMask);
/* go to the last workspace that the user worked on the app */ /* go to the last workspace that the user worked on the app */
if (!unhideHere) { if (wapp->last_workspace != dock->screen_ptr->current_workspace
&& !unhideHere) {
wWorkspaceChange(dock->screen_ptr, wapp->last_workspace); wWorkspaceChange(dock->screen_ptr, wapp->last_workspace);
} }

View File

@@ -206,12 +206,15 @@ panelBtnCallback(WMWidget *self, void *data)
char *buf; char *buf;
buf = wmalloc(strlen(text) + 64); buf = wmalloc(strlen(text) + 64);
sprintf(buf, _("Could not open specified icon file:%s"), text); sprintf(buf, _("Could not open specified icon file: %s"), text);
wMessageDialog(panel->wwin->screen_ptr, _("Error"), buf, _("OK"), if (wMessageDialog(panel->wwin->screen_ptr, _("Error"), buf,
NULL, NULL); _("OK"), _("Ignore"), NULL) == WAPRDefault) {
if (text)
free(text);
free(buf); free(buf);
done = 0;
return; return;
}
free(buf);
} else { } else {
WAppIcon *aicon = panel->editedIcon; WAppIcon *aicon = panel->editedIcon;

View File

@@ -1028,7 +1028,7 @@ handleEnterNotify(XEvent *event)
&& wwin->frame->core->window==event->xcrossing.window && wwin->frame->core->window==event->xcrossing.window
&& !scr->flags.doing_alt_tab) { && !scr->flags.doing_alt_tab) {
if (!wwin->flags.focused) if (!wwin->flags.focused && !WFLAGP(wwin, no_focusable))
wSetFocusTo(scr, wwin); wSetFocusTo(scr, wwin);
if (scr->autoRaiseTimer) if (scr->autoRaiseTimer)

View File

@@ -1753,8 +1753,6 @@ wKWMSelectRootRegion(WScreen *scr, int x, int y, int w, int h, Bool control)
return; return;
puts("SENDING DATA"); puts("SENDING DATA");
writeSocket(sock, "refreshDesktop");
sprintf(buffer, "selectRootIcons %i %i %i %i %c", x, y, w, h, control); sprintf(buffer, "selectRootIcons %i %i %i %i %c", x, y, w, h, control);
writeSocket(sock, buffer); writeSocket(sock, buffer);

View File

@@ -81,6 +81,7 @@ iconPosition(WCoreWindow *wcore, int sx1, int sy1, int sx2, int sy2,
(((WIcon*)parent)->owner->frame->workspace == workspace (((WIcon*)parent)->owner->frame->workspace == workspace
|| IS_OMNIPRESENT(((WIcon*)parent)->owner) || IS_OMNIPRESENT(((WIcon*)parent)->owner)
|| wPreferences.sticky_icons) || wPreferences.sticky_icons)
&& ((WIcon*)parent)->mapped
&& (!((WIcon*)parent)->owner->flags.hidden && (!((WIcon*)parent)->owner->flags.hidden
|| wcore->screen_ptr->flags.startup)) { || wcore->screen_ptr->flags.startup)) {

View File

@@ -194,8 +194,6 @@ typedef struct _WScreen {
GC disabled_menu_entry_gc; /* disabled menu entries */ GC disabled_menu_entry_gc; /* disabled menu entries */
GC info_text_gc; /* for size/position display */ GC info_text_gc; /* for size/position display */
GC icon_select_gc; GC icon_select_gc;
GC workspace_name_gc; /* for the name shown when workspace
* is changed */
GC frame_gc; /* gc for resize/move frame (root) */ GC frame_gc; /* gc for resize/move frame (root) */
GC line_gc; /* gc for drawing XORed lines (root) */ GC line_gc; /* gc for drawing XORed lines (root) */

View File

@@ -21,7 +21,7 @@
*/ */
#define PROG_VERSION "getstyle (Window Maker) 0.3" #define PROG_VERSION "getstyle (Window Maker) 0.4"
@@ -182,7 +182,7 @@ abortar(char *reason)
if (ThemePath) { if (ThemePath) {
printf("Removing unfinished theme pack\n"); printf("Removing unfinished theme pack\n");
sprintf(buffer, "/bin/rm -fr %s", ThemePath); sprintf(buffer, "/bin/rm -fr \"%s\"", ThemePath);
if (system(buffer)!=0) { if (system(buffer)!=0) {
printf("%s: could not execute command %s\n", ProgName, buffer); printf("%s: could not execute command %s\n", ProgName, buffer);
@@ -420,7 +420,7 @@ copyFile(char *dir, char *file)
{ {
char buffer[4000]; char buffer[4000];
sprintf(buffer, "/bin/cp %s %s", file, dir); sprintf(buffer, "/bin/cp \"%s\" \"%s\"", file, dir);
if (system(buffer)!=0) { if (system(buffer)!=0) {
printf("%s: could not copy file %s\n", ProgName, file); printf("%s: could not copy file %s\n", ProgName, file);
} }
@@ -460,7 +460,7 @@ makeThemePack(proplist_t style, char *themeName)
char *tmp; char *tmp;
tmp = wmalloc(strlen(themeDir)+20); tmp = wmalloc(strlen(themeDir)+20);
sprintf(tmp, "/bin/mkdir %s", themeDir); sprintf(tmp, "/bin/mkdir \"%s\"", themeDir);
if (system(tmp)!=0) { if (system(tmp)!=0) {
printf("%s: could not create directory %s. Probably there's already a theme with that name in this directory.\n", ProgName, themeDir); printf("%s: could not create directory %s. Probably there's already a theme with that name in this directory.\n", ProgName, themeDir);
exit(1); exit(1);

View File

@@ -2,7 +2,7 @@
* *
* WindowMaker window manager * WindowMaker window manager
* *
* Copyright (c) 1997, 1998 Alfredo K. Kojima * Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
*/ */
#define PROG_VERSION "setstyle (Window Maker) 0.3" #define PROG_VERSION "setstyle (Window Maker) 0.4"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@@ -86,6 +86,36 @@ defaultsPathForDomain(char *domain)
} }
void
hackPathInTexture(proplist_t texture, char *prefix)
{
proplist_t type;
char *t;
/* get texture type */
type = PLGetArrayElement(texture, 0);
t = PLGetString(type);
if (t && (strcasecmp(t, "tpixmap")==0
|| strcasecmp(t, "spixmap")==0
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0
|| strcasecmp(t, "tdgradient")==0)) {
proplist_t file;
char buffer[4018];
/* get pixmap file path */
file = PLGetArrayElement(texture, 1);
sprintf(buffer, "%s/%s", prefix, PLGetString(file));
/* replace path with full path */
PLRemoveArrayElement(texture, 1);
PLInsertArrayElement(texture, PLMakeString(buffer), 1);
}
}
void void
hackPaths(proplist_t style, char *prefix) hackPaths(proplist_t style, char *prefix)
{ {
@@ -101,26 +131,29 @@ hackPaths(proplist_t style, char *prefix)
key = PLGetArrayElement(keys, i); key = PLGetArrayElement(keys, i);
value = PLGetDictionaryEntry(style, key); value = PLGetDictionaryEntry(style, key);
if (value && PLIsArray(value) && PLGetNumberOfElements(value) > 2) { if (!value)
proplist_t type; continue;
char *t;
type = PLGetArrayElement(value, 0); if (strcasecmp(PLGetString(key), "WorkspaceSpecificBack")==0) {
t = PLGetString(type); if (PLIsArray(value)) {
if (t && (strcasecmp(t, "tpixmap")==0 int j;
|| strcasecmp(t, "spixmap")==0 proplist_t texture;
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0
|| strcasecmp(t, "tdgradient")==0)) {
proplist_t file;
char buffer[4018];
file = PLGetArrayElement(value, 1); for (j = 0; j < PLGetNumberOfElements(value); j++) {
sprintf(buffer, "%s/%s", prefix, PLGetString(file)); texture = PLGetArrayElement(value, j);
PLRemoveArrayElement(value, 1);
PLInsertArrayElement(value, PLMakeString(buffer), 1); if (texture && PLIsArray(texture)
&& PLGetNumberOfElements(texture) > 2) {
hackPathInTexture(texture, prefix);
}
}
}
} else {
if (PLIsArray(value) && PLGetNumberOfElements(value) > 2) {
hackPathInTexture(value, prefix);
} }
} }
} }