mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-07 00:35:53 +01:00
Initial update from my source tree. For 0.52.0
This commit is contained in:
@@ -3,6 +3,8 @@ changes since wmaker 0.51.2:
|
||||
|
||||
- added WMColorWellDidChangeNotification
|
||||
- added wfindfileinarray()
|
||||
- fixed bug in window title setting
|
||||
(MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>)
|
||||
|
||||
changes since wmaker 0.51.1:
|
||||
............................
|
||||
|
||||
@@ -201,7 +201,7 @@ DIST_COMMON = README ChangeLog Makefile.am Makefile.in TODO
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(libWINGs_a_SOURCES) $(wtest_SOURCES) $(wmquery_SOURCES) $(wmfile_SOURCES) $(fontl_SOURCES) $(testmywidget_SOURCES) $(testcolorpanel_SOURCES) $(testnot_SOURCES)
|
||||
OBJECTS = $(libWINGs_a_OBJECTS) $(wtest_OBJECTS) $(wmquery_OBJECTS) $(wmfile_OBJECTS) $(fontl_OBJECTS) $(testmywidget_OBJECTS) $(testcolorpanel_OBJECTS) $(testnot_OBJECTS)
|
||||
|
||||
@@ -102,7 +102,7 @@ DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
|
||||
@@ -77,7 +77,7 @@ WMDeleteSelectionHandler(WMWidget *widget, Atom selection)
|
||||
}
|
||||
|
||||
|
||||
static int gotError = 0;
|
||||
static Bool gotError = 0;
|
||||
/*
|
||||
static int
|
||||
errorHandler(XErrorEvent *error)
|
||||
@@ -93,11 +93,11 @@ writeSelection(Display *dpy, Window requestor, Atom property, Atom type,
|
||||
/*
|
||||
printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property));
|
||||
*/
|
||||
gotError = 0;
|
||||
gotError = False;
|
||||
|
||||
if (!XChangeProperty(dpy, requestor, property, type, format,
|
||||
PropModeReplace, value, length))
|
||||
return 0;
|
||||
return False;
|
||||
XFlush(dpy);
|
||||
|
||||
return !gotError;
|
||||
@@ -309,7 +309,7 @@ W_GetTextSelection(WMScreen *scr, Atom selection)
|
||||
|
||||
return data;
|
||||
} else {
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int bits;
|
||||
Atom rtype;
|
||||
unsigned long len, bytes;
|
||||
@@ -343,7 +343,7 @@ W_GetTextSelection(WMScreen *scr, Atom selection)
|
||||
if (XGetWindowProperty(scr->display, scr->groupLeader,
|
||||
scr->clipboardAtom, 0, MAX_PROPERTY_SIZE,
|
||||
False, XA_STRING, &rtype, &bits, &len,
|
||||
&bytes, &data)!=Success) {
|
||||
&bytes, (unsigned char**)&data)!=Success) {
|
||||
return NULL;
|
||||
}
|
||||
if (rtype!=XA_STRING || bits!=8) {
|
||||
|
||||
@@ -39,6 +39,7 @@ int main(int argc, char **argv)
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
|
||||
|
||||
|
||||
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
|
||||
WMSetApplicationIconImage(scr, pixmap); WMReleasePixmap(pixmap);
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(HAVE_SELECT)
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
|
||||
@@ -855,7 +855,7 @@ scrollToColumn(WMBrowser *bPtr, int column, Bool updateScroller)
|
||||
if (!WMWidgetView(bPtr->columns[i])->flags.realized)
|
||||
WMRealizeWidget(bPtr->columns[i]);
|
||||
WMMapWidget(bPtr->columns[i]);
|
||||
x += bPtr->columnSize.width+COLUMN_SPACING;
|
||||
x += bPtr->columnSize.width + COLUMN_SPACING;
|
||||
} else {
|
||||
WMUnmapWidget(bPtr->columns[i]);
|
||||
}
|
||||
@@ -910,13 +910,15 @@ listCallback(void *self, void *clientData)
|
||||
/* open directory */
|
||||
if (item->isBranch) {
|
||||
WMAddBrowserColumn(bPtr);
|
||||
loadColumn(bPtr, bPtr->usedColumnCount-1);
|
||||
}
|
||||
if (bPtr->usedColumnCount < bPtr->maxVisibleColumns)
|
||||
i = 0;
|
||||
else
|
||||
i = bPtr->usedColumnCount-bPtr->maxVisibleColumns;
|
||||
scrollToColumn(bPtr, i, True);
|
||||
if (item->isBranch) {
|
||||
loadColumn(bPtr, bPtr->usedColumnCount-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -191,6 +191,9 @@ WMCreateWindowWithStyle(WMScreen *screen, char *name, int style)
|
||||
void
|
||||
WMSetWindowTitle(WMWindow *win, char *title)
|
||||
{
|
||||
XTextProperty property;
|
||||
int result;
|
||||
|
||||
if (win->title!=NULL)
|
||||
free(win->title);
|
||||
if (title!=NULL)
|
||||
@@ -199,7 +202,17 @@ WMSetWindowTitle(WMWindow *win, char *title)
|
||||
win->title = NULL;
|
||||
|
||||
if (win->view->flags.realized) {
|
||||
XStoreName(win->view->screen->display, win->view->window, title);
|
||||
result = XmbTextListToTextProperty (win->view->screen->display,
|
||||
&title, 1, XStdICCTextStyle,
|
||||
&property);
|
||||
if (result == XNoMemory || result == XLocaleNotSupported) {
|
||||
wwarning("window title conversion error... using STRING encoding");
|
||||
XStoreName(win->view->screen->display, win->view->window, title);
|
||||
} else {
|
||||
XSetWMName(win->view->screen->display, win->view->window, &property);
|
||||
if (property.value)
|
||||
XFree(property.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +344,7 @@ static void
|
||||
writeGNUstepWMAttr(WMScreen *scr, Window window, GNUstepWMAttributes *attr)
|
||||
{
|
||||
unsigned long data[9];
|
||||
|
||||
|
||||
/* handle idiot compilers where array of CARD32 != struct of CARD32 */
|
||||
data[0] = attr->flags;
|
||||
data[1] = attr->window_style;
|
||||
@@ -414,11 +427,9 @@ realizeWindow(WMWindow *win)
|
||||
if (count>0)
|
||||
XSetWMProtocols(scr->display, win->view->window, atoms, count);
|
||||
|
||||
if (win->title)
|
||||
XStoreName(scr->display, win->view->window, win->title);
|
||||
|
||||
if (win->miniTitle)
|
||||
XSetIconName(scr->display, win->view->window, win->miniTitle);
|
||||
if (win->title || win->miniTitle)
|
||||
XmbSetWMProperties(scr->display, win->view->window, win->title,
|
||||
win->miniTitle, NULL, 0, NULL, NULL, NULL);
|
||||
|
||||
setWindowMakerHints(win);
|
||||
|
||||
@@ -535,6 +546,9 @@ WMSetWindowMiniwindowImage(WMWindow *win, WMPixmap *pixmap)
|
||||
void
|
||||
WMSetWindowMiniwindowTitle(WMWindow *win, char *title)
|
||||
{
|
||||
XTextProperty property;
|
||||
int result;
|
||||
|
||||
if ((win->miniTitle && !title) || (!win->miniTitle && title)
|
||||
|| (title && win->miniTitle && strcoll(title, win->miniTitle)!=0)) {
|
||||
if (win->miniTitle)
|
||||
@@ -546,7 +560,19 @@ WMSetWindowMiniwindowTitle(WMWindow *win, char *title)
|
||||
win->miniTitle = NULL;
|
||||
|
||||
if (win->view->flags.realized) {
|
||||
XSetIconName(win->view->screen->display, win->view->window, title);
|
||||
result = XmbTextListToTextProperty (win->view->screen->display,
|
||||
&title, 1, XStdICCTextStyle,
|
||||
&property);
|
||||
if (result == XNoMemory || result == XLocaleNotSupported) {
|
||||
wwarning("icon title conversion error..using STRING encoding");
|
||||
XSetIconName(win->view->screen->display, win->view->window,
|
||||
title);
|
||||
} else {
|
||||
XSetWMIconName(win->view->screen->display, win->view->window,
|
||||
&property);
|
||||
if (property.value)
|
||||
XFree(property.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user