1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

new/changelog fix

This commit is contained in:
kojima
1999-04-03 03:51:17 +00:00
parent 370c15ad2b
commit 9df0e16707
29 changed files with 680 additions and 439 deletions

View File

@@ -3,6 +3,10 @@ Changes since version 0.52.0:
- patched wmsetbg to work with dynamically loadable texture renderer code - patched wmsetbg to work with dynamically loadable texture renderer code
- added libwmfun to distribution (forgot to do so in 0.52.0) - added libwmfun to distribution (forgot to do so in 0.52.0)
- added alternative menu style option
- changed configuration updating to use notifications
- fixed window move through workspaces in nonopaquemove
- added message to immediately reread configuration data
Changes since version 0.51.2: Changes since version 0.51.2:

View File

@@ -265,10 +265,9 @@ PLATFORM SPECIFIC NOTES:
installing a new version of it by hand (compiling yourself), uninstall installing a new version of it by hand (compiling yourself), uninstall
the package from RedHat before. the package from RedHat before.
* make a symbolic link from /usr/X11 to /usr/X11R6 * make sure you have a symbolic link from /usr/include/X11 to
(type ln -s /usr/X11R6 /usr/X11 ) and make sure you have a symbolic /usr/X11R6/include/X11 (if not, type ln -s /usr/X11R6/include/X11
link from /usr/include/X11 to /usr/X11R6/include/X11 (if not, /usr/include/X11 )
type ln -s /usr/X11R6/include/X11 /usr/include/X11 )
* make sure you have /lib/cpp pointing to the cpp program * make sure you have /lib/cpp pointing to the cpp program

8
NEWS
View File

@@ -2,6 +2,14 @@
NEWS for veteran Window Maker users NEWS for veteran Window Maker users
----------------------------------- -----------------------------------
--- 0.52.1
New Option
----------
AlternativeMenuStyle=YES; will make textures in menus to be unsegmented.
--- 0.52.0 --- 0.52.0

View File

@@ -181,7 +181,8 @@ WMPostNotification(WMNotification *notification)
while (orec) { while (orec) {
tmp = orec->next; tmp = orec->next;
if (!orec->object || orec->object == notification->object) { if (!orec->object || !notification->object
|| orec->object == notification->object) {
/* tell the observer */ /* tell the observer */
if (orec->observerAction) { if (orec->observerAction) {
(*orec->observerAction)(orec->observer, notification); (*orec->observerAction)(orec->observer, notification);

View File

@@ -419,7 +419,6 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
} }
} else if (strcasecmp(&type[1], "pixmap")==0) { } else if (strcasecmp(&type[1], "pixmap")==0) {
RImage *timage; RImage *timage;
int w, h;
char *path; char *path;
RColor color; RColor color;

View File

@@ -124,6 +124,8 @@ save(WMWidget *w, void *data)
proplist_t p1, p2; proplist_t p1, p2;
proplist_t keyList; proplist_t keyList;
proplist_t key; proplist_t key;
char *msg = "Reconfigure";
XEvent ev;
/* puts("gathering data");*/ /* puts("gathering data");*/
@@ -157,6 +159,23 @@ save(WMWidget *w, void *data)
/* puts("storing data");*/ /* puts("storing data");*/
PLSave(WindowMakerDB, YES); PLSave(WindowMakerDB, YES);
memset(&ev, 0, sizeof(XEvent));
ev.xclient.type = ClientMessage;
ev.xclient.message_type = XInternAtom(WMScreenDisplay(WMWidgetScreen(w)),
"_WINDOWMAKER_COMMAND", False);
ev.xclient.window = DefaultRootWindow(WMScreenDisplay(WMWidgetScreen(w)));
ev.xclient.format = 8;
for (i = 0; i <= strlen(msg); i++) {
ev.xclient.data.b[i] = msg[i];
}
XSendEvent(WMScreenDisplay(WMWidgetScreen(w)),
DefaultRootWindow(WMScreenDisplay(WMWidgetScreen(w))),
False, SubstructureRedirectMask, &ev);
XFlush(WMScreenDisplay(WMWidgetScreen(w)));
} }

View File

@@ -1,4 +1,5 @@
{ {
AlternativeMenuStyle = NO;
DisableMiniwindows = NO; DisableMiniwindows = NO;
OpenTransientOnOwnerWorkspace = NO; OpenTransientOnOwnerWorkspace = NO;
EdgeResistance = 30; EdgeResistance = 30;

View File

@@ -209,7 +209,6 @@
"Start kwm" RESTART kwm "Start kwm" RESTART kwm
"Start IceWM" RESTART icewm "Start IceWM" RESTART icewm
"Exit..." EXIT "Exit..." EXIT
"Kill session..." SHUTDOWN
"Exit" END "Exit" END
"Applications" END "Applications" END

View File

@@ -101,6 +101,5 @@
("Start kwm", RESTART, kwm), ("Start kwm", RESTART, kwm),
("Start IceWM", RESTART, icewm), ("Start IceWM", RESTART, icewm),
("Exit...", EXIT), ("Exit...", EXIT),
("Kill session...", SHUTDOWN)
) )
) )

View File

@@ -120,15 +120,6 @@ fi
# #
# Check for symbolic links # Check for symbolic links
# #
AC_MSG_CHECKING(for /usr/X11 symbolic link)
rh_missing_usr_x11=no
if test -d "/usr/X11"; then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(uh oh)
rh_missing_usr_x11=yes
mins_found=yes
fi
AC_MSG_CHECKING(for /usr/include/X11 symbolic link) AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
rh_missing_usr_include_x11=no rh_missing_usr_include_x11=no
if test -d "/usr/include/X11"; then if test -d "/usr/include/X11"; then

9
aclocal.m4 vendored
View File

