mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
- Fixed labels not to display '\n' as a character if multiple '\n' are passed
- Fixed Legal Panel not to display rectangles in place of new lines. - Removed some obsoleted/unused files from cvs - Fixed a bug with Sloppy focus when changing workspaces (from a debian user bug report/patch)
This commit is contained in:
@@ -12,6 +12,7 @@ Changes since version 0.80.0:
|
|||||||
- Fixed text in info panel for multibyte (Seiichi SATO <ssato@sh.rim.or.jp>)
|
- Fixed text in info panel for multibyte (Seiichi SATO <ssato@sh.rim.or.jp>)
|
||||||
- Separated the font caches for normal fonts and fontsets in WINGs (they can
|
- 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)
|
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:
|
Changes since version 0.70.0:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Changes since wmaker 0.80.0:
|
|||||||
- fixed a bug in wfindfile() (rewrote wfindfile() with better logic).
|
- fixed a bug in wfindfile() (rewrote wfindfile() with better logic).
|
||||||
- separated the font caches for normal fonts and fontsets in WINGs (they can
|
- 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)
|
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:
|
Changes since wmaker 0.70.0:
|
||||||
|
|||||||
@@ -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);
|
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;
|
ptr += count;
|
||||||
length -= count;
|
length -= count;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ BUILT_SOURCES = wconfig.h
|
|||||||
|
|
||||||
bin_PROGRAMS = wmaker
|
bin_PROGRAMS = wmaker
|
||||||
|
|
||||||
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h
|
EXTRA_DIST =
|
||||||
|
|
||||||
|
|
||||||
wmaker_SOURCES = \
|
wmaker_SOURCES = \
|
||||||
|
|||||||
@@ -178,8 +178,10 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
|||||||
napp = wApplicationOf(wwin->main_window);
|
napp = wApplicationOf(wwin->main_window);
|
||||||
|
|
||||||
/* remember last workspace where the app has been */
|
/* remember last workspace where the app has been */
|
||||||
if (napp)
|
if (napp) {
|
||||||
napp->last_workspace = wwin->screen_ptr->current_workspace;
|
/*napp->last_workspace = wwin->screen_ptr->current_workspace;*/
|
||||||
|
napp->last_workspace = wwin->frame->workspace;
|
||||||
|
}
|
||||||
|
|
||||||
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
||||||
/* install colormap if colormap mode is lock mode */
|
/* install colormap if colormap mode is lock mode */
|
||||||
|
|||||||
@@ -1569,11 +1569,11 @@ wShowLegalPanel(WScreen *scr)
|
|||||||
_(" Window Maker is free software; you can redistribute it and/or\n"
|
_(" 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"
|
"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"
|
"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"
|
" Window Maker is distributed in the hope that it will be useful,\n"
|
||||||
"but WITHOUT ANY WARRANTY; without even the implied warranty\n"
|
"but WITHOUT ANY WARRANTY; without even the implied warranty\n"
|
||||||
"of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\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"
|
" 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"
|
"License along with this program; if not, write to the Free Software\n"
|
||||||
"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\n"
|
"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA\n"
|
||||||
|
|||||||
@@ -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_*/
|
|
||||||
139
src/wmnotify.c
139
src/wmnotify.c
@@ -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 <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
|
|
||||||
#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 */
|
|
||||||
@@ -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_*/
|
|
||||||
Reference in New Issue
Block a user