Hello, 

This is a patch, which adds the following option to
ctwm (based on version 3.6 unpatched):

  NoImagesInWorkSpaceManager

If the flag is set, no background images will be displayed
in the workspace map window, which annoyed be.

I also added an entry in the manpage.



Another thing: I think, I found a bug. I tried to solve it myself,
but unsuccessfully. The problem I am having with 3.6:

   If I change the current workspace (either by key or by mouse/map)
   then the actual workspace is not displayed in the reversed form
   (when ReverseCurrentWorkspace is on) until I *resize* a window
   on the workspace.
   This only happens the very first time I change to a workspace.
   Once I resized some window on this workspace, then it works as
   expected.
   I'm not sure if this was the case with 3.5.2 too, but as I 
   remember, it was not.
   I'm also attaching my current .ctwmrc.

kind regards,

 - Tom -


-- 
 [ Thomas Linden - http://www.daemon.de/ - [EMAIL PROTECTED] ] 
 $_=`perl -v`;s;^.*ll;;s;$^=unpack"u","'8V]D;')E<```";s;\W;;gs;$/=7*
 ($^=~s;.;;g);%^=map{$_=>1}split//,lc;$_=join$\,(sort keys(%^))[map{
 ord($_)-$/}split//,'1I7E13?@E:7C1A7C=1:35<7C'];s"0(.)" \U$1"g;print;

diff -r -c ctwm-3.6.orig/ctwm.man ctwm-3.6/ctwm.man
*** ctwm-3.6.orig/ctwm.man      Tue Oct 15 21:50:49 2002
--- ctwm-3.6/ctwm.man   Tue Oct 15 23:47:57 2002
***************
*** 983,988 ****
--- 983,992 ----
  window when the pointer is in an IconManager.
  .IP "\fBNoIconManagers\fP" 8
  This variable indicates that no icon manager should be created.
+ .IP "\fBNoImagesInWorkSpaceManager\fP" 8
+ This variable turns off displaying of background images in the WorkSpaceMap.
+ Instead only the colors defined in \fBWorkSpaces\fP will be used as background
+ in the WorkSpaceMap.
  .IP "\fBNoMenuShadows\fP" 8
  This variable indicates that menus should not have drop shadows drawn behind
  them.  This is typically used with slower servers since it speeds up menu
diff -r -c ctwm-3.6.orig/parse.c ctwm-3.6/parse.c
*** ctwm-3.6.orig/parse.c       Tue Oct 15 21:50:49 2002
--- ctwm-3.6/parse.c    Tue Oct 15 23:12:49 2002
***************
*** 631,636 ****
--- 631,637 ----
  #define kw0_PackNewWindows            61
  #define kw0_IgnoreCaseInMenuSelection 62
  #define kw0_SloppyFocus                 63
+ #define kw0_NoImagesInWorkSpaceManager  64
  
  #define kws_UsePPosition              1
  #define kws_IconFont                  2
***************
*** 962,967 ****
--- 963,969 ----
      { "noiconmanagerfocus",   KEYWORD, kw0_NoIconManagerFocus },
      { "noiconmanagers",               KEYWORD, kw0_NoIconManagers },
      { "noicontitle",          NO_ICON_TITLE, 0  },
+     { "noimagesinworkspacemanager", KEYWORD, kw0_NoImagesInWorkSpaceManager },
      { "nomenushadows",                KEYWORD, kw0_NoMenuShadows },
      { "noopaquemove",         NOOPAQUEMOVE, 0 },
      { "noopaqueresize",               NOOPAQUERESIZE, 0 },
***************
*** 1350,1355 ****
--- 1352,1361 ----
  
        case kw0_SloppyFocus:
        Scr->SloppyFocus = TRUE;
+       return 1;
+ 
+       case kw0_NoImagesInWorkSpaceManager:
+       Scr->NoImagesInWorkSpaceManager = TRUE;
        return 1;
  
      }
diff -r -c ctwm-3.6.orig/screen.h ctwm-3.6/screen.h
*** ctwm-3.6.orig/screen.h      Tue Oct 15 21:50:49 2002
--- ctwm-3.6/screen.h   Tue Oct 15 22:33:13 2002
***************
*** 386,391 ****
--- 386,392 ----
      short IgnoreLockModifier; /* Should we ignore the lock modifier */
      unsigned int IgnoreModifier;
      short IgnoreCaseInMenuSelection;  /* Should we ignore case in menu selection */
