Completely disable clip caption.

Original-patch-by: Alexey Voinov <[email protected]>
Signed-off-by: Alexey I. Froloff <[email protected]>
---
 src/WindowMaker.h |    2 ++
 src/defaults.c    |    2 ++
 src/dock.c        |    3 ++-
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ac37bc4..e8e3fd6 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -422,6 +422,8 @@ typedef struct WPreferences {
     RImage *swtileImage;
     RImage *swbackImage[9];
 
+    int show_clip_title;
+
     struct {
         unsigned int nodock:1;        /* don't display the dock */
         unsigned int noclip:1;         /* don't display the clip */
diff --git a/src/defaults.c b/src/defaults.c
index b3660ca..88a38bc 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -472,6 +472,8 @@ WDefaultEntry optionList[] = {
            NULL, getFont, setIconTitleFont, NULL, NULL},
        {"ClipTitleFont", DEF_CLIP_TITLE_FONT, NULL,
            NULL, getFont, setClipTitleFont, NULL, NULL},
+       {"ShowClipTitle", "YES", NULL,
+               &wPreferences.show_clip_title, getBool, NULL, NULL, NULL},
        {"LargeDisplayFont", DEF_WORKSPACE_NAME_FONT, NULL,
            NULL, getFont, setLargeDisplayFont, NULL, NULL},
        {"HighlightColor", "white", NULL,
diff --git a/src/dock.c b/src/dock.c
index 1892043..70be119 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -1183,7 +1183,8 @@ void wClipIconPaint(WAppIcon * aicon)
 
        tx = CLIP_BUTTON_SIZE * ICON_SIZE / 64;
 
-       WMDrawString(scr->wmscreen, win, color, scr->clip_title_font, tx, ty, 
ws_name, length);
+       if(wPreferences.show_clip_title)
+               WMDrawString(scr->wmscreen, win, color, scr->clip_title_font, 
tx, ty, ws_name, length);
        /*WMDrawString(scr->wmscreen, win, color, scr->clip_title_font, 4,
           2, ws_name, length); */
 
-- 
1.7.2.3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to