From d5f177fe662dab41bd9a34438a0283766620736c Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 5 Jan 2000 21:58:04 +0000 Subject: [PATCH] - Put back DisplayFont in defaults.c. It either was removed by error, or the change was incomplete (it was still accessed as a 0x0 pointer from moveres.c at least). - Removed innapropriate comments about sloppy focus from dialog.c. Even if we think it's not a good focus mode, and don't like it, there is no need to be rude with people who use it. Better not support sloppy focus at all, than to suport it and tell to its users they're stupid. --- src/defaults.c | 33 ++++++++++++++++++++++++++++++++- src/dialog.c | 2 -- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/defaults.c b/src/defaults.c index 54568595..8ff4d9d3 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -154,6 +154,7 @@ static int setMenuTextFont(); static int setIconTitleFont(); static int setIconTitleColor(); static int setIconTitleBack(); +static int setDisplayFont(); static int setLargeDisplayFont(); static int setWTitleColor(); static int setFTitleBack(); @@ -230,7 +231,8 @@ static WOptionEnumeration seColormapModes[] = { }; static WOptionEnumeration sePlacements[] = { - {"Auto", WPM_AUTO, 0}, {"Smart", WPM_SMART, 0}, + {"Auto", WPM_AUTO, 0}, + {"Smart", WPM_SMART, 0}, {"Cascade", WPM_CASCADE, 0}, {"Random", WPM_RANDOM, 0}, {"Manual", WPM_MANUAL, 0}, @@ -567,6 +569,9 @@ WDefaultEntry optionList[] = { {"ClipTitleFont", DEF_CLIP_TITLE_FONT, NULL, NULL, getFont, setClipTitleFont }, + {"DisplayFont", DEF_INFO_TEXT_FONT, NULL, + NULL, getFont, setDisplayFont + }, {"LargeDisplayFont",DEF_WORKSPACE_NAME_FONT, NULL, NULL, getFont, setLargeDisplayFont }, @@ -2572,6 +2577,28 @@ setClipTitleFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo) } +static int +setDisplayFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo) +{ + if (scr->info_text_font) { + WMReleaseFont(scr->info_text_font); + } + + scr->info_text_font = font; + + /* This test works because the scr structure is initially zeroed out + and None = 0. Any other time, the window should be valid. */ + if (scr->geometry_display != None) { + wGetGeometryWindowSize(scr, &scr->geometry_display_width, + &scr->geometry_display_height); + XResizeWindow(dpy, scr->geometry_display, + scr->geometry_display_width, scr->geometry_display_height); + } + + return 0; +} + + static int setLargeDisplayFont(WScreen *scr, WDefaultEntry *entry, WMFont *font, void *foo) { @@ -2914,6 +2941,10 @@ setWidgetColor(WScreen *scr, WDefaultEntry *entry, WTexture **texture, void *foo } scr->widget_texture = *(WTexSolid**)texture; + if (scr->geometry_display != None) + XSetWindowBackground(dpy, scr->geometry_display, + scr->widget_texture->normal.pixel); + return 0; } diff --git a/src/dialog.c b/src/dialog.c index 94c5ffb2..6a1aa80b 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -964,8 +964,6 @@ handleLogoPush(XEvent *event, void *data) " .....XmnbN:q&Bo.... ", " ............ "}; static char *msgs[] = { - "Sloppy focus is a *?#@", - "Repent! Sloppy focus users will burn in hell!!!", "Have a nice day!" };