+   short NoImagesInWorkSpaceManager;   /* do not display mini images of the desktop 
+background images on WSmap */
  
      FuncKey FuncKeyRoot;
      FuncButton FuncButtonRoot;
diff -r -c ctwm-3.6.orig/workmgr.c ctwm-3.6/workmgr.c
*** ctwm-3.6.orig/workmgr.c     Tue Oct 15 21:50:49 2002
--- ctwm-3.6/workmgr.c  Tue Oct 15 23:40:01 2002
***************
*** 447,459 ****
      Scr->iconmgr = newscr->iconmgr;
  
      if (useBackgroundInfo) {
!       if (oldscr->image == None)
            XSetWindowBackground (dpy, oldscr->mapSubwindow.w, oldscr->backcp.back);
        else
            XSetWindowBackgroundPixmap (dpy, oldscr->mapSubwindow.w, 
oldscr->image->pixmap);
      }
      else {
!       if (Scr->workSpaceMgr.workspaceWindow.defImage == None)
            XSetWindowBackground (dpy, oldscr->mapSubwindow.w,
                        Scr->workSpaceMgr.workspaceWindow.defColors.back);
        else
--- 447,459 ----
      Scr->iconmgr = newscr->iconmgr;
  
      if (useBackgroundInfo) {
!       if (oldscr->image == None || Scr->NoImagesInWorkSpaceManager)
            XSetWindowBackground (dpy, oldscr->mapSubwindow.w, oldscr->backcp.back);
        else
            XSetWindowBackgroundPixmap (dpy, oldscr->mapSubwindow.w, 
oldscr->image->pixmap);
      }
      else {
!       if (Scr->workSpaceMgr.workspaceWindow.defImage == None || 
Scr->NoImagesInWorkSpaceManager)
            XSetWindowBackground (dpy, oldscr->mapSubwindow.w,
                        Scr->workSpaceMgr.workspaceWindow.defColors.back);
        else
***************
*** 1382,1394 ****
  
        wlist->mapSubwindow.wl = NULL;
        if (useBackgroundInfo) {
!           if (wlist->image == None)
                XSetWindowBackground (dpy, wlist->mapSubwindow.w, wlist->backcp.back);
            else
                XSetWindowBackgroundPixmap (dpy, wlist->mapSubwindow.w, 
wlist->image->pixmap);
        }
        else {
!           if (Scr->workSpaceMgr.workspaceWindow.defImage == None)
                XSetWindowBackground (dpy, wlist->mapSubwindow.w,
                        Scr->workSpaceMgr.workspaceWindow.defColors.back);
            else
--- 1382,1394 ----
  
        wlist->mapSubwindow.wl = NULL;
        if (useBackgroundInfo) {
!           if (wlist->image == None || Scr->NoImagesInWorkSpaceManager)
                XSetWindowBackground (dpy, wlist->mapSubwindow.w, wlist->backcp.back);
            else
                XSetWindowBackgroundPixmap (dpy, wlist->mapSubwindow.w, 
wlist->image->pixmap);
        }
        else {
!           if (Scr->workSpaceMgr.workspaceWindow.defImage == None || 
Scr->NoImagesInWorkSpaceManager)
                XSetWindowBackground (dpy, wlist->mapSubwindow.w,
                        Scr->workSpaceMgr.workspaceWindow.defColors.back);
            else

# -*-sh-*-
# .ctwm config file for CTWM
#
# Thomas Linden, <[EMAIL PROTECTED]>
#
# see ctwm(1), showrgb(1), xev(1)
#
# $Id$



#
# region on the root window where icons are placed
IconRegion  "150x400+0+0" NORTH WEST 75 25



#
# Define the colors to be used
# (hint: look for colors in rgb.txt delivered with X)
#
Color {
 BorderColor          "purple3"  # active windows
 BorderTileBackground "gray70"   # inactive windows
 BorderTileForeground "gray70"   # inactive windows
 TitleForeground      "purple3"
 TitleBackground      "gray90"
 MenuForeground       "purple4"
 MenuBackground       "gray95"
 MenuTitleForeground  "purple4"
 MenuTitleBackground  "White"
 IconForeground       "purple4"
 IconBackground       "White"
 IconBorderColor      "purple3"
}


#
# 3D stuff
#
UseThreeDMenus
UseThreeDIconManagers
MenuShadowDepth 1
BorderShadowDepth 0   # flatten the 3D border




#
# show a resize cursor on borders
#
BorderResizeCursors


#
# keep menus up until something happens
#
StayUpMenus



#
# show only a minimum title bar (as BE does)
#
SqueezeTitle {
 "*" right 0 0
}


#
# start after 3 pixels on moving
#
MoveDelta 1


#
# forbidden zone at the bottom of the screen
#
BorderBottom 30


#
# do place new windows without user input
#
RandomPlacement off


#
# at re-start use previous session state
RestartPreviousState


#
# special fonts for titles and menus (smaller than the default)
# (hint: look for fonts with 'xfontsel')
#
TitleFont     "-*-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1"
MenuFont      "-*-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1"
IconFont       "-adobe-courier-medium-r-*-*-12-*-*-*-*-*-*-1"
WorkSpaceFont "-*-times-*-r-*-*-8-*-*-*-*-44-iso8859-1"
IconManagerFont "-adobe-courier-medium-r-*-*-12-*-*-*-*-*-*-1"


#
# left button on a border resizes window
#
Button1 =      : f            : f.resize



#
# ALT-LEFT-MOUSE inside a window, icon or title moves it
#
Button1 = m    : w|t|i        : f.move



#
# ALT-MIDDLE-MOUSE inside a window or title resizes it
#
Button2 = m    : w|t        : f.resize




#
# ALT-TAB switches between windows
#
"Tab"   = m    : all        : f.warpring "next"



#
# menu shortcuts, works only on root window
#
Button1 =   : root : f.menu "appz"
Button2 =   : root : f.menu "TwmWorkspaces"
Button2 = m : root : f.menu "TwmIcons"
Button3 =   : root : f.menu "ctwm"



#
# window menu on window title
#
Button3 = : t    : f.menu "ctwm"


#
# use F1-F4 to jump directly to another desktop
#
"F1"      =   : all : f.gotoworkspace "Shanice"
"F2"      =   : all : f.gotoworkspace "Tonique"
"F3"      =   : all : f.gotoworkspace "Ashrakk"
"F4"      =   : all : f.gotoworkspace "Mektahh"
"F5"      =   : all : f.gotoworkspace "Sharii"
"F6"      =   : all : f.gotoworkspace "Osiris"


#
# ALT-F1 pops up the apps menu
#
"F1"      =  m : all : f.menu "appz"


#
# CTRL-TAB shows the workspaces menu (tasklist)
#
# "Tab" = c : all : f.menu "TwmWorkspaces"



#
# add another window-icon for closing windows
#
RightTitleButton ":xlogo" = f.deleteordestroy




#
# raise windows when switching/moving
#
AutoRaise


#
# Do not automatically raise windows (as of 'AutoRaise')
# instead raise on click event only.
#
#RaiseOnClick


#
# wait 20 milliseconds for raising
# (valid for 'AutoRaise' only)
#
RaiseDelay 200




#
# move/resize windows with content - opaque
#
OpaqueMove
OpaqueResize




#
# new windows are better placed
#
PackNewWindows




#
# which stuff we dont want in the switch list
# (requires 3.5.2)
#
WindowRingExclude {
  "WorkSpaceManager"
  "TWM Icon Manager"
  "xclock"
  "FreeAmp*"
}




#
# keep something on top
#
AlwaysOnTop {
 "xrun"
 "WorkSpaceManager"
 "TWM Icon Manager"
 "xconsole"
 "xclock"
 "FreeAmp*"
 "Occupy Window"
}


#
# switch only visible windows
#
WarpRingOnScreen



#
# run the pager
#
ShowWorkSpaceManager



#
# move windows from pager with content (opaque)
#
ReallyMoveInWorkspaceManager



#
# warp pointer into window, when iconified
#
WarpCursor



#
# place it on the right bottom
#
WorkSpaceManagerGeometry        "250x32-0-0" 6  




#
# highlight the current desktop
#
ReverseCurrentWorkspace 


#
# start as map, so we see window tumbnails of the windows
#
StartInMapState




#
# the desktops
#
WorkSpaces {
 "Shanice"     {"grey60" "black" "black"       "black" "xpm:/home/scip/bg-xpm/bg1.xpm"}
 "Tonique"     {"grey60" "black" "gray20"      "black" "xpm:/home/scip/bg-xpm/bg2.xpm"}
 "Ashrakk"     {"grey60" "black" "grey30"      "black" "xpm:/home/scip/bg-xpm/bg3.xpm"}
 "Mektahh"     {"grey60" "black" "gray40"      "black" "xpm:/home/scip/bg-xpm/bg4.xpm"}
 "Sharii"      {"grey60" "black" "gray60"      "black" "xpm:/home/scip/bg-xpm/bg5.xpm"}
 "Osiris"      {"grey60" "black" "gray80"      "black" "xpm:/home/scip/bg-xpm/bg6.xpm"}
}




#
# programs without title
#
Notitle {
 "WorkSpaceManager"
 "TWM Icon Manager"
 "xconsole"
 "xclock"
 "xmms"
 "xmessage"
 "FreeAmp*"
 "Occupy Window"
 "xrun"
}




#
# what the iconbox should not show
#
IconManagerDontShow {
 "TWM Icon Manager"
 "WorkSpaceManager"
} 


#
# dont show WorkSpaceManager and IconManagers in window menus
#
ShortAllWindowsMenus



#
# display on all desktops
#
OccupyAll {
 "xclock"
  "FreeAmp*"
}


#
# do not show occupyall windows in the workspace
#
NoShowOccupyAll



#
# custom maximize funcion
#
Function "maximize" {
  f.fill "left"
  f.fill "right"
  f.fill "top"
  f.fill "bottom"
} 



#
# custom run... dialog, always gets focus
#
Function "xrun" {
 f.exec "xrun &"
 f.warpto "xrun"
}



#
# the apps menu
#
menu "appz" {
 "Apps Menu" ("white":"blue") f.title
 "run..."            f.function "xrun"
 "rxvt"              !"rxvt -sl 5000 -vb -fn fixed &"
 "xterm"             !"xterm -geometry 100x70 -vb -fn fixed -e bash &"
 "emacs"             !"emacs -fn 6x13 &"
 "-"                 f.separator
 "netscape"          !"netscape &" 
 "konqueror"         !"konqueror &"
 "opera"             !"opera &"
 "mozilla"           !"/usr/local/netscape/netscape &"
 "cdplayer"          !"kscd &"
 "-"                 f.separator
 "restart"           f.restart
 "-"                 f.separator
 "Show Icon Manager" f.showiconmgr
 "Hide Icon Manager" f.hideiconmgr
 "-"                 f.separator
 "Icons"             f.menu "TwmIcons"
 "-"                 f.separator
 "xlock"             !"xscreensaver-command -activate "
 "-"                 !"/bin/true"
 "exit"              f.quit
}




#
# the window menu
#
menu "ctwm" {
 "Window Operations"     f.title
 "Warp to.."             f.occupy
 "Occupy All"            f.occupyall
 "Identify"              f.identify
 "Maximize Window"       f.function "maximize"
 "Move Window"           f.move
 "Resize Window"         f.resize
 "Raise Window"          f.raise
 "Lower Window"          f.lower
 "(De)Iconify"           f.iconify
 "Refresh"               f.refresh
 ""                      f.separator
 "Close"                 f.deleteordestroy
 "Destroy Window"        f.destroy
}



----- End forwarded message -----

-- 
 [ Thomas Linden - http://www.daemon.de/ - [EMAIL PROTECTED] ] 
 $_=`perl -v`;s;^.*ll;;s;$^=unpack"u","'8V]D;')E<```";s;\W;;gs;$/=7*
 ($^=~s;.;;g);%^=map{$_=>1}split//,lc;$_=join$\,(sort keys(%^))[map{
 ord($_)-$/}split//,'1I7E13?@E:7C1A7C=1:35<7C'];s"0(.)" \U$1"g;print;

Reply via email to