@@ -132,15 +132,6 @@ fi
# #
# Check for symbolic links # Check for symbolic links
# #
AC_MSG_CHECKING(for /usr/X11 symbolic link)
rh_missing_usr_x11=no
if test -d "/usr/X11"; then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT(uh oh)
rh_missing_usr_x11=yes
mins_found=yes
fi
AC_MSG_CHECKING(for /usr/include/X11 symbolic link) AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
rh_missing_usr_include_x11=no rh_missing_usr_include_x11=no
if test -d "/usr/include/X11"; then if test -d "/usr/include/X11"; then

336
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -210,6 +210,34 @@ typedef enum {
WProgramState = (nstate) WProgramState = (nstate)
/* notifications */
#ifdef MAINFILE
#define NOTIFICATION(n) char *WN##n = #n
#else
#define NOTIFICATION(n) extern char *WN##n
#endif
NOTIFICATION(WindowAppearanceSettingsChanged);
NOTIFICATION(IconAppearanceSettingsChanged);
NOTIFICATION(IconTileSettingsChanged);
NOTIFICATION(MenuAppearanceSettingsChanged);
NOTIFICATION(MenuTitleAppearanceSettingsChanged);
/* appearance settings clientdata flags */
enum {
WFontSettings = 1 << 0,
WTextureSettings = 1 << 1,
WColorSettings = 1 << 2
};
typedef struct { typedef struct {
int x1, y1; int x1, y1;
int x2, y2; int x2, y2;
@@ -286,6 +314,8 @@ typedef struct WPreferences {
char auto_focus; /* focus window when it's mapped */ char auto_focus; /* focus window when it's mapped */
char alt_menu_style;
char *icon_back_file; /* background image for icons */ char *icon_back_file; /* background image for icons */
WCoord *root_menu_pos; /* initial position of the root menu*/ WCoord *root_menu_pos; /* initial position of the root menu*/

View File

@@ -170,9 +170,8 @@ static int setIconPosition();
static int setClipTitleFont(); static int setClipTitleFont();
static int setClipTitleColor(); static int setClipTitleColor();
#ifdef NEWSTUFF static int setNothing();
static int setButtonImages();
#endif
static int updateUsableArea(); static int updateUsableArea();
@@ -190,6 +189,28 @@ static int updateUsableArea();
#define REFRESH_WINDOW_TEXTURES (1<<0)
#define REFRESH_MENU_TEXTURE (1<<1)
#define REFRESH_MENU_FONT (1<<2)
#define REFRESH_MENU_COLOR (1<<3)
#define REFRESH_MENU_TITLE_TEXTURE (1<<4)
#define REFRESH_MENU_TITLE_FONT (1<<5)
#define REFRESH_MENU_TITLE_COLOR (1<<6)
#define REFRESH_WINDOW_TITLE_COLOR (1<<7)
#define REFRESH_WINDOW_FONT (1<<8)
#define REFRESH_FORE_COLOR (1<<9)
#define REFRESH_ICON_TILE (1<<10)
#define REFRESH_ICON_FONT (1<<11)
#define REFRESH_WORKSPACE_BACK (1<<12)
#define REFRESH_BUTTON_IMAGES (1<<13)
#define REFRESH_ICON_TITLE_COLOR (1<<14)
#define REFRESH_ICON_TITLE_BACK (1<<15)
static WOptionEnumeration seFocusModes[] = { static WOptionEnumeration seFocusModes[] = {
{"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1}, {"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1},
{"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1}, {"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1},
@@ -309,7 +330,7 @@ WDefaultEntry staticOptionList[] = {
}, },
{"DisableMiniwindows", "NO", NULL, {"DisableMiniwindows", "NO", NULL,
&wPreferences.disable_miniwindows, getBool, NULL &wPreferences.disable_miniwindows, getBool, NULL
} },
}; };
@@ -454,15 +475,12 @@ WDefaultEntry optionList[] = {
}, },
#endif /* WEENDOZE_CYCLE */ #endif /* WEENDOZE_CYCLE */
/* style options */ /* style options */
#ifdef NEWSTUFF {"AlternativeMenuStyle", "NO", (void*)REFRESH_MENU_TEXTURE,
{"WindowButtonImages", DEF_BUTTON_IMAGES, NULL, &wPreferences.alt_menu_style, getBool, setNothing
&wPreferences.button_images, getRImage, setButtonImages
}, },
#else
{"WidgetColor", "(solid, gray)", NULL, {"WidgetColor", "(solid, gray)", NULL,
NULL, getTexture, setWidgetColor, NULL, getTexture, setWidgetColor,
}, },
#endif
{"WorkspaceSpecificBack","()", NULL, {"WorkspaceSpecificBack","()", NULL,
NULL, getWSSpecificBackground, setWorkspaceSpecificBack NULL, getWSSpecificBackground, setWorkspaceSpecificBack
}, },
@@ -479,7 +497,7 @@ WDefaultEntry optionList[] = {
&wPreferences.title_justification, getEnum, setJustify &wPreferences.title_justification, getEnum, setJustify
}, },
{"WindowTitleFont", DEF_TITLE_FONT, NULL, {"WindowTitleFont", DEF_TITLE_FONT, NULL,
NULL, getFont, setWinTitleFont NULL, getFont, setWinTitleFont,
}, },
{"MenuTitleFont", DEF_MENU_TITLE_FONT, NULL, {"MenuTitleFont", DEF_MENU_TITLE_FONT, NULL,
NULL, getFont, setMenuTitleFont NULL, getFont, setMenuTitleFont
@@ -907,6 +925,7 @@ wReadStaticDefaults(proplist_t dict)
} }
} }
void void
wDefaultsCheckDomains(void *foo) wDefaultsCheckDomains(void *foo)
{ {
@@ -1032,106 +1051,11 @@ wDefaultsCheckDomains(void *foo)
} }
#endif /* !LITE */ #endif /* !LITE */
if (!foo)
WMAddTimerHandler(DEFAULTS_CHECK_INTERVAL, wDefaultsCheckDomains, foo); WMAddTimerHandler(DEFAULTS_CHECK_INTERVAL, wDefaultsCheckDomains, foo);
} }
#define REFRESH_WINDOW_TEXTURES (1<<0)
#define REFRESH_MENU_TEXTURES (1<<1)
#define REFRESH_WINDOW_FONT (1<<2)
#define REFRESH_MENU_TITLE_FONT (1<<3)
#define REFRESH_MENU_FONT (1<<4)
#define REFRESH_FORE_COLOR (1<<5)
#define REFRESH_ICON_TILE (1<<6)
#define REFRESH_ICON_FONT (1<<7)
#define REFRESH_WORKSPACE_BACK (1<<8)
#define REFRESH_BUTTON_IMAGES (1<<9)
static void
refreshMenus(WScreen *scr, int flags)
{
WMenu *menu;
#ifndef LITE
menu = scr->root_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
menu = scr->switch_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
#endif /* !LITE */
menu = scr->workspace_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
menu = scr->window_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
menu = scr->icon_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
if (scr->dock) {
menu = scr->dock->menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
}
menu = scr->clip_menu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
menu = scr->clip_submenu;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
menu = scr->clip_options;
if (menu)
wMenuRefresh(!menu->flags.brother ? menu : menu->brother, flags);
}
static void
refreshAppIcons(WScreen *scr, int flags)
{
WAppIcon *aicon = scr->app_icon_list;
while (aicon) {
if (aicon->icon) {
aicon->icon->force_paint = 1;
}
aicon = aicon->next;
}
}
static void
refreshWindows(WScreen *scr, int flags)
{
WWindow *wwin;
wwin = scr->focused_window;
while (wwin) {
if (flags & REFRESH_WINDOW_FONT) {
wWindowConfigureBorders(wwin);
}
if ((flags & (REFRESH_ICON_TILE|REFRESH_WINDOW_TEXTURES)) &&
wwin->flags.miniaturized && wwin->icon) {
wwin->icon->force_paint = 1;
}
if (flags & REFRESH_WINDOW_TEXTURES) {
wwin->frame->flags.need_texture_remake = 1;
}
wwin = wwin->prev;
}
}
void void
wReadDefaults(WScreen *scr, proplist_t new_dict) wReadDefaults(WScreen *scr, proplist_t new_dict)
{ {
@@ -1194,59 +1118,62 @@ wReadDefaults(WScreen *scr, proplist_t new_dict)
} }
} }
if (needs_refresh!=0) { if (needs_refresh!=0 && !scr->flags.startup) {
int foo; int foo;
foo = 0; foo = 0;
if (needs_refresh & REFRESH_MENU_TEXTURES) if (needs_refresh & REFRESH_MENU_TITLE_TEXTURE)
foo |= MR_TEXT_BACK; foo |= WTextureSettings;
if (needs_refresh & REFRESH_MENU_FONT)
foo |= MR_RESIZED;
if (needs_refresh & REFRESH_MENU_TITLE_FONT) if (needs_refresh & REFRESH_MENU_TITLE_FONT)
foo |= MR_TITLE_TEXT; foo |= WFontSettings;
if (needs_refresh & REFRESH_MENU_TITLE_COLOR)
foo |= WColorSettings;
if (foo) if (foo)
refreshMenus(scr, foo); WMPostNotificationName(WNMenuTitleAppearanceSettingsChanged, NULL,
(void*)foo);
if (needs_refresh & (REFRESH_WINDOW_TEXTURES|REFRESH_WINDOW_FONT| foo = 0;
REFRESH_ICON_TILE)) if (needs_refresh & REFRESH_MENU_TEXTURE)
refreshWindows(scr, needs_refresh); foo |= WTextureSettings;
if (needs_refresh & REFRESH_MENU_FONT)
foo |= WFontSettings;
if (needs_refresh & REFRESH_MENU_COLOR)
foo |= WColorSettings;
if (foo)
WMPostNotificationName(WNMenuAppearanceSettingsChanged, NULL,
(void*)foo);
foo = 0;
if (needs_refresh & REFRESH_WINDOW_FONT) {
foo |= WFontSettings;
}
if (needs_refresh & REFRESH_WINDOW_TEXTURES) {
foo |= WTextureSettings;
}
if (needs_refresh & REFRESH_WINDOW_TITLE_COLOR) {
foo |= WColorSettings;
}
if (foo)
WMPostNotificationName(WNWindowAppearanceSettingsChanged, NULL,
(void*)foo);
if (!(needs_refresh & REFRESH_ICON_TILE)) {
foo = 0;
if (needs_refresh & REFRESH_ICON_FONT) {
foo |= WFontSettings;
}
if (needs_refresh & REFRESH_ICON_TITLE_COLOR) {
foo |= WTextureSettings;
}
if (needs_refresh & REFRESH_ICON_TITLE_BACK) {
foo |= WTextureSettings;
}
if (foo)
WMPostNotificationName(WNIconAppearanceSettingsChanged, NULL,
(void*)foo);
}
if (needs_refresh & REFRESH_ICON_TILE) if (needs_refresh & REFRESH_ICON_TILE)
refreshAppIcons(scr, needs_refresh); WMPostNotificationName(WNIconTileSettingsChanged, NULL, NULL);
#ifdef NEWSTUFF
if ((needs_refresh & REFRESH_BUTTON_IMAGES)
&& wPreferences.button_images) {
int w, h;
RImage *image = wPreferences.button_images;
RImage *tmp;
int theight;
w = wPreferences.button_images->width / 2;
h = wPreferences.button_images->height / PRED_BPIXMAPS;
theight = scr->title_font->height + TITLEBAR_EXTRA_HEIGHT - 3;
for (i = 0; i < PRED_BPIXMAPS; i++) {
tmp = RGetSubImage(image, 0, i * h, w, h);
if (scr->button_images[0][i])
RDestroyImage(scr->button_images[0][i]);
scr->button_images[0][i] = RScaleImage(tmp, theight, theight);
RDestroyImage(tmp);
tmp = RGetSubImage(image, w, i * h, image->width - w, h);
if (scr->button_images[1][i])
RDestroyImage(scr->button_images[1][i]);
scr->button_images[1][i] = RScaleImage(tmp, theight, theight);
RDestroyImage(tmp);
}
}
#endif /* NEWSTUFF */
wRefreshDesktop(scr);
} }
} }
@@ -2623,7 +2550,7 @@ setWTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
if (index == WS_UNFOCUSED) if (index == WS_UNFOCUSED)
XSetForeground(dpy, scr->info_text_gc, color->pixel); XSetForeground(dpy, scr->info_text_gc, color->pixel);
return REFRESH_FORE_COLOR; return REFRESH_WINDOW_TITLE_COLOR;
} }
@@ -2655,7 +2582,7 @@ setMenuTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
#endif /* !TITLE_TEXT_SHADOW */ #endif /* !TITLE_TEXT_SHADOW */
XSetForeground(dpy, scr->menu_title_gc, color->pixel); XSetForeground(dpy, scr->menu_title_gc, color->pixel);
return REFRESH_FORE_COLOR; return REFRESH_MENU_TITLE_COLOR;
} }
@@ -2685,7 +2612,7 @@ setMenuTextColor(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
} }
XChangeGC(dpy, scr->disabled_menu_entry_gc, gcm, &gcv); XChangeGC(dpy, scr->disabled_menu_entry_gc, gcm, &gcv);
return REFRESH_FORE_COLOR; return REFRESH_MENU_COLOR;
#undef gcm #undef gcm
} }
@@ -2722,9 +2649,10 @@ setIconTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
{ {
XSetForeground(dpy, scr->icon_title_gc, color->pixel); XSetForeground(dpy, scr->icon_title_gc, color->pixel);
return REFRESH_FORE_COLOR; return REFRESH_ICON_TITLE_COLOR;
} }
static int static int
setIconTitleBack(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo) setIconTitleBack(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
{ {
@@ -2734,7 +2662,7 @@ setIconTitleBack(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
XQueryColor (dpy, scr->w_colormap, color); XQueryColor (dpy, scr->w_colormap, color);
scr->icon_title_texture = wTextureMakeSolid(scr, color); scr->icon_title_texture = wTextureMakeSolid(scr, color);
return REFRESH_WINDOW_TEXTURES; return REFRESH_ICON_TITLE_BACK;
} }
@@ -2939,7 +2867,7 @@ setMenuTitleBack(WScreen *scr, WDefaultEntry *entry, WTexture **texture, void *f
} }
scr->menu_title_texture[0] = *texture; scr->menu_title_texture[0] = *texture;
return REFRESH_MENU_TEXTURES; return REFRESH_MENU_TITLE_TEXTURE;
} }
@@ -2955,7 +2883,7 @@ setMenuTextBack(WScreen *scr, WDefaultEntry *entry, WTexture **texture, void *fo
scr->menu_item_auxtexture scr->menu_item_auxtexture
= wTextureMakeSolid(scr, &scr->menu_item_texture->any.color); = wTextureMakeSolid(scr, &scr->menu_item_texture->any.color);
return REFRESH_MENU_TEXTURES; return REFRESH_MENU_TEXTURE;
} }
@@ -2998,13 +2926,20 @@ updateUsableArea(WScreen *scr, WDefaultEntry *entry, void *bar, void *foo)
} }
static int
setNothing(WScreen *scr, WDefaultEntry *entry, int *value, void *foo)
{
return (int)entry->extra_data;
}
/*
static int static int
setButtonImages(WScreen *scr, WDefaultEntry *entry, int *value, void *foo) setButtonImages(WScreen *scr, WDefaultEntry *entry, int *value, void *foo)
{ {
return REFRESH_BUTTON_IMAGES; return REFRESH_BUTTON_IMAGES;
} }
*/
/* /*
* Very ugly kluge. * Very ugly kluge.

View File

@@ -83,6 +83,7 @@ extern Atom _XA_WM_CHANGE_STATE;
extern Atom _XA_WM_DELETE_WINDOW; extern Atom _XA_WM_DELETE_WINDOW;
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW; extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
extern Atom _XA_WINDOWMAKER_WM_FUNCTION; extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
extern Atom _XA_WINDOWMAKER_COMMAND;
#ifdef OFFIX_DND #ifdef OFFIX_DND
extern Atom _XA_DND_PROTOCOL; extern Atom _XA_DND_PROTOCOL;
@@ -867,6 +868,10 @@ handleClientMessage(XEvent *event)
} else { /* stopping */ } else { /* stopping */
wColormapAllowClientInstallation(scr, False); wColormapAllowClientInstallation(scr, False);
} }
} else if (event->xclient.message_type == _XA_WINDOWMAKER_COMMAND) {
wDefaultsCheckDomains("bla");
} else if (event->xclient.message_type == _XA_WINDOWMAKER_WM_FUNCTION) { } else if (event->xclient.message_type == _XA_WINDOWMAKER_WM_FUNCTION) {
WApplication *wapp; WApplication *wapp;
int done=0; int done=0;
@@ -1715,7 +1720,6 @@ handleMotionNotify(XEvent *event)
{ {
WMenu *menu; WMenu *menu;
WScreen *scr = wScreenForRootWindow(event->xmotion.root); WScreen *scr = wScreenForRootWindow(event->xmotion.root);
WWindow *wwin;
if (wPreferences.scrollable_menus) { if (wPreferences.scrollable_menus) {
if (event->xmotion.x_root <= 1 || if (event->xmotion.x_root <= 1 ||

View File

@@ -803,6 +803,11 @@ wFrameWindowPaint(WFrameWindow *fwin)
titlelen); titlelen);
free(title); free(title);
if (fwin->left_button)
handleButtonExpose(&fwin->left_button->descriptor, NULL);
if (fwin->right_button)
handleButtonExpose(&fwin->right_button->descriptor, NULL);
} }
} }

View File

@@ -57,6 +57,43 @@ static void miniwindowMouseDown(WObjDescriptor *desc, XEvent *event);
static void miniwindowDblClick(WObjDescriptor *desc, XEvent *event); static void miniwindowDblClick(WObjDescriptor *desc, XEvent *event);
/****** Notification Observers ******/
static void
appearanceObserver(void *self, WMNotification *notif)
{
WIcon *icon = (WIcon*)self;
int flags = (int)WMGetNotificationClientData(notif);
if (flags & WTextureSettings) {
icon->force_paint = 1;
}
if (flags & WFontSettings) {
icon->force_paint = 1;
}
/*
if (flags & WColorSettings) {
}
*/
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
/* wIconPaint(icon);*/
}
static void
tileObserver(void *self, WMNotification *notif)
{
WIcon *icon = (WIcon*)self;
icon->force_paint = 1;
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
/* wIconPaint(icon);*/
}
/************************************/
INLINE static void INLINE static void
getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int *dep) getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int *dep)
{ {
@@ -139,6 +176,10 @@ wIconCreate(WWindow *wwin)
XFlush(dpy); XFlush(dpy);
WMAddNotificationObserver(appearanceObserver, icon,
WNIconAppearanceSettingsChanged, icon);
WMAddNotificationObserver(tileObserver, icon,
WNIconTileSettingsChanged, icon);
return icon; return icon;
} }
@@ -191,6 +232,9 @@ wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile)
wIconUpdate(icon); wIconUpdate(icon);
WMAddNotificationObserver(tileObserver, icon,
WNIconTileSettingsChanged, icon);
return icon; return icon;
} }
@@ -202,6 +246,8 @@ wIconDestroy(WIcon *icon)
WCoreWindow *core = icon->core; WCoreWindow *core = icon->core;
WScreen *scr = core->screen_ptr; WScreen *scr = core->screen_ptr;
WMRemoveNotificationObserver(icon);
if (icon->handlerID) if (icon->handlerID)
WMDeleteTimerHandler(icon->handlerID); WMDeleteTimerHandler(icon->handlerID);

