1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +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
- added message to immediately reread configuration data
- fixed some bug in XKB modelock toggling
- KDE: added kfm icon selection
- fixed crash bug when hiding apps with appicon disabled
- fixed wrong initial workspace # being shown on attributes panel
- 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
while it was on another workspace.
- 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
at every save, growing it indefinitely.
Changes since version 0.51.2:
.............................

7
NEWS
View File

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

View File

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

View File

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

View File

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

View File

@@ -425,14 +425,12 @@ wClipMakeTile(WScreen *scr, RImage *normalTile)
ROperateLine(tile, RAddOperation, tp, 2, wPreferences.icon_size-3,
pt, &light);
//RDrawLine(tile, ICON_SIZE - 6 - as, 5, ICON_SIZE - 6, 5, &black);
ROperateLine(tile, RSubtractOperation, ICON_SIZE - 5 - as, 5,
ICON_SIZE - 6, 5, &dark);
ROperateLine(tile, RSubtractOperation, ICON_SIZE - 6 - as, 5,
ICON_SIZE - 6, 5 + as, &dark);
ROperateLine(tile, RAddOperation, ICON_SIZE - 6, 5, ICON_SIZE - 6, 5 + as,
&light);
/* bottom left */
ROperateLine(tile, RAddOperation, 2, tp+2, pt-2,
@@ -443,14 +441,12 @@ wClipMakeTile(WScreen *scr, RImage *normalTile)
ROperateLine(tile, RSubtractOperation, 5, ICON_SIZE - 6 - as,
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,
ICON_SIZE - 6, &dark);
ROperateLine(tile, RAddOperation, 5, ICON_SIZE - 6, 5 + as, ICON_SIZE - 6,
&light);
return tile;
}
@@ -3314,7 +3310,8 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
unhideHere = (event->xbutton.state & ShiftMask);
/* 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);
}

View File

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

View File

@@ -1025,16 +1025,16 @@ 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)
if (!wwin->flags.focused && !WFLAGP(wwin, no_focusable))
wSetFocusTo(scr, wwin);
if (scr->autoRaiseTimer)
WMDeleteTimerHandler(scr->autoRaiseTimer);
scr->autoRaiseTimer = NULL;
if (scr->autoRaiseTimer)
WMDeleteTimerHandler(scr->autoRaiseTimer);
scr->autoRaiseTimer = NULL;
if (wPreferences.raise_delay && !WFLAGP(wwin, no_focusable)) {
scr->autoRaiseWindow = wwin->frame->core->window;
scr->autoRaiseTimer

View File

@@ -1752,8 +1752,6 @@ wKWMSelectRootRegion(WScreen *scr, int x, int y, int w, int h, Bool control)
if (sock < 0)
return;
puts("SENDING DATA");
writeSocket(sock, "refreshDesktop");
sprintf(buffer, "selectRootIcons %i %i %i %i %c", x, y, w, h, control);
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
|| IS_OMNIPRESENT(((WIcon*)parent)->owner)
|| wPreferences.sticky_icons)
&& ((WIcon*)parent)->mapped
&& (!((WIcon*)parent)->owner->flags.hidden
|| wcore->screen_ptr->flags.startup)) {

View File

@@ -194,8 +194,6 @@ typedef struct _WScreen {
GC disabled_menu_entry_gc; /* disabled menu entries */
GC info_text_gc; /* for size/position display */
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 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) {
printf("Removing unfinished theme pack\n");
sprintf(buffer, "/bin/rm -fr %s", ThemePath);
sprintf(buffer, "/bin/rm -fr \"%s\"", ThemePath);
if (system(buffer)!=0) {
printf("%s: could not execute command %s\n", ProgName, buffer);
@@ -420,7 +420,7 @@ copyFile(char *dir, char *file)
{
char buffer[4000];
sprintf(buffer, "/bin/cp %s %s", file, dir);
sprintf(buffer, "/bin/cp \"%s\" \"%s\"", file, dir);
if (system(buffer)!=0) {
printf("%s: could not copy file %s\n", ProgName, file);
}
@@ -460,7 +460,7 @@ makeThemePack(proplist_t style, char *themeName)
char *tmp;
tmp = wmalloc(strlen(themeDir)+20);
sprintf(tmp, "/bin/mkdir %s", themeDir);
sprintf(tmp, "/bin/mkdir \"%s\"", themeDir);
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);
exit(1);

View File

@@ -2,7 +2,7 @@
*
* 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
* 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 <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
hackPaths(proplist_t style, char *prefix)
{
@@ -101,26 +131,29 @@ hackPaths(proplist_t style, char *prefix)
key = PLGetArrayElement(keys, i);
value = PLGetDictionaryEntry(style, key);
if (value && PLIsArray(value) && PLGetNumberOfElements(value) > 2) {
proplist_t type;
char *t;
type = PLGetArrayElement(value, 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];
if (!value)
continue;
if (strcasecmp(PLGetString(key), "WorkspaceSpecificBack")==0) {
if (PLIsArray(value)) {
int j;
proplist_t texture;
for (j = 0; j < PLGetNumberOfElements(value); j++) {
texture = PLGetArrayElement(value, j);
file = PLGetArrayElement(value, 1);
sprintf(buffer, "%s/%s", prefix, PLGetString(file));
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);
}
}
}