diff --git a/ChangeLog b/ChangeLog index a02c560c..b74e71d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ Changes since version 0.80.0: - Fixed text in info panel for multibyte (Seiichi SATO ) - Separated the font caches for normal fonts and fontsets in WINGs (they can have the same names and collide in the cache giving unwanted results) +- Fixed Legal Panel not to display rectangles in place of new lines. Changes since version 0.70.0: diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 170eed63..8465716f 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -4,6 +4,7 @@ Changes since wmaker 0.80.0: - fixed a bug in wfindfile() (rewrote wfindfile() with better logic). - separated the font caches for normal fonts and fontsets in WINGs (they can have the same names and collide in the cache giving unwanted results) +- fixed labels not to display '\n' as a character if multiple '\n' are passed Changes since wmaker 0.70.0: diff --git a/WINGs/wmisc.c b/WINGs/wmisc.c index 1b1e20e8..a352bc48 100644 --- a/WINGs/wmisc.c +++ b/WINGs/wmisc.c @@ -176,11 +176,14 @@ W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y, WMDrawString(view->screen, d, gc, font, line_x, y, ptr, count); - y += fheight; + if (wrap && ptr[count]!='\n') + y += fheight; + + while (ptr[count] && ptr[count]=='\n') { + y += fheight; + count++; + } - if (isspace(ptr[count])) - count++; - ptr += count; length -= count; } diff --git a/src/Makefile.am b/src/Makefile.am index 8924711f..96eccdcb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ BUILT_SOURCES = wconfig.h bin_PROGRAMS = wmaker -EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h +EXTRA_DIST = wmaker_SOURCES = \ diff --git a/src/actions.c b/src/actions.c index 27d5d48b..478944da 100644 --- a/src/actions.c +++ b/src/actions.c @@ -178,8 +178,10 @@ wSetFocusTo(WScreen *scr, WWindow *wwin) napp = wApplicationOf(wwin->main_window); /* remember last workspace where the app has been */ - if (napp) - napp->last_workspace = wwin->screen_ptr->current_workspace; + if (napp) { + /*napp->last_workspace = wwin->screen_ptr->current_workspace;*/ + napp->last_workspace = wwin->frame->workspace; + } if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) { /* install colormap if colormap mode is lock mode */ diff --git a/src/dialog.c b/src/dialog.c index a298d892..09f4066c 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -1569,11 +1569,11 @@ wShowLegalPanel(WScreen *scr) _(" Window Maker is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License as\n" "published by the Free Software Foundation; either version 2 of the\n" - "License, or (at your option) any later version.\n\n\n" + "License, or (at your option) any later version.\n\n" " Window Maker is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty\n" "of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" - "See the GNU General Public License for more details.\n\n\n" + "See the GNU General Public License for more details.\n\n" " You should have received a copy of the GNU General Public\n" "License along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\n" diff --git a/src/wmnotdef.h b/src/wmnotdef.h deleted file mode 100644 index 961a92d3..00000000 --- a/src/wmnotdef.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * WindowMaker external notification definitions - * - * Copyright (c) 1998 Peter Bentley (pete@sorted.org) - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#ifndef WMNOTDEF_H_ -#define WMNOTDEF_H_ - -/* Make a notification ID from a category and an 'event' */ -#define WMN_MAKE_ID(cat, ev) ( ((cat)<<4) | (ev) ) - -/* Split an ID into category and 'event' */ -#define WMN_CATEGORY_OF( id ) ( ((id) & 0x00f0) >> 4 ) -#define WMN_EVENT_OF( id ) ( (id) & 0x000f ) - -/* Make notification mask from categories or ids */ -#define WMN_CATEGORY_TO_MASK( cat ) ( 0x0001 << ( cat )) -#define WMN_ID_TO_MASK( id ) WMN_CATEGORY_TO_MASK( WMN_CATEGORY_OF( id )) - -/* Constant and mask for "all events in all categories" */ -#define WMN_NOTIFY_ALL 0x0000 -#define WMN_MASK_ALL 0x00ff - -/* Extract the notify type from an int or long which may have other data */ -#define WMN_GET_VALUE( val ) ( (val) & 0x00ff ) - -/* Notification categories */ -#define WMN_CAT_SYSTEM 0x0001 -#define WMN_CAT_WORKSPACE 0x0002 -#define WMN_CAT_APPLICATION 0x0003 -#define WMN_CAT_WINOP 0x0004 - -/* System notifications */ -#define WMN_SYS_START WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0001 ) -#define WMN_SYS_QUIT WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0002 ) -#define WMN_SYS_RESTART WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0003 ) -#define WMN_SYS_DEFLOAD WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0004 ) - -/* Workspace notifications */ -#define WMN_WS_CHANGE WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0001 ) -#define WMN_WS_CREATE WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0002 ) -#define WMN_WS_DESTROY WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0003 ) -#define WMN_WS_RENAME WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0004 ) - -/* Application notifications */ -#define WMN_APP_START WMN_MAKE_ID( WMN_CAT_APPLICATION, 0x0001 ) -#define WMN_APP_EXIT WMN_MAKE_ID( WMN_CAT_APPLICATION, 0x0002 ) - -/* Window operation notifications */ -#define WMN_WIN_MAXIMIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0001 ) -#define WMN_WIN_UNMAXIMIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0002 ) -#define WMN_WIN_SHADE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0003 ) -#define WMN_WIN_UNSHADE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0004 ) -#define WMN_WIN_ICONIFY WMN_MAKE_ID( WMN_CAT_WINOP, 0x0005 ) -#define WMN_WIN_DEICONIFY WMN_MAKE_ID( WMN_CAT_WINOP, 0x0006 ) -#define WMN_WIN_MOVE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0007 ) -#define WMN_WIN_RESIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0008 ) -#define WMN_WIN_HIDE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0009 ) -#define WMN_WIN_UNHIDE WMN_MAKE_ID( WMN_CAT_WINOP, 0x000a ) -#define WMN_WIN_FOCUS WMN_MAKE_ID( WMN_CAT_WINOP, 0x000a ) -#define WMN_WIN_UNFOCUS WMN_MAKE_ID( WMN_CAT_WINOP, 0x000b ) - - -#endif /*WMNOTDEF_H_*/ diff --git a/src/wmnotify.c b/src/wmnotify.c deleted file mode 100644 index e95e5306..00000000 --- a/src/wmnotify.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * WindowMaker external notification support - * - * Copyright (c) 1998 Peter Bentley (pete@sorted.org) - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#include "wconfig.h" - -#include -#include -#include -#include -#include -#include - -#include "WindowMaker.h" -#include "wcore.h" -#include "framewin.h" -#include "window.h" -#include "properties.h" -#include "wmnotify.h" - -#ifdef WMNOTIFY -#define DEBUG -extern Atom _XA_WINDOWMAKER_NOTIFY; - -static LinkedList *wNotifyWindows=NULL; - -typedef struct WNotifyClient -{ - Window not_win; /* Id of window to send notify events to */ - int not_mask; /* Mask of desired notifications */ -} WNotifyClient; - - -void wNotify( int id, int a1, int a2 ) -{ -} - - -void wNotifyWin( int id, WWindow *wwin ) -{ - XEvent event; - LinkedList *list; - WNotifyClient *clnt; - int count = 0, mask = WMN_ID_TO_MASK( id ); - - event.xclient.type = ClientMessage; - event.xclient.message_type = _XA_WINDOWMAKER_NOTIFY; - event.xclient.format = 32; - event.xclient.display = dpy; - event.xclient.data.l[0] = id; - if( wwin ) - event.xclient.data.l[1] = wwin->client_win; /* XXX */ - else - event.xclient.data.l[1] = 0; - event.xclient.data.l[2] = 0; - event.xclient.data.l[3] = 0; - - for( list = wNotifyWindows; list; list = list->tail ) - { - clnt = list->head; - if( clnt->not_mask & mask ) - { -#ifdef DEBUG - printf( "Send event %d to 0x%x\n", id, (int) clnt->not_win ); -#endif - event.xclient.window = clnt->not_win; - XSendEvent(dpy, clnt->not_win, False, NoEventMask, &event); - count++; - } - } - if( count ) - XFlush(dpy); -} - - -int wNotifySet(Window window) -{ - int mask; - WNotifyClient *clnt; - - if( PropGetNotifyMask( window, &mask )) { - wNotifyClear( window ); /* Remove any current mask */ -#ifdef DEBUG - printf( "Setting notify mask for window 0x%x to 0x%02x\n", - (int) window, mask ); -#endif - clnt = wmalloc( sizeof( WNotifyClient )); - if( clnt ) - { - clnt->not_win = window; - clnt->not_mask = mask; - wNotifyWindows = list_cons( clnt, wNotifyWindows ); - return True; - } - } - return False; -} - -int wNotifyClear(Window window) -{ - LinkedList *list; - WNotifyClient *clnt; - - for( list = wNotifyWindows; list; list = list->tail ) - { - clnt = list->head; - if( clnt->not_win == window ) - { -#ifdef DEBUG - printf( "Clearing notify mask for window 0x%x (was 0x%02x)\n", - (int) clnt->not_win, clnt->not_mask ); -#endif - wNotifyWindows = list_remove_elem( wNotifyWindows, clnt ); - wfree(clnt); - return True; - } - } - return False; -} - - -#endif /* WMNOTIFY */ diff --git a/src/wmnotify.h b/src/wmnotify.h deleted file mode 100644 index 85b8552f..00000000 --- a/src/wmnotify.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * WindowMaker external notification support - * - * Copyright (c) 1998 Peter Bentley (pete@sorted.org) - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#ifndef WMNOTIFY_H_ -#define WMNOTIFY_H_ - -#ifndef WMNOTIFY - -#define wNotify( id, a1, a2 ) -#define wNotifyWin( id, wwin ) - -#else /* WMNOTIFY */ -#include "wmnotdef.h" - -void wNotify( int id, int a1, int a2 ); -void wNotifyWin( int id, WWindow *wwin ); -int wNotifySet(Window window); -int wNotifyClear(Window window); - -#endif /* WMNOTIFY */ - -#endif /*WMNOTIFY_H_*/