118
src/kwm.c
View File

@@ -1636,5 +1636,123 @@ wKWMSendEventMessage(WWindow *wwin, WKWMEventMessage message)
sendToModules(wwin ? wwin->screen_ptr : NULL, msg, wwin, 0); sendToModules(wwin ? wwin->screen_ptr : NULL, msg, wwin, 0);
} }
#if 0
static void
connectKFM(WScreen *scr)
{
char *pidf;
char buffer[128];
char *ptr;
FILE *f;
pidf = wstrappend(whomedir(), "/.kde/share/apps/kfm/pid");
strcpy(buffer, getenv("DISPLAY"));
ptr = strchr(buffer, ':');
if (ptr)
*ptr = '_';
ptr = strrchr(buffer, '.');
if (ptr)
*ptr = 0;
{
char b[32];
sprintf(b, ".%i", scr->screen);
strcat(buffer, b);
}
ptr = pidf;
pidf = wstrappend(ptr, buffer);
free(ptr);
/* pid file */
f = fopen(pidf, "r");
char buffer[ 1024 ];
buffer[0] = 0;
fgets( buffer, 1023, f );
int pid = atoi( buffer );
if ( pid <= 0 )
{
warning("ERROR: Invalid PID");
fclose( f );
return;
}
// Is the PID ok ?
if ( kill( pid, 0 ) != 0 )
{
// Did we already try to start a new kfm ?
if ( flag == 0 && allowRestart )
{
flag = 1;
// Try to start a new kfm
system( "kfm -d &" );
sleep( 10 );
fclose( f );
init();
return;
}
warning("ERROR: KFM crashed");
fclose( f );
return;
}
// Read the socket's name
buffer[0] = 0;
fscanf(f, "%s", buffer);
fclose( f );
char * slot = strdup( buffer );
if ( slot == (void *) 0 )
{
warning("ERROR: Invalid Slot");
return;
}
// Connect to KFM
ipc = new KfmIpc( slot );
free(slot);
connect( ipc, SIGNAL( finished() ), this, SLOT( slotFinished() ) );
connect( ipc, SIGNAL( error( int, const char* ) ),
this, SLOT( slotError( int, const char* ) ) );
connect( ipc, SIGNAL( dirEntry( const char*, const char*, const char*, const char*, const char*, int ) ),
this, SLOT( slotDirEntry( const char*, const char*, const char*, const char*, const char*, int ) ) );
// Read the password
QString fn = KApplication::localkdedir() + "/share/apps/kfm/magic";
f = fopen( fn.data(), "rb" );
if ( f == 0L )
{
QString ErrorMessage;
ksprintf(&ErrorMessage, i18n("You dont have the file %s\n"
"Could not do Authorization"), fn.data());
QMessageBox::message( i18n("KFM Error"), ErrorMessage );
return;
}
char *p = fgets( buffer, 1023, f );
fclose( f );
if ( p == 0L )
{
QString ErrorMessage;
ksprintf(&ErrorMessage, i18n("The file %s is corrupted\n"
"Could not do Authorization"), fn.data());
QMessageBox::message( i18n("KFM Error"), ErrorMessage );
return;
}
ipc->auth( buffer );
ok = TRUE;
}
void
wKWMSendRootSelection(WScreen *scr, int x, int y, int w, int h, Bool control)
{
}
#endif
#endif /* KWM_HINTS */ #endif /* KWM_HINTS */

