mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
new/changelog fix
This commit is contained in:
@@ -3,6 +3,10 @@ Changes since version 0.52.0:
|
||||
|
||||
- patched wmsetbg to work with dynamically loadable texture renderer code
|
||||
- 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:
|
||||
|
||||
7
INSTALL
7
INSTALL
@@ -265,10 +265,9 @@ PLATFORM SPECIFIC NOTES:
|
||||
installing a new version of it by hand (compiling yourself), uninstall
|
||||
the package from RedHat before.
|
||||
|
||||
* make a symbolic link from /usr/X11 to /usr/X11R6
|
||||
(type ln -s /usr/X11R6 /usr/X11 ) and make sure you have a symbolic
|
||||
link from /usr/include/X11 to /usr/X11R6/include/X11 (if not,
|
||||
type ln -s /usr/X11R6/include/X11 /usr/include/X11 )
|
||||
* make sure you have a symbolic link from /usr/include/X11 to
|
||||
/usr/X11R6/include/X11 (if not, type ln -s /usr/X11R6/include/X11
|
||||
/usr/include/X11 )
|
||||
|
||||
* make sure you have /lib/cpp pointing to the cpp program
|
||||
|
||||
|
||||
8
NEWS
8
NEWS
@@ -2,6 +2,14 @@
|
||||
NEWS for veteran Window Maker users
|
||||
-----------------------------------
|
||||
|
||||
--- 0.52.1
|
||||
|
||||
New Option
|
||||
----------
|
||||
|
||||
AlternativeMenuStyle=YES; will make textures in menus to be unsegmented.
|
||||
|
||||
|
||||
--- 0.52.0
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,8 @@ WMPostNotification(WMNotification *notification)
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
if (!orec->object || orec->object == notification->object) {
|
||||
if (!orec->object || !notification->object
|
||||
|| orec->object == notification->object) {
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction)(orec->observer, notification);
|
||||
|
||||
@@ -419,7 +419,6 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height,
|
||||
}
|
||||
} else if (strcasecmp(&type[1], "pixmap")==0) {
|
||||
RImage *timage;
|
||||
int w, h;
|
||||
char *path;
|
||||
RColor color;
|
||||
|
||||
|
||||
@@ -124,6 +124,8 @@ save(WMWidget *w, void *data)
|
||||
proplist_t p1, p2;
|
||||
proplist_t keyList;
|
||||
proplist_t key;
|
||||
char *msg = "Reconfigure";
|
||||
XEvent ev;
|
||||
|
||||
|
||||
/* puts("gathering data");*/
|
||||
@@ -157,6 +159,23 @@ save(WMWidget *w, void *data)
|
||||
/* puts("storing data");*/
|
||||
|
||||
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)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
AlternativeMenuStyle = NO;
|
||||
DisableMiniwindows = NO;
|
||||
OpenTransientOnOwnerWorkspace = NO;
|
||||
EdgeResistance = 30;
|
||||
|
||||
@@ -209,7 +209,6 @@
|
||||
"Start kwm" RESTART kwm
|
||||
"Start IceWM" RESTART icewm
|
||||
"Exit..." EXIT
|
||||
"Kill session..." SHUTDOWN
|
||||
"Exit" END
|
||||
"Applications" END
|
||||
|
||||
|
||||
@@ -101,6 +101,5 @@
|
||||
("Start kwm", RESTART, kwm),
|
||||
("Start IceWM", RESTART, icewm),
|
||||
("Exit...", EXIT),
|
||||
("Kill session...", SHUTDOWN)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -120,15 +120,6 @@ fi
|
||||
#
|
||||
# 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)
|
||||
rh_missing_usr_include_x11=no
|
||||
if test -d "/usr/include/X11"; then
|
||||
|
||||
9
aclocal.m4
vendored
9
aclocal.m4
vendored
@@ -132,15 +132,6 @@ fi
|
||||
#
|
||||
# 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)
|
||||
rh_missing_usr_include_x11=no
|
||||
if test -d "/usr/include/X11"; then
|
||||
|
||||
@@ -210,6 +210,34 @@ typedef enum {
|
||||
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 {
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
@@ -285,7 +313,9 @@ typedef struct WPreferences {
|
||||
char disable_root_mouse; /* disable button events in root window */
|
||||
|
||||
char auto_focus; /* focus window when it's mapped */
|
||||
|
||||
|
||||
char alt_menu_style;
|
||||
|
||||
char *icon_back_file; /* background image for icons */
|
||||
|
||||
WCoord *root_menu_pos; /* initial position of the root menu*/
|
||||
|
||||
259
src/defaults.c
259
src/defaults.c
@@ -170,9 +170,8 @@ static int setIconPosition();
|
||||
static int setClipTitleFont();
|
||||
static int setClipTitleColor();
|
||||
|
||||
#ifdef NEWSTUFF
|
||||
static int setButtonImages();
|
||||
#endif
|
||||
static int setNothing();
|
||||
|
||||
|
||||
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[] = {
|
||||
{"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1},
|
||||
{"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1},
|
||||
@@ -309,7 +330,7 @@ WDefaultEntry staticOptionList[] = {
|
||||
},
|
||||
{"DisableMiniwindows", "NO", NULL,
|
||||
&wPreferences.disable_miniwindows, getBool, NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -446,23 +467,20 @@ WDefaultEntry optionList[] = {
|
||||
&wPreferences.dont_blink, getBool, NULL
|
||||
},
|
||||
#ifdef WEENDOZE_CYCLE
|
||||
{"WindozeCycling","NO", NULL,
|
||||
{"WindozeCycling","NO", NULL,
|
||||
&wPreferences.windoze_cycling, getBool, NULL
|
||||
},
|
||||
{"PopupSwitchMenu","YES",NULL,
|
||||
{"PopupSwitchMenu","YES", NULL,
|
||||
&wPreferences.popup_switchmenu, getBool, NULL
|
||||
},
|
||||
#endif /* WEENDOZE_CYCLE */
|
||||
/* style options */
|
||||
#ifdef NEWSTUFF
|
||||
{"WindowButtonImages", DEF_BUTTON_IMAGES, NULL,
|
||||
&wPreferences.button_images, getRImage, setButtonImages
|
||||
{"AlternativeMenuStyle", "NO", (void*)REFRESH_MENU_TEXTURE,
|
||||
&wPreferences.alt_menu_style, getBool, setNothing
|
||||
},
|
||||
#else
|
||||
{"WidgetColor", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setWidgetColor,
|
||||
},
|
||||
#endif
|
||||
{"WorkspaceSpecificBack","()", NULL,
|
||||
NULL, getWSSpecificBackground, setWorkspaceSpecificBack
|
||||
},
|
||||
@@ -479,7 +497,7 @@ WDefaultEntry optionList[] = {
|
||||
&wPreferences.title_justification, getEnum, setJustify
|
||||
},
|
||||
{"WindowTitleFont", DEF_TITLE_FONT, NULL,
|
||||
NULL, getFont, setWinTitleFont
|
||||
NULL, getFont, setWinTitleFont,
|
||||
},
|
||||
{"MenuTitleFont", DEF_MENU_TITLE_FONT, NULL,
|
||||
NULL, getFont, setMenuTitleFont
|
||||
@@ -907,6 +925,7 @@ wReadStaticDefaults(proplist_t dict)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wDefaultsCheckDomains(void *foo)
|
||||
{
|
||||
@@ -1032,103 +1051,8 @@ wDefaultsCheckDomains(void *foo)
|
||||
}
|
||||
#endif /* !LITE */
|
||||
|
||||
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;
|
||||
}
|
||||
if (!foo)
|
||||
WMAddTimerHandler(DEFAULTS_CHECK_INTERVAL, wDefaultsCheckDomains, foo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1194,59 +1118,62 @@ wReadDefaults(WScreen *scr, proplist_t new_dict)
|
||||
}
|
||||
}
|
||||
|
||||
if (needs_refresh!=0) {
|
||||
if (needs_refresh!=0 && !scr->flags.startup) {
|
||||
int foo;
|
||||
|
||||
foo = 0;
|
||||
if (needs_refresh & REFRESH_MENU_TEXTURES)
|
||||
foo |= MR_TEXT_BACK;
|
||||
if (needs_refresh & REFRESH_MENU_FONT)
|
||||
foo |= MR_RESIZED;
|
||||
if (needs_refresh & REFRESH_MENU_TITLE_TEXTURE)
|
||||
foo |= WTextureSettings;
|
||||
if (needs_refresh & REFRESH_MENU_TITLE_FONT)
|
||||
foo |= MR_TITLE_TEXT;
|
||||
|
||||
foo |= WFontSettings;
|
||||
if (needs_refresh & REFRESH_MENU_TITLE_COLOR)
|
||||
foo |= WColorSettings;
|
||||
if (foo)
|
||||
refreshMenus(scr, foo);
|
||||
WMPostNotificationName(WNMenuTitleAppearanceSettingsChanged, NULL,
|
||||
(void*)foo);
|
||||
|
||||
if (needs_refresh & (REFRESH_WINDOW_TEXTURES|REFRESH_WINDOW_FONT|
|
||||
REFRESH_ICON_TILE))
|
||||
refreshWindows(scr, needs_refresh);
|
||||
foo = 0;
|
||||
if (needs_refresh & REFRESH_MENU_TEXTURE)
|
||||
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);
|
||||
|
||||
if (needs_refresh & REFRESH_ICON_TILE)
|
||||
refreshAppIcons(scr, needs_refresh);
|
||||
|
||||
#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);
|
||||
}
|
||||
foo = 0;
|
||||
if (needs_refresh & REFRESH_WINDOW_FONT) {
|
||||
foo |= WFontSettings;
|
||||
}
|
||||
if (needs_refresh & REFRESH_WINDOW_TEXTURES) {
|
||||
foo |= WTextureSettings;
|
||||
}
|
||||
#endif /* NEWSTUFF */
|
||||
wRefreshDesktop(scr);
|
||||
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)
|
||||
WMPostNotificationName(WNIconTileSettingsChanged, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2623,7 +2550,7 @@ setWTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
|
||||
if (index == WS_UNFOCUSED)
|
||||
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 */
|
||||
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);
|
||||
|
||||
return REFRESH_FORE_COLOR;
|
||||
return REFRESH_MENU_COLOR;
|
||||
#undef gcm
|
||||
}
|
||||
|
||||
@@ -2722,9 +2649,10 @@ setIconTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
|
||||
{
|
||||
XSetForeground(dpy, scr->icon_title_gc, color->pixel);
|
||||
|
||||
return REFRESH_FORE_COLOR;
|
||||
return REFRESH_ICON_TITLE_COLOR;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
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);
|
||||
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;
|
||||
|
||||
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
|
||||
= 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
|
||||
setButtonImages(WScreen *scr, WDefaultEntry *entry, int *value, void *foo)
|
||||
{
|
||||
return REFRESH_BUTTON_IMAGES;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Very ugly kluge.
|
||||
|
||||
@@ -83,6 +83,7 @@ extern Atom _XA_WM_CHANGE_STATE;
|
||||
extern Atom _XA_WM_DELETE_WINDOW;
|
||||
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||
extern Atom _XA_WINDOWMAKER_COMMAND;
|
||||
|
||||
#ifdef OFFIX_DND
|
||||
extern Atom _XA_DND_PROTOCOL;
|
||||
@@ -867,6 +868,10 @@ handleClientMessage(XEvent *event)
|
||||
} else { /* stopping */
|
||||
wColormapAllowClientInstallation(scr, False);
|
||||
}
|
||||
} else if (event->xclient.message_type == _XA_WINDOWMAKER_COMMAND) {
|
||||
|
||||
wDefaultsCheckDomains("bla");
|
||||
|
||||
} else if (event->xclient.message_type == _XA_WINDOWMAKER_WM_FUNCTION) {
|
||||
WApplication *wapp;
|
||||
int done=0;
|
||||
@@ -1715,7 +1720,6 @@ handleMotionNotify(XEvent *event)
|
||||
{
|
||||
WMenu *menu;
|
||||
WScreen *scr = wScreenForRootWindow(event->xmotion.root);
|
||||
WWindow *wwin;
|
||||
|
||||
if (wPreferences.scrollable_menus) {
|
||||
if (event->xmotion.x_root <= 1 ||
|
||||
|
||||
@@ -803,6 +803,11 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
titlelen);
|
||||
|
||||
free(title);
|
||||
|
||||
if (fwin->left_button)
|
||||
handleButtonExpose(&fwin->left_button->descriptor, NULL);
|
||||
if (fwin->right_button)
|
||||
handleButtonExpose(&fwin->right_button->descriptor, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
48
src/icon.c
48
src/icon.c
@@ -57,6 +57,43 @@ static void miniwindowMouseDown(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
|
||||
getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int *dep)
|
||||
{
|
||||
@@ -138,7 +175,11 @@ wIconCreate(WWindow *wwin)
|
||||
wIconUpdate(icon);
|
||||
|
||||
XFlush(dpy);
|
||||
|
||||
|
||||
WMAddNotificationObserver(appearanceObserver, icon,
|
||||
WNIconAppearanceSettingsChanged, icon);
|
||||
WMAddNotificationObserver(tileObserver, icon,
|
||||
WNIconTileSettingsChanged, icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -191,6 +232,9 @@ wIconCreateWithIconFile(WScreen *scr, char *iconfile, int tile)
|
||||
|
||||
wIconUpdate(icon);
|
||||
|
||||
WMAddNotificationObserver(tileObserver, icon,
|
||||
WNIconTileSettingsChanged, icon);
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -202,6 +246,8 @@ wIconDestroy(WIcon *icon)
|
||||
WCoreWindow *core = icon->core;
|
||||
WScreen *scr = core->screen_ptr;
|
||||
|
||||
WMRemoveNotificationObserver(icon);
|
||||
|
||||
if (icon->handlerID)
|
||||
WMDeleteTimerHandler(icon->handlerID);
|
||||
|
||||
|
||||
118
src/kwm.c
118
src/kwm.c
@@ -1636,5 +1636,123 @@ wKWMSendEventMessage(WWindow *wwin, WKWMEventMessage message)
|
||||
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 */
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
*/
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
#define MAINFILE
|
||||
|
||||
#include "WindowMaker.h"
|
||||
#include "window.h"
|
||||
#include "funcs.h"
|
||||
@@ -106,6 +108,7 @@ Atom _XA_WINDOWMAKER_STATE;
|
||||
|
||||
Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||
Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||
Atom _XA_WINDOWMAKER_COMMAND;
|
||||
|
||||
#ifdef OFFIX_DND
|
||||
Atom _XA_DND_PROTOCOL;
|
||||
|
||||
142
src/menu.c
142
src/menu.c
@@ -81,12 +81,51 @@ static void menuTitleMouseDown(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 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;
|
||||
|
||||
#ifndef NEWSTUFF
|
||||
/* XXX */
|
||||
menu->frame->rbutton_image = screen->b_pixmaps[WBUT_CLOSE];
|
||||
#endif
|
||||
|
||||
menu->entry_no = 0;
|
||||
menu->alloced_entries = 0;
|
||||
@@ -187,8 +223,13 @@ wMenuCreate(WScreen *screen, char *title, int main_menu)
|
||||
brother = 0;
|
||||
menu->brother->flags.brother = 1;
|
||||
menu->brother->brother = menu;
|
||||
|
||||
WMAddNotificationObserver(appearanceObserver, menu,
|
||||
WNMenuTitleAppearanceSettingsChanged, menu);
|
||||
|
||||
WMAddNotificationObserver(appearanceObserver, menu,
|
||||
WNMenuAppearanceSettingsChanged, 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*
|
||||
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
|
||||
wMenuRealize(WMenu *menu)
|
||||
@@ -504,28 +548,7 @@ wMenuRealize(WMenu *menu)
|
||||
+ menu->frame->top_width + menu->frame->bottom_width);
|
||||
|
||||
|
||||
/* setup background texture */
|
||||
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);
|
||||
}
|
||||
updateTexture(menu);
|
||||
|
||||
menu->flags.realized = 1;
|
||||
|
||||
@@ -541,6 +564,8 @@ wMenuDestroy(WMenu *menu, int recurse)
|
||||
{
|
||||
int i;
|
||||
|
||||
WMRemoveNotificationObserver(menu);
|
||||
|
||||
/* remove any pending timers */
|
||||
if (menu->timer)
|
||||
WMDeleteTimerHandler(menu->timer);
|
||||
@@ -741,6 +766,7 @@ paintEntry(WMenu *menu, int index, int selected)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
move_menus(WMenu *menu, int x, int y)
|
||||
{
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
|
||||
#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_CHECK 1
|
||||
#define MI_MINIWINDOW 2
|
||||
@@ -102,7 +97,6 @@ typedef struct WMenu {
|
||||
} WMenu;
|
||||
|
||||
|
||||
void wMenuRefresh(WMenu *menu, int flags);
|
||||
void wMenuPaint(WMenu *menu);
|
||||
void wMenuDestroy(WMenu *menu, int recurse);
|
||||
void wMenuRealize(WMenu *menu);
|
||||
|
||||
@@ -1530,6 +1530,10 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
|
||||
if (!warped && !wPreferences.no_autowrap) {
|
||||
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 (scr->current_workspace != oldWorkspace
|
||||
&& wPreferences.edge_resistance > 0
|
||||
@@ -1538,6 +1542,9 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
|
||||
warped = 1;
|
||||
}
|
||||
|
||||
drawFrames(wwin, scr->selected_windows,
|
||||
moveData.realX - wwin->frame_x,
|
||||
moveData.realY - wwin->frame_y);
|
||||
} else {
|
||||
warped = 0;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ extern Atom _XA_WINDOWMAKER_WM_PROTOCOLS;
|
||||
extern Atom _XA_WINDOWMAKER_STATE;
|
||||
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||
extern Atom _XA_WINDOWMAKER_COMMAND;
|
||||
|
||||
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
|
||||
@@ -664,6 +665,8 @@ StartUp(Bool defaultScreenOnly)
|
||||
|
||||
_XA_WINDOWMAKER_NOTICEBOARD = XInternAtom(dpy, "_WINDOWMAKER_NOTICEBOARD",
|
||||
False);
|
||||
|
||||
_XA_WINDOWMAKER_COMMAND = XInternAtom(dpy, "_WINDOWMAKER_COMMAND", False);
|
||||
|
||||
#ifdef OFFIX_DND
|
||||
_XA_DND_SELECTION = XInternAtom(dpy, "DndSelection", False);
|
||||
|
||||
36
src/window.c
36
src/window.c
@@ -129,9 +129,29 @@ static void titlebarDblClick(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*
|
||||
wWindowFor(Window window)
|
||||
@@ -151,6 +171,7 @@ wWindowFor(Window window)
|
||||
if (frame->flags.is_client_window_frame)
|
||||
return frame->child;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -169,6 +190,7 @@ wWindowCreate()
|
||||
wwin->client_descriptor.parent = wwin;
|
||||
wwin->client_descriptor.self = wwin;
|
||||
wwin->client_descriptor.parent_type = WCLASS_WINDOW;
|
||||
|
||||
return wwin;
|
||||
}
|
||||
|
||||
@@ -178,6 +200,8 @@ wWindowDestroy(WWindow *wwin)
|
||||
{
|
||||
int i;
|
||||
|
||||
WMRemoveNotificationObserver(wwin);
|
||||
|
||||
wwin->flags.destroyed = 1;
|
||||
|
||||
for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) {
|
||||
@@ -1135,6 +1159,15 @@ wManageWindow(WScreen *scr, Window window)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
*------------------------------------------------------------
|
||||
* Setup Notification Observers
|
||||
*------------------------------------------------------------
|
||||
*/
|
||||
WMAddNotificationObserver(appearanceObserver, wwin,
|
||||
WNWindowAppearanceSettingsChanged, wwin);
|
||||
|
||||
|
||||
/*
|
||||
*--------------------------------------------------
|
||||
*
|
||||
@@ -1171,6 +1204,9 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
|
||||
|
||||
wwin = wWindowCreate();
|
||||
|
||||
WMAddNotificationObserver(appearanceObserver, wwin,
|
||||
WNWindowAppearanceSettingsChanged, wwin);
|
||||
|
||||
wwin->flags.internal_window = 1;
|
||||
|
||||
WSETUFLAG(wwin, omnipresent, 1);
|
||||
|
||||
@@ -20,11 +20,11 @@ wdwrite_LDADD = $(liblist)
|
||||
|
||||
wxcopy_LDADD = @XLFLAGS@ @XLIBS@
|
||||
|
||||
wxpaste_LDADD = @XLFLAGS@ @XLIBS@
|
||||
wxpaste_LDADD = @XLFLAGS@ @XLIBS@
|
||||
|
||||
getstyle_LDADD = $(liblist)
|
||||
|
||||
setstyle_LDADD = $(liblist)
|
||||
setstyle_LDADD = @XLFLAGS@ @XLIBS@ $(liblist)
|
||||
|
||||
seticons_LDADD= $(liblist)
|
||||
|
||||
|
||||
@@ -106,11 +106,11 @@ wdwrite_LDADD = $(liblist)
|
||||
|
||||
wxcopy_LDADD = @XLFLAGS@ @XLIBS@
|
||||
|
||||
wxpaste_LDADD = @XLFLAGS@ @XLIBS@
|
||||
wxpaste_LDADD = @XLFLAGS@ @XLIBS@
|
||||
|
||||
getstyle_LDADD = $(liblist)
|
||||
|
||||
setstyle_LDADD = $(liblist)
|
||||
setstyle_LDADD = @XLFLAGS@ @XLIBS@ $(liblist)
|
||||
|
||||
seticons_LDADD = $(liblist)
|
||||
|
||||
|
||||
@@ -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",
|
||||
"IconTitleColor",
|
||||
"IconTitleBack",
|
||||
"AlternativeMenuStyle",
|
||||
#ifdef TITLE_TEXT_SHADOW
|
||||
"Shadow",
|
||||
"FShadowColor",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#define PROG_VERSION "setstyle (Window Maker) 0.2"
|
||||
#define PROG_VERSION "setstyle (Window Maker) 0.3"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "../src/wconfig.h"
|
||||
@@ -229,6 +231,11 @@ hackStyle(proplist_t style)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!PLGetDictionaryEntry(style, PLMakeString("AlternativeMenuStyle"))) {
|
||||
PLInsertDictionaryEntry(style, PLMakeString("AlternativeMenuStyle"),
|
||||
PLMakeString("NO"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -370,8 +377,33 @@ main(int argc, char **argv)
|
||||
hackStyle(style);
|
||||
|
||||
PLMergeDictionaries(prop, style);
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -206,12 +206,12 @@ parseTexture(RContext *rc, char *text)
|
||||
case 'H':
|
||||
gtype = RHorizontalGradient;
|
||||
iwidth = scrWidth;
|
||||
iheight = 1;
|
||||
iheight = 8;
|
||||
break;
|
||||
case 'V':
|
||||
case 'v':
|
||||
gtype = RVerticalGradient;
|
||||
iwidth = 1;
|
||||
iwidth = 8;
|
||||
iheight = scrHeight;
|
||||
break;
|
||||
default:
|
||||
@@ -299,12 +299,12 @@ parseTexture(RContext *rc, char *text)
|
||||
case 'H':
|
||||
gtype = RHorizontalGradient;
|
||||
iwidth = scrWidth;
|
||||
iheight = 1;
|
||||
iheight = 8;
|
||||
break;
|
||||
case 'V':
|
||||
case 'v':
|
||||
gtype = RVerticalGradient;
|
||||
iwidth = 1;
|
||||
iwidth = 8;
|
||||
iheight = scrHeight;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user