View File

@@ -39,6 +39,8 @@
*/ */
#include <X11/Xlocale.h> #include <X11/Xlocale.h>
#define MAINFILE
#include "WindowMaker.h" #include "WindowMaker.h"
#include "window.h" #include "window.h"
#include "funcs.h" #include "funcs.h"
@@ -106,6 +108,7 @@ Atom _XA_WINDOWMAKER_STATE;
Atom _XA_WINDOWMAKER_WM_FUNCTION; Atom _XA_WINDOWMAKER_WM_FUNCTION;
Atom _XA_WINDOWMAKER_NOTICEBOARD; Atom _XA_WINDOWMAKER_NOTICEBOARD;
Atom _XA_WINDOWMAKER_COMMAND;
#ifdef OFFIX_DND #ifdef OFFIX_DND
Atom _XA_DND_PROTOCOL; Atom _XA_DND_PROTOCOL;

View File

@@ -81,12 +81,51 @@ static void menuTitleMouseDown(WCoreWindow *sender, void *data, XEvent *event);
static void menuCloseClick(WCoreWindow *sender, void *data, XEvent *event); static void menuCloseClick(WCoreWindow *sender, void *data, XEvent *event);
static void updateTexture(WMenu *menu);
static void selectEntry(WMenu *menu, int entry_no); static void selectEntry(WMenu *menu, int entry_no);
static void closeCascade(WMenu *menu); static void closeCascade(WMenu *menu);
/****** Notification Observers ******/
static void
appearanceObserver(void *self, WMNotification *notif)
{
WMenu *menu = (WMenu*)self;
int flags = (int)WMGetNotificationClientData(notif);
if (!menu->flags.realized)
return;
if (WMGetNotificationName(notif) == WNMenuAppearanceSettingsChanged) {
if (flags & WFontSettings) {
menu->flags.realized = 0;
wMenuRealize(menu);
}
if (flags & WTextureSettings) {
updateTexture(menu);
}
if (flags & (WTextureSettings|WColorSettings)) {
wMenuPaint(menu);
}
} else if (menu->flags.titled) {
if (flags & WFontSettings) {
menu->flags.realized = 0;
wMenuRealize(menu);
}
if (flags & WTextureSettings) {
menu->frame->flags.need_texture_remake = 1;
}
if (flags & (WColorSettings|WTextureSettings))
wFrameWindowPaint(menu->frame);
}
}
/************************************/
/* /*
*---------------------------------------------------------------------- *----------------------------------------------------------------------
@@ -140,10 +179,7 @@ wMenuCreate(WScreen *screen, char *title, int main_menu)
menu->frame->flags.justification = WTJ_LEFT; menu->frame->flags.justification = WTJ_LEFT;
#ifndef NEWSTUFF
/* XXX */
menu->frame->rbutton_image = screen->b_pixmaps[WBUT_CLOSE]; menu->frame->rbutton_image = screen->b_pixmaps[WBUT_CLOSE];
#endif
menu->entry_no = 0; menu->entry_no = 0;
menu->alloced_entries = 0; menu->alloced_entries = 0;
@@ -187,8 +223,13 @@ wMenuCreate(WScreen *screen, char *title, int main_menu)
brother = 0; brother = 0;
menu->brother->flags.brother = 1; menu->brother->flags.brother = 1;
menu->brother->brother = menu; menu->brother->brother = menu;
}
WMAddNotificationObserver(appearanceObserver, menu,
WNMenuTitleAppearanceSettingsChanged, menu);
WMAddNotificationObserver(appearanceObserver, menu,
WNMenuAppearanceSettingsChanged, menu);
}
return menu; return menu;
} }
@@ -225,38 +266,6 @@ insertEntry(WMenu *menu, WMenuEntry *entry, int index)
} }
void
wMenuRefresh(WMenu *menu, int flags)
{
int i;
if (flags & MR_TEXT_BACK) {
menu->frame->flags.need_texture_remake = 1;
}
if (flags & (MR_RESIZED|MR_TITLE_TEXT)) {
menu->flags.realized = 0;
}
wMenuRealize(menu);
if (menu->flags.titled)
wFrameWindowPaint(menu->frame);
if (!menu->flags.brother) {
if (menu->brother)
wMenuRefresh(menu->brother, flags);
for (i=0; i < menu->cascade_no; i++) {
if (!menu->cascades[i]->flags.brother)
wMenuRefresh(menu->cascades[i], flags);
else
wMenuRefresh(menu->cascades[i]->brother, flags);
}
}
}
WMenuEntry* WMenuEntry*
wMenuInsertCallback(WMenu *menu, int index, char *text, wMenuInsertCallback(WMenu *menu, int index, char *text,
@@ -429,6 +438,41 @@ wMenuRemoveItem(WMenu *menu, int index)
} }
static void
updateTexture(WMenu *menu)
{
WScreen *scr = menu->menu->screen_ptr;
/* setup background texture */
if (scr->menu_item_texture->any.type != WTEX_SOLID) {
if (!menu->flags.brother) {
FREE_PIXMAP(menu->menu_texture_data);
if (wPreferences.alt_menu_style) {
wTextureRender(scr, scr->menu_item_texture,
&menu->menu_texture_data, menu->menu->width,
menu->menu->height, WREL_MENUENTRY);
} else {
wTextureRender(scr, scr->menu_item_texture,
&menu->menu_texture_data, menu->menu->width,
menu->entry_height, WREL_MENUENTRY);
}
XSetWindowBackgroundPixmap(dpy, menu->menu->window,
menu->menu_texture_data);
XClearWindow(dpy, menu->menu->window);
XSetWindowBackgroundPixmap(dpy, menu->brother->menu->window,
menu->menu_texture_data);
XClearWindow(dpy, menu->brother->menu->window);
}
} else {
XSetWindowBackground(dpy, menu->menu->window,
scr->menu_item_texture->any.color.pixel);
XClearWindow(dpy, menu->menu->window);
}
}
void void
wMenuRealize(WMenu *menu) wMenuRealize(WMenu *menu)
@@ -504,28 +548,7 @@ wMenuRealize(WMenu *menu)
+ menu->frame->top_width + menu->frame->bottom_width); + menu->frame->top_width + menu->frame->bottom_width);
/* setup background texture */ updateTexture(menu);
if (scr->menu_item_texture->any.type != WTEX_SOLID) {
if (!menu->flags.brother) {
FREE_PIXMAP(menu->menu_texture_data);
wTextureRender(scr, scr->menu_item_texture,
&menu->menu_texture_data, menu->menu->width,
menu->entry_height, WREL_MENUENTRY);
XSetWindowBackgroundPixmap(dpy, menu->menu->window,
menu->menu_texture_data);
XClearWindow(dpy, menu->menu->window);
XSetWindowBackgroundPixmap(dpy, menu->brother->menu->window,
menu->menu_texture_data);
XClearWindow(dpy, menu->brother->menu->window);
}
} else {
XSetWindowBackground(dpy, menu->menu->window,
scr->menu_item_texture->any.color.pixel);
XClearWindow(dpy, menu->menu->window);
}
menu->flags.realized = 1; menu->flags.realized = 1;
@@ -541,6 +564,8 @@ wMenuDestroy(WMenu *menu, int recurse)
{ {
int i; int i;
WMRemoveNotificationObserver(menu);
/* remove any pending timers */ /* remove any pending timers */
if (menu->timer) if (menu->timer)
WMDeleteTimerHandler(menu->timer); WMDeleteTimerHandler(menu->timer);
@@ -741,6 +766,7 @@ paintEntry(WMenu *menu, int index, int selected)
} }
} }
static void static void
move_menus(WMenu *menu, int x, int y) move_menus(WMenu *menu, int x, int y)
{ {

View File

@@ -24,11 +24,6 @@
#include "wcore.h" #include "wcore.h"
#define MR_RESIZED 1
#define MR_TITLE_BACK 2
#define MR_TEXT_BACK 4
#define MR_TITLE_TEXT 8
#define MI_DIAMOND 0 #define MI_DIAMOND 0
#define MI_CHECK 1 #define MI_CHECK 1
#define MI_MINIWINDOW 2 #define MI_MINIWINDOW 2
@@ -102,7 +97,6 @@ typedef struct WMenu {
} WMenu; } WMenu;
void wMenuRefresh(WMenu *menu, int flags);
void wMenuPaint(WMenu *menu); void wMenuPaint(WMenu *menu);
void wMenuDestroy(WMenu *menu, int recurse); void wMenuDestroy(WMenu *menu, int recurse);
void wMenuRealize(WMenu *menu); void wMenuRealize(WMenu *menu);

View File

@@ -1530,6 +1530,10 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
if (!warped && !wPreferences.no_autowrap) { if (!warped && !wPreferences.no_autowrap) {
int oldWorkspace = scr->current_workspace; int oldWorkspace = scr->current_workspace;
drawFrames(wwin, scr->selected_windows,
moveData.realX - wwin->frame_x,
moveData.realY - wwin->frame_y);
if (checkWorkspaceChange(wwin, &moveData, opaqueMove)) { if (checkWorkspaceChange(wwin, &moveData, opaqueMove)) {
if (scr->current_workspace != oldWorkspace if (scr->current_workspace != oldWorkspace
&& wPreferences.edge_resistance > 0 && wPreferences.edge_resistance > 0
@@ -1538,6 +1542,9 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
warped = 1; warped = 1;
} }
drawFrames(wwin, scr->selected_windows,
moveData.realX - wwin->frame_x,
moveData.realY - wwin->frame_y);
} else { } else {
warped = 0; warped = 0;
} }

View File

@@ -119,6 +119,7 @@ extern Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
extern Atom _XA_WINDOWMAKER_STATE; extern Atom _XA_WINDOWMAKER_STATE;
extern Atom _XA_WINDOWMAKER_WM_FUNCTION; extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
extern Atom _XA_WINDOWMAKER_NOTICEBOARD; extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
extern Atom _XA_WINDOWMAKER_COMMAND;
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW; extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
@@ -665,6 +666,8 @@ StartUp(Bool defaultScreenOnly)
_XA_WINDOWMAKER_NOTICEBOARD = XInternAtom(dpy, "_WINDOWMAKER_NOTICEBOARD", _XA_WINDOWMAKER_NOTICEBOARD = XInternAtom(dpy, "_WINDOWMAKER_NOTICEBOARD",
False); False);
_XA_WINDOWMAKER_COMMAND = XInternAtom(dpy, "_WINDOWMAKER_COMMAND", False);
#ifdef OFFIX_DND #ifdef OFFIX_DND
_XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False); _XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False);
_XA_DND_PROTOCOL = XInternAtom(dpy, "DndProtocol", False); _XA_DND_PROTOCOL = XInternAtom(dpy, "DndProtocol", False);

View File

@@ -129,9 +129,29 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event);
static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event); static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event);
/****** Notification Observers ******/
static void
appearanceObserver(void *self, WMNotification *notif)
{
WWindow *wwin = (WWindow*)self;
int flags = (int)WMGetNotificationClientData(notif);
if (!wwin->frame || !wwin->frame->titlebar)
return;
if (flags & WFontSettings) {
wWindowConfigureBorders(wwin);
}
if (flags & WTextureSettings) {
wwin->frame->flags.need_texture_remake = 1;
}
if (flags & (WTextureSettings | WColorSettings)) {
wFrameWindowPaint(wwin->frame);
}
}
/************************************/
WWindow* WWindow*
wWindowFor(Window window) wWindowFor(Window window)
@@ -151,6 +171,7 @@ wWindowFor(Window window)
if (frame->flags.is_client_window_frame) if (frame->flags.is_client_window_frame)
return frame->child; return frame->child;
} }
return NULL; return NULL;
} }
@@ -169,6 +190,7 @@ wWindowCreate()
wwin->client_descriptor.parent = wwin; wwin->client_descriptor.parent = wwin;
wwin->client_descriptor.self = wwin; wwin->client_descriptor.self = wwin;
wwin->client_descriptor.parent_type = WCLASS_WINDOW; wwin->client_descriptor.parent_type = WCLASS_WINDOW;
return wwin; return wwin;
} }
@@ -178,6 +200,8 @@ wWindowDestroy(WWindow *wwin)
{ {
int i; int i;
WMRemoveNotificationObserver(wwin);
wwin->flags.destroyed = 1; wwin->flags.destroyed = 1;
for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) { for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) {
@@ -1135,6 +1159,15 @@ wManageWindow(WScreen *scr, Window window)
} }
#endif #endif
/*
*------------------------------------------------------------
* Setup Notification Observers
*------------------------------------------------------------
*/
WMAddNotificationObserver(appearanceObserver, wwin,
WNWindowAppearanceSettingsChanged, wwin);
/* /*
*-------------------------------------------------- *--------------------------------------------------
* *
@@ -1171,6 +1204,9 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
wwin = wWindowCreate(); wwin = wWindowCreate();
WMAddNotificationObserver(appearanceObserver, wwin,
WNWindowAppearanceSettingsChanged, wwin);
wwin->flags.internal_window = 1; wwin->flags.internal_window = 1;
WSETUFLAG(wwin, omnipresent, 1); WSETUFLAG(wwin, omnipresent, 1);

View File

@@ -24,7 +24,7 @@ wxpaste_LDADD = @XLFLAGS@ @XLIBS@
getstyle_LDADD = $(liblist) getstyle_LDADD = $(liblist)
setstyle_LDADD = $(liblist) setstyle_LDADD = @XLFLAGS@ @XLIBS@ $(liblist)
seticons_LDADD= $(liblist) seticons_LDADD= $(liblist)

View File

@@ -110,7 +110,7 @@ wxpaste_LDADD = @XLFLAGS@ @XLIBS@
getstyle_LDADD = $(liblist) getstyle_LDADD = $(liblist)
setstyle_LDADD = $(liblist) setstyle_LDADD = @XLFLAGS@ @XLIBS@ $(liblist)
seticons_LDADD = $(liblist) seticons_LDADD = $(liblist)

View File

@@ -21,7 +21,7 @@
*/ */
#define PROG_VERSION "getstyle (Window Maker) 0.2" #define PROG_VERSION "getstyle (Window Maker) 0.3"
@@ -68,6 +68,7 @@ static char *options[] = {
"IconBack", "IconBack",
"IconTitleColor", "IconTitleColor",
"IconTitleBack", "IconTitleBack",
"AlternativeMenuStyle",
#ifdef TITLE_TEXT_SHADOW #ifdef TITLE_TEXT_SHADOW
"Shadow", "Shadow",
"FShadowColor", "FShadowColor",

View File

@@ -21,7 +21,7 @@
*/ */
#define PROG_VERSION "setstyle (Window Maker) 0.2" #define PROG_VERSION "setstyle (Window Maker) 0.3"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@@ -29,6 +29,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <X11/Xlib.h>
#include <string.h> #include <string.h>
#include "../src/wconfig.h" #include "../src/wconfig.h"
@@ -229,6 +231,11 @@ hackStyle(proplist_t style)
} }
} }
} }
if (!PLGetDictionaryEntry(style, PLMakeString("AlternativeMenuStyle"))) {
PLInsertDictionaryEntry(style, PLMakeString("AlternativeMenuStyle"),
PLMakeString("NO"));
}
} }
@@ -372,6 +379,31 @@ main(int argc, char **argv)
PLMergeDictionaries(prop, style); PLMergeDictionaries(prop, style);
PLSave(prop, YES); PLSave(prop, YES);
{
Display *dpy;
XEvent ev;
dpy = XOpenDisplay("");
if (dpy) {
int i;
char *msg = "Reconfigure";
memset(&ev, 0, sizeof(XEvent));
ev.xclient.type = ClientMessage;
ev.xclient.message_type = XInternAtom(dpy, "_WINDOWMAKER_COMMAND",
False);
ev.xclient.window = DefaultRootWindow(dpy);
ev.xclient.format = 8;
for (i = 0; i <= strlen(msg); i++) {
ev.xclient.data.b[i] = msg[i];
}
XSendEvent(dpy, DefaultRootWindow(dpy), False,
SubstructureRedirectMask, &ev);
XFlush(dpy);
}
}
exit(0); exit(0);
} }

View File

@@ -206,12 +206,12 @@ parseTexture(RContext *rc, char *text)
case 'H': case 'H':
gtype = RHorizontalGradient; gtype = RHorizontalGradient;
iwidth = scrWidth; iwidth = scrWidth;
iheight = 1; iheight = 8;
break; break;
case 'V': case 'V':
case 'v': case 'v':
gtype = RVerticalGradient; gtype = RVerticalGradient;
iwidth = 1; iwidth = 8;
iheight = scrHeight; iheight = scrHeight;
break; break;
default: default:
@@ -299,12 +299,12 @@ parseTexture(RContext *rc, char *text)
case 'H': case 'H':
gtype = RHorizontalGradient; gtype = RHorizontalGradient;
iwidth = scrWidth; iwidth = scrWidth;
iheight = 1; iheight = 8;
break; break;
case 'V': case 'V':
case 'v': case 'v':
gtype = RVerticalGradient; gtype = RVerticalGradient;
iwidth = 1; iwidth = 8;
iheight = scrHeight; iheight = scrHeight;
break; break;
default: default: