#
# LXP: Generated at 22-12-06 17:54
#
# This patch modifies the icewm adding new features
# 1.- new look lookXP
# 2.- allows pixmaps for mouse over in buttons
# 3.- allows left pixmaps in menus (top middle and botom)
# 4.- adds a new script to session manager: (restart)
# 5.- Other bugs fixed or little changes
#
# In order to use the new features you have to configure with:
# ./configure --enable-lookxp
# or rpmbuild --with lookxp
#
# Also you have to use one of the WinXP themes provided
#
#          LXP Team (http://lxp.sourceforge.net)
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atasks.h icewm-1.2.30.LXP/src/atasks.h
--- icewm-1.2.30/src/atasks.h	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/atasks.h	2006-12-14 17:55:14.000000000 +0100
@@ -43,6 +43,7 @@
     bool fFlashOn;
     time_t fFlashStart;
     int selected;
+    int over; //LXP
     YTimer *fFlashTimer;
     static YTimer *fRaiseTimer;
 };
@@ -60,10 +61,16 @@
     TaskBarApp *getLast() const { return fLast; }
 
     void relayout() { fNeedRelayout = true; }
-    void relayoutNow();
+    bool relayoutNow(); //LXP
 
     virtual void handleClick(const XButtonEvent &up, int count);
     virtual void paint(Graphics &g, const YRect &r);
+#ifdef CONFIG_LOOK_WINXP
+    virtual void handleDrag(const XButtonEvent &down, const XMotionEvent &motion)//LXP
+                 {parent()->handleDrag(down,motion);}//LXP
+    virtual void handleEndDrag(const XButtonEvent &down, const XButtonEvent &up)//LXP
+                 {parent()->handleEndDrag(down,up);}//LXP
+#endif
 private:
     TaskBarApp *fFirst, *fLast;
     int fCount;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atray.h icewm-1.2.30.LXP/src/atray.h
--- icewm-1.2.30/src/atray.h	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/atray.h	2006-12-14 17:55:14.000000000 +0100
@@ -67,7 +67,7 @@
     int getRequiredWidth();
 
     void relayout() { fNeedRelayout = true; }
-    void relayoutNow();
+    bool relayoutNow();
 
     virtual void handleClick(const XButtonEvent &up, int count);
     virtual void paint(Graphics &g, const YRect &r);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aworkspaces.h icewm-1.2.30.LXP/src/aworkspaces.h
--- icewm-1.2.30/src/aworkspaces.h	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/aworkspaces.h	2006-12-14 17:55:14.000000000 +0100
@@ -19,7 +19,6 @@
     virtual void actionPerformed(YAction *button, unsigned int modifiers);
     virtual ref<YFont> getFont();
     virtual YColor * getColor();
-    virtual YSurface getSurface();
 
 private:
     static YTimer *fRaiseTimer;
@@ -49,6 +48,9 @@
 
 extern ref<YPixmap> workspacebuttonPixmap;
 extern ref<YPixmap> workspacebuttonactivePixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+extern ref<YPixmap> workspacebuttonoverPixmap; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
 extern ref<YPixbuf> workspacebuttonPixbuf;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/bindkey.h icewm-1.2.30.LXP/src/bindkey.h
--- icewm-1.2.30/src/bindkey.h	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/bindkey.h	2006-12-14 17:55:14.000000000 +0100
@@ -5,6 +5,7 @@
 #define defgKeyWinOccupyAll             XK_F2, kfAlt, "Alt+F2"
 #define defgKeyWinLower                 XK_F3, kfAlt, "Alt+F3"
 #define defgKeyWinClose                 XK_F4, kfAlt, "Alt+F4"
+#define defgKeyWinKill                  XK_F4, kfCtrl, "Ctrl+F4"
 #define defgKeyWinRestore               XK_F5, kfAlt, "Alt+F5"
 #define defgKeyWinNext                  XK_F6, kfAlt, "Alt+F6"
 #define defgKeyWinPrev                  XK_F6, kfAlt+kfShift, "Alt+Shift+F6"
@@ -120,6 +121,7 @@
 DEF_WMKEY(gKeyWinOccupyAll);
 DEF_WMKEY(gKeyWinLower);
 DEF_WMKEY(gKeyWinClose);
+DEF_WMKEY(gKeyWinKill);
 DEF_WMKEY(gKeyWinRestore);
 DEF_WMKEY(gKeyWinPrev);
 DEF_WMKEY(gKeyWinNext);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/default.h icewm-1.2.30.LXP/src/default.h
--- icewm-1.2.30/src/default.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/default.h	2006-12-14 17:55:14.000000000 +0100
@@ -4,6 +4,8 @@
 #include "yconfig.h"
 
 /************************************************************************************************************************************************************/
+XIV(bool, disableCtrlAltDelWin,			false)
+XIV(bool, disableTaskBarMenu,			false)
 XIV(bool, clickFocus,                           true)
 XIV(bool, focusOnAppRaise,                      true) 
 XIV(bool, raiseOnFocus,                         true)
@@ -47,7 +49,9 @@
 XIV(bool, taskBarShowAllWindows,                false)
 XIV(bool, taskBarShowWindowIcons,               true)
 XIV(bool, taskBarAutoHide,                      false)
+#ifndef CONFIG_LOOK_WINXP
 XIV(bool, taskBarDoubleHeight,                  false)
+#endif
 XIV(bool, taskBarWorkspacesLeft,                true)
 XIV(bool, taskBarShowCPUStatus,                 true)
 XIV(bool, taskBarShowNetStatus,                 true)
@@ -166,6 +170,8 @@
 #if defined(CFGDEF) && !defined(NO_CONFIGURE)
 
 cfoption icewm_preferences[] = {
+    OBV("DisableCtrlAltDelWin",                 &disableCtrlAltDelWin,          "Disable Ctrl+Alt-Del window"),
+    OBV("DisableTaskBarMenu",                   &disableTaskBarMenu,            "Disable right click task bar menu"),
     OBV("ClickToFocus",                         &clickFocus,                    "Focus windows by clicking"),
     OBV("FocusOnAppRaise",                      &focusOnAppRaise,               "Focus windows when application requests to raise"),
     OBV("RaiseOnFocus",                         &raiseOnFocus,                  "Raise windows when focused"),
@@ -250,7 +256,9 @@
     OBV("TaskBarShowCPUStatus",                 &taskBarShowCPUStatus,          "Show CPU status on task bar (Linux             & Solaris)"),
     OBV("TaskBarShowNetStatus",                 &taskBarShowNetStatus,          "Show network status on task bar (Linux only)"),
     OBV("TaskBarShowCollapseButton",            &taskBarShowCollapseButton,     "Show a button to collapse the taskbar"),
+#ifndef CONFIG_LOOK_WINXP
     OBV("TaskBarDoubleHeight",                  &taskBarDoubleHeight,           "Use double-height task bar"),
+#endif
     OBV("TaskBarWorkspacesLeft",                &taskBarWorkspacesLeft,         "Place workspace pager on left, not right"),
     OBV("TaskBarLaunchOnSingleClick",           &taskBarLaunchOnSingleClick,    "Execute taskbar applet commands (like MailCommand,     ClockCommand,   ...) on single click"),
 #endif
@@ -355,6 +363,7 @@
     OKV("KeyWinOccupyAll",                      gKeyWinOccupyAll,               ""),
     OKV("KeyWinLower",                          gKeyWinLower,                   ""),
     OKV("KeyWinClose",                          gKeyWinClose,                   ""),
+    OKV("KeyWinKill",                           gKeyWinKill,                    ""),
     OKV("KeyWinRestore",                        gKeyWinRestore,                 ""),
     OKV("KeyWinPrev",                           gKeyWinPrev,                    ""),
     OKV("KeyWinNext",                           gKeyWinNext,                    ""),
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/icewmbg_prefs.h icewm-1.2.30.LXP/src/icewmbg_prefs.h
--- icewm-1.2.30/src/icewmbg_prefs.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/icewmbg_prefs.h	2006-12-14 17:55:14.000000000 +0100
@@ -8,6 +8,7 @@
 XSV(const char *, DesktopTransparencyColor, 0)
 XSV(const char *, DesktopTransparencyPixmap, 0)
 XIV(bool, desktopBackgroundScaled, false)
+XIV(bool, desktopMaintainAspect, true)
 XIV(bool, centerBackground, false)
 XIV(bool, supportSemitransparency, true)
 
@@ -18,7 +19,8 @@
 cfoption icewmbg_prefs[] = {
     OBV("DesktopBackgroundCenter",              &centerBackground,              "Display desktop background centered and not tiled"),
     OBV("SupportSemitransparency",              &supportSemitransparency,       "Support for semitransparent terminals like Eterm or gnome-terminal"),
-    OBV("DesktopBackgroundScaled",              &desktopBackgroundScaled,        "Desktop background scaled to full screen"),
+    OBV("DesktopBackgroundScaled",              &desktopBackgroundScaled,       "Desktop background scaled to full screen"), //FX
+    OBV("DesktopImageMaintainAspect",           &desktopMaintainAspect,         "Desktop background scaled maintain aspect"),
     OSV("DesktopBackgroundColor",               &DesktopBackgroundColor,        "Desktop background color"),
     OSV("DesktopBackgroundImage",               &DesktopBackgroundPixmap,       "Desktop background image"),
     OSV("DesktopTransparencyColor",             &DesktopTransparencyColor,      "Color to announce for semi-transparent windows"),
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/objbutton.h icewm-1.2.30.LXP/src/objbutton.h
--- icewm-1.2.30/src/objbutton.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/objbutton.h	2006-12-14 17:55:14.000000000 +0100
@@ -31,6 +31,8 @@
 };
 
 extern ref<YPixmap> toolbuttonPixmap;
+extern ref<YPixmap> toolbuttonPixmapO;
+extern ref<YPixmap> toolbuttonPixmapA;
 
 #ifdef CONFIG_GRADIENTS
 extern ref<YPixbuf> toolbuttonPixbuf;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/themable.h icewm-1.2.30.LXP/src/themable.h
--- icewm-1.2.30/src/themable.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/themable.h	2006-12-14 17:55:14.000000000 +0100
@@ -8,7 +8,15 @@
 #else 
 XIV(bool, prettyClock,                          true)
 #endif
+#ifdef CONFIG_LOOK_WINXP
+XIV(bool, taskBarDoubleHeight,                  false) 
+#endif
 XIV(bool, rolloverTitleButtons,                 false)
+XIV(int,  taskBarHeight,			0)
+XIV(int,  taskButtonHeight,			0)
+XIV(int,  taskButtonWidth,			0)
+XIV(int,  taskButtonSepSize,			0)
+XIV(bool, trayPanelUseBgPixmaps,		true)
 
 XIV(bool, trayDrawBevel,                        false)
 XIV(bool, titleBarCentered,                     false)
@@ -30,6 +38,9 @@
 XIV(int, scrollBarHeight,                       16)
 
 XIV(int, menuIconSize,                          16)
+#ifdef CONFIG_LOOK_WINXP
+XIV(int, startmenuIconSize,                     32) //LXP
+#endif
 XIV(int, smallIconSize,                         16)
 XIV(int, largeIconSize,                         32)
 XIV(int, hugeIconSize,                          48)
@@ -42,6 +53,7 @@
 XSV(const char *, titleButtonsLeft,             "s")
 XSV(const char *, titleButtonsRight,            "xmir")
 XSV(const char *, titleButtonsSupported,        "xmis");
+XSV(const char *, windowActionsSupported,	"mixhrd kzvftwl");
 XSV(const char *, themeAuthor,                  0)
 XSV(const char *, themeDescription,             0)
 
@@ -93,6 +105,7 @@
 XSV(const char *, clrQuickSwitchActive,         0)
 //#ifdef CONFIG_TASKBAR
 XSV(const char *, clrDefaultTaskBar,            "rgb:C0/C0/C0")
+XSV(const char *, clrTaskBar,                   "rgb:80/80/80")
 //#endif
 XSV(const char *, clrNormalButton,              "rgb:C0/C0/C0")
 XSV(const char *, clrNormalButtonText,          "rgb:00/00/00")
@@ -154,6 +167,15 @@
 #ifndef LITE
     OBV("RolloverButtonsSupported",                             &rolloverTitleButtons,                      "Does it support the 'O' title bar button images (for mouse rollover)"),
 #endif
+#ifdef CONFIG_LOOK_WINXP
+    OBV("TaskBarDoubleHeight",                  &taskBarDoubleHeight,           "Use double-height task bar"), //LXP
+#endif
+    OIV("TaskBarHeight",                        &taskBarHeight, 0, 64,          "Taskbar Height (default SmallIconSize + 8)"),
+    OIV("TaskButtonHeight",                     &taskButtonHeight, 0, 64,       "Height for button elements in taskbar (default TaskBarHeight)"),
+    OIV("TaskButtonWidth",                      &taskButtonWidth, 0, 256,       "Width for button elements in taskpanel (default taskPanelWidth/TaskbarButtonDivisor )"),
+    OIV("TaskButtonSeparatorSize",              &taskButtonSepSize, 0, 64,      "Distance between task buttons (default 0)"),
+    OBV("TrayPanelUseBgPixmaps",                &trayPanelUseBgPixmaps,         "TrayPanel will use the some taskbutton[..].xpm pixmaps (default true)"),
+
     OBV("TaskBarClockLeds",                     &prettyClock,                   "Task bar clock/APM uses nice pixmapped LCD display (but then it doesn't display correctly in many languages anymore, e.g. for Japanese and Korean it works only when a real font is used and not the LEDs"),
     OBV("TrayDrawBevel",                        &trayDrawBevel,                 "Surround the tray with plastic border"),
 
@@ -176,6 +198,9 @@
     OIV("ScrollBarY",                           &scrollBarHeight, 0, 64,        "Scrollbar (button) height"),
 
     OIV("MenuIconSize",                         &menuIconSize, 8, 128,          "Menu icon size"),
+#ifdef CONFIG_LOOK_WINXP
+    OIV("StartMenuIconSize",                    &startmenuIconSize, 8, 128,     "Start Menu icon size"), //LXP
+#endif
     OIV("SmallIconSize",                        &smallIconSize, 8, 128,         "Dimension of the small icons"),
     OIV("LargeIconSize",                        &largeIconSize, 8, 128,         "Dimension of the large icons"),
     OIV("HugeIconSize",                         &hugeIconSize, 8, 128,         "Dimension of the large icons"),
@@ -192,6 +217,7 @@
     OSV("TitleButtonsLeft",                     &titleButtonsLeft,              "Titlebar buttons from left to right (x=close,  m=max,  i=min,  h=hide, r=rollup,       s=sysmenu,      d=depth)"),
     OSV("TitleButtonsRight",                    &titleButtonsRight,             "Titlebar buttons from right to left (x=close,  m=max,  i=min,  h=hide, r=rollup,       s=sysmenu,      d=depth)"),
     OSV("TitleButtonsSupported",                &titleButtonsSupported,         "Titlebar buttons supported by theme (x,m,i,r,h,s,d)"),
+    OSV("WindowActionsSupported",               &windowActionsSupported,        "Menu Window actions supported by theme (x,m,i,r,h,d, kzvftwl)"),
 /************************************************************************************************************************************************************
  * Font definitions
  ************************************************************************************************************************************************************/
@@ -261,7 +287,8 @@
     OSV("ColorQuickSwitchText",                 &clrQuickSwitchText,            "Textcolor in the quick switch window"),
     OSV("ColorQuickSwitchActive",               &clrQuickSwitchActive,          "Rectangle arround the active icon in the quick switch window"),
 #ifdef CONFIG_TASKBAR
-    OSV("ColorDefaultTaskBar",                  &clrDefaultTaskBar,             "Background of the taskbar"),
+    OSV("ColorDefaultTaskBar",                  &clrDefaultTaskBar,             "Default Background of the taskbar & tray"),
+    OSV("ColorTaskBar",                         &clrTaskBar,                    "Background of the taskbar"),
     OSV("ColorNormalTaskBarApp",                &clrNormalTaskBarApp,           "Background for task buttons of regular windows"),
     OSV("ColorNormalTaskBarAppText",            &clrNormalTaskBarAppText,       "Textcolor for task buttons of regular windows"),
     OSV("ColorActiveTaskBarApp",                &clrActiveTaskBarApp,           "Background for task buttons of the active window"),
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmabout.h icewm-1.2.30.LXP/src/wmabout.h
--- icewm-1.2.30/src/wmabout.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmabout.h	2006-12-14 17:55:14.000000000 +0100
@@ -14,6 +14,7 @@
 private:
     YLabel *fProgTitle;
     YLabel *fCopyright;
+    YLabel *fLXP;
     YLabel *fThemeName;
     YLabel *fThemeDescription;
     YLabel *fThemeAuthor;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmapp.h icewm-1.2.30.LXP/src/wmapp.h
--- icewm-1.2.30/src/wmapp.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmapp.h	2006-12-14 17:55:14.000000000 +0100
@@ -86,4 +86,18 @@
 extern CtrlAltDelete *ctrlAltDelete;
 extern int rebootOrShutdown;
 
+#ifdef CONFIG_LOOK_WINXP
+extern YIcon *Icon_MenuSelected; //LXP
+extern YIcon *Icon_Program; //LXP
+extern YIcon *Icon_Theme; //LXP
+extern YIcon *Icon_Folder; //LXP
+extern YIcon *Icon_Logout; //LXP
+#else
+ #define Icon_Program NULL
+ #define Icon_Theme NULL
+ #define Icon_Folder NULL
+ #define Icon_Logout NULL
+ #define Icon_Theme NULL
+#endif
+
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmframe.h icewm-1.2.30.LXP/src/wmframe.h
--- icewm-1.2.30/src/wmframe.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmframe.h	2006-12-14 17:55:14.000000000 +0100
@@ -576,7 +576,7 @@
 extern ref<YPixmap> titleR[2];
 extern ref<YPixmap> titleQ[2];
 
-extern ref<YPixmap> menuButton[2];
+extern ref<YPixmap> menuButton[3];
 
 #ifdef CONFIG_GRADIENTS
 class YPixbuf;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmprog.h icewm-1.2.30.LXP/src/wmprog.h
--- icewm-1.2.30/src/wmprog.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmprog.h	2006-12-14 17:55:14.000000000 +0100
@@ -80,7 +80,7 @@
 
 class StartMenu: public MenuFileMenu {
 public:
-    StartMenu(const char *name, YWindow *parent = 0);
+    StartMenu(const char *name, int isize, YWindow *parent = 0);
     virtual bool handleKey(const XKeyEvent &key);
     virtual void updatePopup();
     virtual void refresh();
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmtaskbar.h icewm-1.2.30.LXP/src/wmtaskbar.h
--- icewm-1.2.30/src/wmtaskbar.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmtaskbar.h	2006-12-14 17:55:14.000000000 +0100
@@ -43,6 +43,9 @@
     virtual void handleButton(const XButtonEvent &button);
     virtual void handleClick(const XButtonEvent &up, int count);
     virtual void handleDrag(const XButtonEvent &down, const XMotionEvent &motion);
+#ifdef CONFIG_LOOK_WINXP
+    virtual void handleEndDrag(const XButtonEvent &down, const XButtonEvent &up); //LXP
+#endif
 
     virtual void handleCrossing(const XCrossingEvent &crossing);
     virtual bool handleTimer(YTimer *t);
@@ -114,6 +117,7 @@
 
 #ifndef NO_CONFIGURE_MENUS
     ObjectBar *fObjectBar;
+    ObjectBar *fRightBar;
     YButton *fApplications;
 #endif
 #ifdef CONFIG_WINMENU
@@ -156,6 +160,20 @@
 extern ref<YPixmap> taskbuttonPixmap;
 extern ref<YPixmap> taskbuttonactivePixmap;
 extern ref<YPixmap> taskbuttonminimizedPixmap;
+extern ref<YPixmap> traybackPixmap; //LXP
+#ifdef OVER_BUTTON_PIXMAPS
+extern ref<YPixmap> taskbuttonOverPixmap; //LXP
+extern ref<YPixmap> taskbuttonactiveOverPixmap; //LXP
+extern ref<YPixmap> taskbuttonminimizedOverPixmap; //LXP
+extern ref<YPixmap> taskbuttonpressedPixmap; //LXP
+extern ref<YPixmap> taskbuttonflashingPixmap; //LXP
+#else
+ #define taskbuttonOverPixmap taskbuttonPixmap
+ #define taskbuttonactiveOverPixmap taskbuttonactivePixmap
+ #define taskbuttonminimizedOverPixmap taskbuttonminimizedPixmap
+ #define taskbuttonpressedPixmap null
+ #define taskbuttonflashingPixmap null
+#endif
 #endif
 
 #ifdef CONFIG_GRADIENTS
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ybutton.h icewm-1.2.30.LXP/src/ybutton.h
--- icewm-1.2.30/src/ybutton.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ybutton.h	2006-12-14 17:55:14.000000000 +0100
@@ -49,7 +49,17 @@
     virtual YSurface getSurface();
 
     bool fOver;
+    void setColors(YColor *Default, YColor *Active, YColor *Normal); //LXP
     
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    void setBackPixmap(ref<YPixmap> B); //LXP
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+    void setPixmaps(ref<YPixmap> I, ref<YPixmap> O, ref<YPixmap> A); //LXP
+#endif
+    
+    static YColor *normalButtonBg;
+    static YColor *activeButtonBg;
 private:
     void paint(Graphics &g, int const d, const YRect &r);
 
@@ -71,18 +81,28 @@
     void popup(bool mouseDown);
     void popdown();
 
-    static YColor *normalButtonBg;
     static YColor *normalButtonFg;
     
-    static YColor *activeButtonBg;
     static YColor *activeButtonFg;
     
     static ref<YFont> normalButtonFont;
     static ref<YFont> activeButtonFont;
+    ref<YPixmap> PixmapB; //LXP 
+    ref<YPixmap> PixmapI; //LXP 
+    ref<YPixmap> PixmapO; //LXP
+    ref<YPixmap> PixmapA; //LXP
+    YColor *colorI;
+    YColor *colorA;
+    YColor *colorB;
 };
 
 extern ref<YPixmap> buttonIPixmap;
 extern ref<YPixmap> buttonAPixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+extern ref<YPixmap> buttonOPixmap; //LXP
+#else
+ #define buttonOPixmap null
+#endif
 
 #ifdef CONFIG_GRADIENTS
 extern ref<YPixbuf> buttonIPixbuf;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yicon.h icewm-1.2.30.LXP/src/yicon.h
--- icewm-1.2.30/src/yicon.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yicon.h	2006-12-14 17:55:14.000000000 +0100
@@ -4,6 +4,12 @@
 #include "ypaint.h"
 #include "ypixbuf.h"
 
+#ifndef LITE
+#define _SetIcon(a) ->setIcon(a)
+#else
+#define _SetIcon(a) ;
+#endif
+
 class YIcon {
 public:
     YIcon(char const *fileName);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ymenu.h icewm-1.2.30.LXP/src/ymenu.h
--- icewm-1.2.30/src/ymenu.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ymenu.h	2006-12-14 17:55:14.000000000 +0100
@@ -57,12 +57,21 @@
 
     virtual bool handleTimer(YTimer *timer);
 
+#ifdef MENU_LEFT_PIXMAPS
+    void setLeftPixmaps(const ref<YPixmap> T, const ref<YPixmap> M, const ref<YPixmap> B); //LXP
+    ref<YPixmap> LTP; //LXP
+    ref<YPixmap> LP; //LXP
+    ref<YPixmap> LBP; //LXP
+#endif
+    int iconsSize; //LXP
 private:
     YObjectArray<YMenuItem> fItems;
     int selectedItem;
     int paintedItem;
     int paramPos;
     int namePos;
+    int itemPos; //LXP
+    int iconPos; //LXP
     YPopupWindow *fPopup;
     YPopupWindow *fPopupActive;
     bool fShared;
@@ -112,6 +121,11 @@
 extern ref<YPixmap> menubackPixmap;
 extern ref<YPixmap> menuselPixmap;
 extern ref<YPixmap> menusepPixmap;
+#ifdef MENU_LEFT_PIXMAPS
+extern ref<YPixmap> menuTL_Pixmap; //LXP
+extern ref<YPixmap> menuL_Pixmap; //LXP
+extern ref<YPixmap> menuBL_Pixmap; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
 class YPixbuf;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ymenuitem.h icewm-1.2.30.LXP/src/ymenuitem.h
--- icewm-1.2.30/src/ymenuitem.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ymenuitem.h	2006-12-14 17:55:14.000000000 +0100
@@ -46,6 +46,7 @@
     bool isSeparator() { return !getName() && !getSubmenu(); }
     
     void setIcon(YIcon *icon);
+    void setIcon(ref<YIconImage> icon);
 private:
     char *fName;
     char *fParam;
@@ -55,8 +56,6 @@
     ref<YIconImage> fIcon;
     bool fChecked;
     bool fEnabled;
-
-    void setIcon(ref<YIconImage> icon);
 };
 
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ypaint.h icewm-1.2.30.LXP/src/ypaint.h
--- icewm-1.2.30/src/ypaint.h	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ypaint.h	2006-12-14 17:55:14.000000000 +0100
@@ -67,6 +67,8 @@
 
     YColor * darker();
     YColor * brighter();
+    YColor * greener(); //LXP
+    YColor * redder(); //LXP
 
     static YColor * black;
     static YColor * white;
@@ -80,6 +82,8 @@
     unsigned short fBlue;
     YColor * fDarker; //!!! remove this (needs color caching...)
     YColor * fBrighter; //!!! removethis
+    YColor * fGreener; //!!! removethis LXP
+    YColor * fRedder; //!!! removethis LXP
 
 #ifdef CONFIG_XFREETYPE
     XftColor * xftColor;
@@ -165,16 +169,18 @@
 
 struct YSurface {
 #ifdef CONFIG_GRADIENTS
-    YSurface(class YColor * color, ref<YPixmap> pixmap,
+    YSurface(class YColor * color, YColor *colorBg, ref<YPixmap> pixmap, ref<YPixmap> pixmapBg, 
              ref<YPixbuf> gradient):
-    color(color), pixmap(pixmap), gradient(gradient) {}
+    color(color), colorBg(colorBg), pixmap(pixmap),  pixmapBg(pixmapBg), gradient(gradient) {}
 #else
-    YSurface(class YColor * color, ref<YPixmap> pixmap):
-    color(color), pixmap(pixmap) {}
+    YSurface(class YColor * color, YColor *colorBg, ref<YPixmap> pixmap, ref<YPixmap> pixmapBg):
+    color(color), colorBg(colorBg), pixmap(pixmap), pixmapBg(pixmapBg) {}
 #endif
 
     class YColor * color;
+    class YColor * colorBg; //LXP
     ref<YPixmap> pixmap;
+    ref<YPixmap> pixmapBg; //LXP
 #ifdef CONFIG_GRADIENTS
     ref<YPixbuf> gradient;
 #endif
@@ -258,6 +264,7 @@
     void setClipOrigin(int x, int y);
 
     void draw3DRect(int x, int y, int w, int h, bool raised);
+    void drawBorder(int x, int y, int w, int h, int size); //LXP
     void drawBorderW(int x, int y, int w, int h, bool raised);
     void drawBorderM(int x, int y, int w, int h, bool raised);
     void drawBorderG(int x, int y, int w, int h, bool raised);
@@ -267,6 +274,14 @@
     void repVert(Drawable drawable, int pw, int ph, int x, int y, int h);
     void fillPixmap(const ref<YPixmap> &pixmap, int x, int y, int w, int h,
                     int sx = 0, int sy = 0);
+#ifdef CONFIG_LOOK_WINXP
+    void drawTopBorderWXP(int x, int y, int w); //LXP
+    void drawBorderXP(int x, int y, int w, int h); //LXP
+    void drawBorderMaskWXP(int x, int y, int w, int /*h*/); //LXP
+    void drawBorderWXP(int x, int y, int w, int h); //LXP
+#endif
+
+    void fillClippedPixmap(const ref<YPixmap> &pixmap, int x, int y, int w, int h, int px, int py);
 
     void drawSurface(YSurface const & surface, int x, int y, int w, int h,
                      int const sx, int const sy, const int sw, const int sh);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yprefs.h icewm-1.2.30.LXP/src/yprefs.h
--- icewm-1.2.30/src/yprefs.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yprefs.h	2006-12-14 17:55:14.000000000 +0100
@@ -4,7 +4,11 @@
 #include "yconfig.h"
 
 XIV(bool, dontRotateMenuPointer,                true)
+#ifdef CONFIG_LOOK_WINXP
+XIV(bool, menuMouseTracking,                    true)
+#else
 XIV(bool, menuMouseTracking,                    false)
+#endif
 XIV(bool, replayMenuCancelClick,                false)
 XIV(bool, showPopupsAbovePointer,               false)
 #ifdef CONFIG_I18N
@@ -37,7 +41,11 @@
 XSV(const char *, iconPath,                     0)
 XSV(const char *, libDir,                       LIBDIR)
 XSV(const char *, configDir,                    CFGDIR)
+#ifdef CONFIG_LOOK_WINXP
+ #define CONFIG_DEFAULT_THEME "WinXP-Plain/default.theme"
+#else
 #define CONFIG_DEFAULT_THEME "icedesert/default.theme"
+#endif
 XSV(const char *, themeName,                    CONFIG_DEFAULT_THEME)
 
 #define CONFIG_DEFAULT_LOOK lookNice
@@ -81,6 +89,7 @@
 #ifdef CONFIG_LOOK_GTK
     lookGtk,
 #endif
+    lookMXP, //LXP
     lookMAX
 } WMLook;
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yxtray.h icewm-1.2.30.LXP/src/yxtray.h
--- icewm-1.2.30/src/yxtray.h	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yxtray.h	2006-12-14 17:55:14.000000000 +0100
@@ -23,6 +23,7 @@
     virtual void configure(const YRect &r, const bool resized);
     virtual void handleConfigureRequest(const XConfigureRequestEvent &configureRequest);
 
+    void backgroundChanged();
     void relayout();
 
     void trayRequestDock(Window win);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aapm.cc icewm-1.2.30.LXP/src/aapm.cc
--- icewm-1.2.30/src/aapm.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/aapm.cc	2006-12-14 17:55:14.000000000 +0100
@@ -37,8 +37,8 @@
 YColor *YApm::apmBg = 0;
 YColor *YApm::apmFg = 0;
 ref<YFont> YApm::apmFont;
-
-extern ref<YPixmap> taskbackPixmap;
+#include "wmtaskbar.h"
+extern ref<YPixmap> traybackPixmap;
 static YColor *taskBarBg = 0;
 
 
@@ -536,8 +536,8 @@
     }
     else
 #endif
-    if (taskbackPixmap != null) {
-        g.fillPixmap(taskbackPixmap,
+    if (traybackPixmap != null) {
+        g.fillPixmap(traybackPixmap,
                      0, 0, width(), height(),
                      this->x(), this->y());
     }
@@ -546,8 +546,8 @@
         g.fillRect(0, 0, width(), height());
     }
 
-    unsigned int new_width = width(); //calcWidth(s, len);
-///    unsigned int old_width = width();
+    unsigned int new_width = (len)?calcWidth(s, len):0; //LXP
+    unsigned int old_width = width(); //LXP
 
 #if 0
     //if enlarging then resize immediately, to avoid
@@ -588,10 +588,10 @@
 
     //if diminishing then resize only at the end, to avoid
     //of a delay until the removed rectangle is cleared
-#if 0
-    if (new_width < old_width)
+    if (new_width < old_width) {
         setSize(new_width, 20);
-#endif
+	taskBar->relayout(); //LXP
+    }
 }
 
 bool YApm::handleTimer(YTimer *t) {
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aclock.cc icewm-1.2.30.LXP/src/aclock.cc
--- icewm-1.2.30/src/aclock.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/aclock.cc	2006-12-14 17:55:14.000000000 +0100
@@ -35,7 +35,7 @@
 YColor *YClock::clockFg = 0;
 ref<YFont> YClock::clockFont;
 
-extern ref<YPixmap> taskbackPixmap;
+extern ref<YPixmap> traybackPixmap; //LXP
 static YColor *taskBarBg = 0;
 
 inline char const * strTimeFmt(struct tm const & t) {
@@ -200,8 +200,8 @@
                          width(), height(), 0, 0);
         else 
 #endif
-        if (taskbackPixmap != null) {
-            g.fillPixmap(taskbackPixmap, 0, 0,
+        if (traybackPixmap != null) {
+            g.fillPixmap(traybackPixmap, 0, 0,
                          width(), height(), this->x(), this->y());
         }
         else {
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/acpustatus.cc icewm-1.2.30.LXP/src/acpustatus.cc
--- icewm-1.2.30/src/acpustatus.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/acpustatus.cc	2006-12-14 17:55:14.000000000 +0100
@@ -58,7 +58,7 @@
 
 #if (defined(linux) || defined(HAVE_KSTAT_H)) || defined(HAVE_SYSCTL_CP_TIME)
 
-extern ref<YPixmap> taskbackPixmap;
+extern ref<YPixmap> traybackPixmap;
 
 CPUStatus::CPUStatus(YWindow *aParent): YWindow(aParent) {
     cpu = new int *[taskBarCPUSamples];
@@ -186,8 +186,8 @@
                                  this->x() + i, this->y(), width(), y + 1, i, 0);
                 else
 #endif
-                    if (taskbackPixmap != null)
-                        g.fillPixmap(taskbackPixmap,
+                    if (traybackPixmap != null)
+                        g.fillPixmap(traybackPixmap,
                                      i, 0, width(), y + 1, this->x() + i, this->y());
             }
         }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/amailbox.cc icewm-1.2.30.LXP/src/amailbox.cc
--- icewm-1.2.30/src/amailbox.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/amailbox.cc	2006-12-14 17:55:14.000000000 +0100
@@ -22,7 +22,7 @@
 #include <netdb.h>
 
 static YColor *taskBarBg = 0;
-extern ref<YPixmap> taskbackPixmap;
+extern ref<YPixmap> traybackPixmap;
 
 ref<YPixmap> mailPixmap;
 ref<YPixmap> noMailPixmap;
@@ -361,8 +361,8 @@
             g.copyPixbuf(*gradient, x(), y(), width(), height(), 0, 0);
         else
 #endif
-            if (taskbackPixmap != null)
-                g.fillPixmap(taskbackPixmap, 0, 0,
+            if (traybackPixmap != null)
+                g.fillPixmap(traybackPixmap, 0, 0,
                              width(), height(), this->x(), this->y());
         else {
             g.setColor(taskBarBg);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/apppstatus.cc icewm-1.2.30.LXP/src/apppstatus.cc
--- icewm-1.2.30/src/apppstatus.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/apppstatus.cc	2006-12-14 17:55:14.000000000 +0100
@@ -34,7 +34,7 @@
 #include <net/if_mib.h>
 #endif
 
-extern ref<YPixmap> taskbackPixmap;
+extern ref<YPixmap> traybackPixmap;
 
 NetStatus::NetStatus(char const * netdev, YWindow *aParent):
     YWindow(aParent), fNetDev(newstr(netdev))
@@ -122,6 +122,7 @@
     char status[400];
 
     if (isUp()) {
+	if (!width()||!height()) setSize(taskBarNetSamples, 20); //LXP
         char const * const sizeUnits[] = { "B", "KiB", "MiB", "GiB", "TiB", NULL };
         char const * const rateUnits[] = { "Bps", "Kps", "Mps", NULL };
 
@@ -176,8 +177,10 @@
                 vi, viUnit, vo, voUnit,
                 t / 3600, t / 60 % 60, t % 60,
                 *phoneNumber ? _("\n  Caller id:\t") : "", phoneNumber);
-    } else
-        sprintf(status, "%.50s:", fNetDev);
+    } else  {
+	setSize(0,0); //LXP
+	*status=0;
+    }
 
     setToolTip(status);
 }
@@ -248,8 +251,8 @@
                                      x() + i, y() + l, width(), t - l, i, l);
                     else
 #endif
-                        if (taskbackPixmap != null)
-                            g.fillPixmap(taskbackPixmap,
+                        if (traybackPixmap != null)
+                            g.fillPixmap(traybackPixmap,
                                          i, l, width(), t - l, x() + i, y() + l);
                 }
             }
@@ -266,8 +269,8 @@
                                  x() + i, y(), width(), h, i, 0);
                 else
 #endif
-                    if (taskbackPixmap != null)
-                        g.fillPixmap(taskbackPixmap,
+                    if (traybackPixmap != null)
+                        g.fillPixmap(traybackPixmap,
                                      i, 0, width(), h, x() + i, y());
             }
         }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atasks.cc icewm-1.2.30.LXP/src/atasks.cc
--- icewm-1.2.30/src/atasks.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/atasks.cc	2006-12-16 08:02:09.000000000 +0100
@@ -25,7 +25,7 @@
 static YColor *minimizedTaskBarAppBg = 0;
 static YColor *invisibleTaskBarAppFg = 0;
 static YColor *invisibleTaskBarAppBg = 0;
-static YColor *taskBarBg = 0;
+extern YColor *taskBarBg;
 static ref<YFont> normalTaskBarFont;
 static ref<YFont> activeTaskBarFont;
 
@@ -47,6 +47,7 @@
     fFrame = frame;
     fPrev = fNext = 0;
     selected = 0;
+    over=0;
     fShown = true;
     fFlashing = false;
     fFlashOn = false;
@@ -114,7 +115,7 @@
         if (fFlashOn) {
             bg = activeTaskBarAppBg;
             fg = activeTaskBarAppFg;
-            bgPix = taskbuttonactivePixmap;
+            bgPix = taskbuttonflashingPixmap; //TODO LXP Flash
 #ifdef CONFIG_GRADIENTS
             bgGrad = taskbuttonactivePixbuf;
 #endif
@@ -136,27 +137,44 @@
         bgGrad = taskbackPixbuf;
 #endif
     } else if (getFrame()->isMinimized()) {
-        bg = minimizedTaskBarAppBg;
+        bg = (over&&rolloverTitleButtons?minimizedTaskBarAppBg->brighter():minimizedTaskBarAppBg); //LXP
         fg = minimizedTaskBarAppFg;
-        bgPix = taskbuttonminimizedPixmap;
+        bgPix = (over&&rolloverTitleButtons?taskbuttonminimizedOverPixmap:taskbuttonminimizedPixmap);
 #ifdef CONFIG_GRADIENTS
         bgGrad = taskbuttonminimizedPixbuf;
 #endif
     } else if (getFrame()->focused()) {
-        bg = activeTaskBarAppBg;
+        bg = (over&&rolloverTitleButtons?activeTaskBarAppBg->brighter():activeTaskBarAppBg); //LXP
         fg = activeTaskBarAppFg;
-        bgPix = taskbuttonactivePixmap;
+        bgPix = (over&&rolloverTitleButtons?taskbuttonactiveOverPixmap:taskbuttonactivePixmap);
 #ifdef CONFIG_GRADIENTS
         bgGrad = taskbuttonactivePixbuf;
 #endif
     } else {
-        bg = normalTaskBarAppBg;
+        bg = (over&&rolloverTitleButtons?normalTaskBarAppBg->brighter():normalTaskBarAppBg); //LXP
         fg = normalTaskBarAppFg;
-        bgPix = taskbuttonPixmap;
+        bgPix = (over&&rolloverTitleButtons?taskbuttonOverPixmap:taskbuttonPixmap);
 #ifdef CONFIG_GRADIENTS
         bgGrad = taskbuttonPixbuf;
 #endif
     }
+    if (selected > 0 ) bgPix = taskbuttonpressedPixmap;
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP) {
+ #ifdef CONFIG_GRADIENTS
+	YSurface surface(bg, taskBarBg, bgPix, taskbackPixmap, bgGrad); // !!FIX
+ #else
+	YSurface surface(bg, taskBarBg, bgPix, taskbackPixmap); // !!FIX
+ #endif
+
+	int yy=this->y()?this->y(): (parent()->y()<400?parent()->y():0); //LXP SEE
+	g.drawSurface(surface, 0, 0, width(), height(),0,yy,width(),height());
+        if (bgPix==null) {
+	        g.setColor(bg);
+		g.drawBorderXP(0,0,width(),height()); //LXP
+	}
+    } else
+#endif
 
     if (style == 3) {
         p = 2;
@@ -188,21 +206,22 @@
                 g.drawBorderW(0, 0, width() - 1, height() - 1, true);
         }
 
-        int const dp(wmLook == lookMetal ? 2 : p);
-        int const ds(wmLook == lookMetal ? 4 : 3);
+	int dp(wmLook==lookMXP? 0 : (wmLook == lookMetal ? 2 : p)); //LXP
+	int ds(wmLook==lookMXP? 0 : (wmLook == lookMetal ? 4 : 3)); //LXP
 
         if (width() > ds && height() > ds) {
 #ifdef CONFIG_GRADIENTS
-            if (bgGrad != null)
+	    if (bgGrad != null) {
                 g.drawGradient(bgGrad, dp, dp, width() - ds, height() - ds);
-            else
+	    } else
 #endif
-            if (bgPix != null)
+            if (bgPix != null) {
                 g.fillPixmap(bgPix, dp, dp, width() - ds, height() - ds);
-            else
+            }else {
                 g.fillRect(dp, dp, width() - ds, height() - ds);
         }
     }
+    }
 
 #ifndef LITE
     YIcon *icon(getFrame()->getIcon());
@@ -212,8 +231,8 @@
 
         if (small != null) {
             int const y((height() - 3 - small->height() - 
-                         ((wmLook == lookMetal) ? 1 : 0)) / 2);
-            g.drawImage(small, p + 1, p + 1 + y);
+			((wmLook == lookMetal || wmLook==lookMXP ) ? 1 : 0)) / 2);
+	    g.drawImage(small, p + 1 + (wmLook==lookMXP?7:0), p + 1 + y);
         }
     }
 #endif
@@ -237,11 +256,11 @@
             int const tx = 3 + iconSize;
             int const ty = max(2,
                                (height() + font->height() -
-                                (wmLook == lookMetal ? 2 : 1)) / 2 -
+                                (wmLook == lookMetal  || wmLook==lookMXP ? 2 : 1)) / 2 -
                                font->descent());
             int const wm = width() - p - 3 - iconSize - 3;
 
-            g.drawStringEllipsis(p + tx, p + ty, str, wm);
+            g.drawStringEllipsis(p + tx + (wmLook==lookMXP?7:0) , p + ty, str, wm -  (wmLook==lookMXP?7:0));
         }
     }
 }
@@ -281,6 +300,7 @@
 }
 
 void TaskBarApp::handleCrossing(const XCrossingEvent &crossing) {
+    over=crossing.type == EnterNotify ? 1 : 0;
     if (selected > 0) {
         if (crossing.type == EnterNotify) {
             selected = 2;
@@ -290,6 +310,12 @@
             repaint();
         }
     }
+#ifdef OVER_BUTTON_PIXMAPS
+    else {
+      repaint();
+    }
+#endif
+    
     YWindow::handleCrossing(crossing);
 }
 
@@ -343,10 +369,10 @@
 }
 
 TaskPane::TaskPane(YWindow *parent): YWindow(parent) {
-    if (taskBarBg == 0)
-        taskBarBg = new YColor(clrDefaultTaskBar);
     fFirst = fLast = 0;
     fCount = 0;
+    if (taskbuttonPixmap!=null) setSize(width(),taskbuttonPixmap->height()); //LXP
+    else if (wmLook==lookMXP) setSize(width(),25);
     fNeedRelayout = true;
 }
 
@@ -385,6 +411,7 @@
 #endif
     if (frame->client() == taskBar)
         return 0;
+    if (wmLook==lookMXP && !frame->canMinimize()) return 0; //LXP
 
     TaskBarApp *tapp = new TaskBarApp(frame, this);
 
@@ -412,14 +439,20 @@
     }
 }
 
-void TaskPane::relayoutNow() {
+bool TaskPane::relayoutNow() { //LXP
     if (!fNeedRelayout)
-        return ;
+        return (false); //LXP
 
     fNeedRelayout = false;
 
-    int x, y, w, h;
+    int x=0, y, w, h;
     int tc = 0;
+    int mc = width();
+    if (wmLook == lookMXP) { //LXP
+        // LXP FIX delete mc = (taskbuttonactivePixmap!=null && taskbuttonactivePixmap->width() > 32) ? 
+             // LXP FIX delete taskbuttonactivePixmap->width() : 160;
+        mc = taskButtonWidth ? taskButtonWidth : mc;
+    }
 
     TaskBarApp *a = fFirst;
 
@@ -429,14 +462,13 @@
         a = a->getNext();
     }
 
-    if (tc < 3) tc = 3;
+    if ((mc * tc)>width()) {
+        mc=width()/tc;
+    } 
+    int rem= width() - (tc*mc);
+    w=mc-1;
 
-    int leftX = 0;
-    int rightX = width();
 
-    w = (rightX - leftX - 2) / tc;
-    int rem = (rightX - leftX - 2) % tc;
-    x = leftX;
     h = height();
     y = 0;
 
@@ -453,12 +485,13 @@
             f->setGeometry(YRect(x, y, w1, h));
             f->show();
             x += w1;
-            x += 0;
+            x += taskButtonSepSize; //LXP NEW
             lc++;
         } else
             f->hide();
         f = f->getNext();
     }
+    return(true); //LXP
 }
 
 void TaskPane::handleClick(const XButtonEvent &up, int count) {
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/atray.cc icewm-1.2.30.LXP/src/atray.cc
--- icewm-1.2.30/src/atray.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/atray.cc	2006-12-18 15:47:32.000000000 +0100
@@ -109,7 +109,7 @@
     if (!getFrame()->visibleNow()) {
         bg = invisibleTrayAppBg;
         fg = invisibleTrayAppFg;
-        bgPix = taskbackPixmap;
+        bgPix = traybackPixmap;
 #ifdef CONFIG_GRADIENTS
         bgGrad = getGradient();
 #endif
@@ -141,6 +141,7 @@
         bgGrad = taskNormalGradient;
 #endif
     }
+    if (wmLook==lookMXP) bg=taskBarBg; //LXP
 
     if (selected == 3) {
         p = 2;
@@ -155,7 +156,9 @@
                 g.copyPixbuf(*bgGrad, sx, sy, width(), height(), 0, 0);
             else
 #endif
-            if (bgPix != null)
+            if (wmLook == lookMXP && traybackPixmap != null)  //LXP
+                  g.fillPixmap(traybackPixmap, 0, 0, width(), height(), 0, y()+parent()->y()); //LXP
+            else if (bgPix != null)
                 g.fillPixmap(bgPix, 0, 0, width(), height(), 0, 0);
             else {
                 g.setColor(bg);
@@ -168,7 +171,8 @@
 
     if (icon) {
         ref<YIconImage> small = icon->small();
-        if (small != null) g.drawImage(small, 2, 2);
+        if (small != null) g.drawImage(small, 2, 
+		(parent()->height() - small->height())/2 ); //LXP
     }
 }
 
@@ -261,6 +265,7 @@
     fFirst = fLast = 0;
     fCount = 0;
     fNeedRelayout = true;
+    if (wmLook==lookMXP) setSize(0,25); //LXP SEE
 }
 
 TrayPane::~TrayPane() {
@@ -336,9 +341,9 @@
     return (tc ? 4 + tc * (height() - 4) : 1);
 }
 
-void TrayPane::relayoutNow() {
+bool TrayPane::relayoutNow() {
     if (!fNeedRelayout)
-        return ;
+        return(false);
 
     fNeedRelayout = false;
 
@@ -367,6 +372,7 @@
         } else
             f->hide();
     }
+    return(true);
 }
 
 void TrayPane::handleClick(const XButtonEvent &up, int count) {
@@ -388,8 +394,8 @@
         g.copyPixbuf(*gradient, x(), y(), w, h, 0, 0);
     else 
 #endif    
-    if (taskbackPixmap != null)
-        g.fillPixmap(taskbackPixmap, 0, 0, w, h, x(), y());
+    if (traybackPixmap != null)
+	    g.fillPixmap(traybackPixmap, 0, 0, w, h, x(), y());
     else
         g.fillRect(0, 0, w, h);
     
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/aworkspaces.cc icewm-1.2.30.LXP/src/aworkspaces.cc
--- icewm-1.2.30/src/aworkspaces.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/aworkspaces.cc	2006-12-14 17:55:14.000000000 +0100
@@ -22,6 +22,8 @@
 #include <errno.h>
 
 #include "base.h"
+extern YColor *taskBarBg; //LXP
+extern YColor *trayBarBg; //LXP
 
 YColor * WorkspaceButton::normalButtonBg(NULL);
 YColor * WorkspaceButton::normalButtonFg(NULL);
@@ -34,6 +36,9 @@
 
 ref<YPixmap> workspacebuttonPixmap;
 ref<YPixmap> workspacebuttonactivePixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+ref<YPixmap> workspacebuttonoverPixmap; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
 ref<YPixbuf> workspacebuttonPixbuf;
@@ -97,19 +102,30 @@
     if (fWorkspaceButton) {
         YResourcePaths paths("", false);
 
-        int ht = 24;
+        int ht = workspacebuttonactivePixmap!=null?workspacebuttonactivePixmap->height():24; //LXP
         int leftX = 0;
 
         for (w = 0; w < workspaceCount; w++) {
             WorkspaceButton *wk = new WorkspaceButton(w, this);
             if (wk) {
+	       wk->setColors(taskBarWorkspacesLeft?taskBarBg:trayBarBg, YButton::activeButtonBg, NULL);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+               wk->setBackPixmap(taskBarWorkspacesLeft?taskbackPixmap:traybackPixmap);
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+                wk->setPixmaps(workspacebuttonPixmap,workspacebuttonoverPixmap,workspacebuttonactivePixmap);
+#endif
+		char *n=newstr(workspaceNames[w]);
+		while (*n==' ') n++;
+		while (n[strlen(n)-1]==' ') n[strlen(n)-1]=0;
                 ref<YIconImage> image
-                    (paths.loadImage("workspace/", workspaceNames[w]));
+                    (paths.loadImage("workspace/", n));
 
                 if (image != null)
                     wk->setImage(image);
                 else
-                    wk->setText(workspaceNames[w]);
+                    //wk->setText(workspaceNames[w]);
+                    wk->setText(n); //LXP FIXME
 
                 char * wn(newstr(my_basename(workspaceNames[w])));
                 char * ext(strrchr(wn, '.'));
@@ -194,27 +210,4 @@
         : YButton::getColor();
 }
 
-YSurface WorkspaceButton::getSurface() {
-    if (activeButtonBg == 0)
-        activeButtonBg =
-            new YColor(*clrWorkspaceActiveButton
-                       ? clrWorkspaceActiveButton : clrActiveButton);
-    if (normalButtonBg == 0)
-        normalButtonBg =
-            new YColor(*clrWorkspaceNormalButton
-                       ? clrWorkspaceNormalButton : clrNormalButton);
-
-#ifdef CONFIG_GRADIENTS    
-    return (isPressed() ? YSurface(activeButtonBg, 
-                                   workspacebuttonactivePixmap,
-                                   workspacebuttonactivePixbuf)
-            : YSurface(normalButtonBg,
-                       workspacebuttonPixmap,
-                       workspacebuttonPixbuf));
-#else
-    return (isPressed() ? YSurface(activeButtonBg, workspacebuttonactivePixmap)
-            : YSurface(normalButtonBg, workspacebuttonPixmap));
-#endif
-}
-
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/decorate.cc icewm-1.2.30.LXP/src/decorate.cc
--- icewm-1.2.30/src/decorate.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/decorate.cc	2006-12-14 17:55:14.000000000 +0100
@@ -231,6 +231,11 @@
             yBR(height() -
                 (frameBR[t][a] != null ? frameBR[t][a]->height() : 0));
 
+#ifdef CONFIG_LOOK_WINXP
+        //Draw Top Corners Mask for WinXP, only when there is not corner pixmaps
+        if (wmLook==lookMXP && frameTL[t][a]==null && frameTR[t][a]==null) //LXP
+	    g.drawBorderMaskWXP(0,0,width()-1,height()-1);
+#endif
         if (frameTL[t][a] != null) {
             g.copyDrawable(frameTL[t][a]->mask(), 0, 0,
                            frameTL[t][a]->width(), frameTL[t][a]->height(),
@@ -358,7 +363,7 @@
 void YFrameWindow::positionButton(YFrameButton *b, int &xPos, bool onRight) {
     /// !!! clean this up
     if (b == fMenuButton) {
-        const unsigned bw((wmLook == lookPixmap || wmLook == lookMetal ||
+        const unsigned bw((wmLook == lookPixmap || wmLook == lookMetal ||wmLook == lookMXP || //LXP
                            wmLook == lookGtk) &&
                           showFrameIcon || b->getImage(0) == null ?
                           titleY() : b->getImage(0)->width());
@@ -366,9 +371,11 @@
         if (onRight) xPos -= bw;
         b->setGeometry(YRect(xPos, 0, bw, titleY()));
         if (!onRight) xPos += bw;
-    } else if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookGtk) {
-        const unsigned bw(b->getImage(0) != null ? b->getImage(0)->width() : titleY());
-
+    } else if (wmLook == lookPixmap || wmLook == lookMetal ||wmLook == lookMXP|| wmLook == lookGtk) { //LXP
+        int bw(b->getImage(0) != null ? b->getImage(0)->width() : titleY()); //LXP
+#ifdef CONFIG_LOOK_WINXP
+        if (wmLook == lookMXP && b->getImage(0)!=null && b->getImage(1)==null)  bw+=6; //LXP
+#endif
         if (onRight) xPos -= bw;
         b->setGeometry(YRect(xPos, 0, bw, titleY()));
         if (!onRight) xPos += bw;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/gnome2.cc icewm-1.2.30.LXP/src/gnome2.cc
--- icewm-1.2.30/src/gnome2.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/gnome2.cc	2006-12-14 17:55:14.000000000 +0100
@@ -26,21 +26,135 @@
 #include <libgnome/gnome-desktop-item.h>
 #include <libgnomevfs/gnome-vfs-init.h>
 #include "yarray.h"
-
 char const * ApplicationName = "icewm-menu-gnome2";
 
+#define MAX_APP_ITEMS 999
+int showEmptyMenu = 0;
+#define APPLICATIONS_DIR "/usr/share/applications/"
+#define DIRECTORIES_DIR  "/usr/share/desktop-directories/"
+
+typedef struct {
+   const char *filename;
+   const char *includedCategories[10];
+   const char *excludedCategories[10];
+   const char *subMenus[10];
+   bool  isSubmenu;
+} MenuDir;
+
+// Configuration for the root menu
+MenuDir  root=           {0,            {"PackageManager",0},
+                                        {0}, 
+                                        {0},
+                                        false};
+
+// Known configuration menus
+MenuDir  knownMenuDirs[]= {
+   {"Accessories.directory",            {"Utility",0}, 
+                                        {"System",0}, 
+                                        {0},
+                                        false},
+   {"Development.directory",            {"Development",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Edutainment.directory",            {"Education",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Games.directory",                  {"Game",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Graphics.directory",               {"Graphics",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Internet.directory",               {"Network",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Network.directory",                {"Network",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"Multimedia.directory",             {"AudioVideo",0}, 
+                                        {"System",0}, 
+                                        {0},
+                                        false},
+   {"Office.directory",                 {"Office",0}, 
+                                        {0}, 
+                                        {0},
+                                        false},
+   {"System.directory",                 {"System",0}, 
+                                        {"Screensaver","SystemSetup","Monitor","X-Red-Hat-ServerConfig",0}, 
+                                        {0},
+                                        false},
+   {"System-Tools.directory",           {"System",0}, 
+                                        {"Settings",0}, 
+                                        {0},
+                                        false},
+   {"SystemConfig.directory",           {"Application","SystemSetup","X-Red-Hat-Base",0}, 
+                                        {"X-Red-Hat-ServerConfig","Screensaver",0}, 
+                                        {"ServerConfig.directory",0},
+                                        false},
+   {"ServerConfig.directory",           {"Application","X-Red-Hat-ServerConfig","X-Red-Hat-Base", }, 
+                                        {0}, 
+                                        {0},
+                                        true},
+   {"Settings.directory",               {"Settings","X-Red-Hat-Base",0}, 
+                                        {"System","Accessibility",0}, 
+                                        {"Settings-Accessibility.directory","Settings-More.directory",0},
+                                        false},
+   {"Preferences.directory",            {"Settings",0}, 
+                                        {"System","Accessibility",0}, 
+                                        {"Settings-Accessibility.directory","Settings-More.directory",0},
+                                        false},
+   {"Settings-Accessibility.directory", {"Settings","Accessibility",0}, 
+                                        {"System",0}, 
+                                        {0},
+                                        true},
+   {"Settings-More.directory",          {"Settings",0}, 
+                                        {"System","X-Red-Hat-Base-Only","X-Red-Hat-Base",0}, 
+                                        {0},
+                                        true},
+
+   {0, {0}, {0}, {0},false}
+};
+
 class GnomeMenu;
 
 class GnomeMenuItem {
 public:
-    GnomeMenuItem() { title = 0; icon = 0; dentry = 0; submenu = 0; }
+    GnomeMenuItem() { title = 0; icon = 0; dentry = 0; command=0; ditem=0; submenu = 0; }
 
     const char *title;
     const char *icon;
     const char *dentry;
+    const char *command;
+    GnomeDesktopItem *ditem;
     GnomeMenu *submenu;
 };
 
+GnomeDesktopItem *cacheAppItems[MAX_APP_ITEMS];
+GnomeDesktopItem *cacheItems[MAX_APP_ITEMS];
+
+int itemComparator(GnomeDesktopItem **item1, GnomeDesktopItem **item2) {
+    if (item1 && *item1 && item2 && *item2 ) {
+        const char *name1 = gnome_desktop_item_get_localestring(*item1, GNOME_DESKTOP_ITEM_NAME);
+        const char *name2 = gnome_desktop_item_get_localestring(*item2, GNOME_DESKTOP_ITEM_NAME);
+        if (name1 && name2)
+            return(strcasecmp(name1,name2));
+    }
+    return(0);
+}
+
+void SortItems(GnomeDesktopItem **items) {
+  int cont=0;
+  for (cont=0; items[cont]; cont++);
+  qsort(items,cont,sizeof(GnomeDesktopItem *),(int (*) (const void *, const void *))itemComparator);
+}
+
+
 class GnomeMenu {
 public:
     GnomeMenu() { }
@@ -49,40 +163,64 @@
 
     bool isDuplicateName(const char *name);
     void addEntry(const char *fPath, const char *name, const int plen,
-                         const bool firstRun);
+                         GnomeDesktopItem *ditem, const bool firstRun);
     void populateMenu(const char *fPath);
 };
 
-void dumpMenu(GnomeMenu *menu) {
+void dumpMenu(GnomeMenu *menu, int ind) {
     for (unsigned int i = 0; i < menu->items.getCount(); i++) {
         GnomeMenuItem *item = menu->items.getItem(i);
 
-        if (item->dentry && !item->submenu) {
-            printf("prog \"%s\" %s icewm-menu-gnome2 --open \"%s\"\n",
-                   item->title,
-                   item->icon ? item->icon : "-",
-                   item->dentry);
-        } else if (item->dentry && item->submenu) {
-            printf("menuprog \"%s\" %s icewm-menu-gnome2 --list \"%s\"\n",
+        // print applications entries
+        if (item && item->dentry && !item->submenu && item->command && *item->command) {
+            const char *cmd = item->command;
+            char *c= (char *)cmd+strlen(cmd)-1;
+            // desktop items has parameters that starts with % (%u %f ...)
+            for (;c>cmd;c--) if (*c=='%') *c=0;
+            // delete final spaces
+            c= (char *)cmd+strlen(cmd)-1;
+            for (;c>cmd;c--) 
+               if (*c==' ') *c=0;
+               else break;
+            // delete begin spaces
+            while(*cmd == ' ') cmd++;
+
+            // print indentation spaces
+            for(int cc = 0; cc < ind; cc++) printf("   ");
+
+            // print the program entry
+            printf("prog \"%s\" %s %s\n",
                    item->title,
                    item->icon ? item->icon : "-",
-                   (!strcmp(my_basename(item->dentry), ".directory") ?
-                    g_dirname(item->dentry) : item->dentry));
-        }
+                   item->command);
+
+        // print submenus
+        } else if (item && item->dentry && item->submenu) {
+            GnomeMenu *submenu = item->submenu;
+            if (showEmptyMenu || submenu->items.getCount()) {
+                const char *c;
+                c=strrchr(item->dentry, '/');
+                if (!c) c= item->dentry;
+
+                // print indentation spaces
+                for(int cc = 0; cc < ind; cc++) printf("   ");
+                // open the menu entry
+                printf("menu \"%s\" \"%s\" {\n", item->title, item->icon ? item->icon : "-");
+
+                // call to this function recurs.
+                dumpMenu(submenu, ind + 1);
+
+                // print indentation spaces
+                for(int cc = 0; cc < ind; cc++) printf("   ");
+                // close the menu entry
+                printf("}\n");
     }
 }
-
-bool GnomeMenu::isDuplicateName(const char *name) {
-    for (unsigned int i = 0; i < items.getCount(); i++) {
-        GnomeMenuItem *item = items.getItem(i);
-        if (strcmp(name, item->title) == 0)
-            return 1;
     }
-    return 0;
 }
 
 void GnomeMenu::addEntry(const char *fPath, const char *name, const int plen,
-                         const bool firstRun)
+                         GnomeDesktopItem *ditem, const bool firstRun)
 {
     const int nlen = (plen == 0 || fPath[plen - 1] != '/')
         ? plen + 1 + strlen(name)
@@ -101,10 +239,12 @@
         GnomeMenuItem *item = new GnomeMenuItem();
         item->title = name;
 
-        GnomeDesktopItem *ditem =
-            gnome_desktop_item_new_from_file(npath,
+        if (ditem == NULL ) 
+            ditem = gnome_desktop_item_new_from_file(npath,
                                              (GnomeDesktopItemLoadFlags)0,
                                              NULL);
+        if (ditem == NULL)
+            return;
 
         struct stat sb;
         const char *type;
@@ -117,37 +257,30 @@
 
         if (isDir) {
             GnomeMenu *submenu = new GnomeMenu();
+            submenu->populateMenu(npath);
 
             item->title = g_basename(npath);
             item->icon = gnome_pixmap_file("gnome-folder.png");
             item->submenu = submenu;
 
-            char *epath = new char[nlen + sizeof("/.directory")];
-            strcpy(epath, npath);
-            strcpy(epath + nlen, "/.directory");
-
-            if (stat(epath, &sb) == -1) {
-                strcpy(epath, npath);
-            }
-
-            ditem = gnome_desktop_item_new_from_file(epath,
-                                                     (GnomeDesktopItemLoadFlags)0,
-                                                     NULL);
-            if (ditem) {
-                item->title = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_NAME);
+            item->title = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NAME);
                 item->icon = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON);
-            }
-            item->dentry = epath;
+            item->dentry = npath;
         } else {
             if (type && !strstr(type, "Directory")) {
-                item->title = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_NAME);
+                item->title = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NAME);
+                item->command = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_EXEC);
                 if (gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON))
                     item->icon = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON);
                 item->dentry = npath;
             }
         }
-        if (firstRun || !isDuplicateName(item->title))
+        const char *no_display = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NO_DISPLAY);
+        bool  displayIt = (no_display && *no_display == 'd') ? false : true;
+        if (firstRun || displayIt) {
             items.append(item);
+            gnome_desktop_item_set_string(ditem,GNOME_DESKTOP_ITEM_NO_DISPLAY,"done");
+        }
     }
 }
 
@@ -178,12 +311,10 @@
                     if (oend > 0 && oentry[oend] == '\n')
                         oentry[oend] = '\0';
 
-                    addEntry(fPath, oentry, plen, true);
+                    addEntry(fPath, oentry, plen, NULL, true);
                 }
-
                 fclose(order);
             }
-
             delete opath;
         }
 
@@ -187,96 +318,84 @@
             delete opath;
         }
 
-        DIR *dir = opendir(fPath);
-        if (dir != 0) {
-            struct dirent *file;
-
-            while ((file = readdir(dir)) != NULL) {
-                if (*file->d_name != '.')
-                    addEntry(fPath, file->d_name, plen, false);
+        struct dirent **namelist;
+        int i, n;
+        if ( 0 < (n = scandir(fPath, &namelist, 0, alphasort)) ) {
+            for (i=0; i<n; i++) {
+                if (*namelist[i]->d_name != '.') 
+                    addEntry(fPath, namelist[i]->d_name, plen, NULL, false);
+                free(namelist[i]);
             }
-            closedir(dir);
+            free(namelist);
         }
     } else {   // gnome2 style
-        char *category = NULL;
-        char dirname[256] = "a";
 
-        if (isDir) {
+        char dirname[256] = "";
+        if (isDir) 
             strcpy(dirname, fPath);
-        } else if (strstr(fPath, "Settings")) {
-            strcpy(dirname, "/usr/share/control-center-2.0/capplets/");
-        } else if (strstr(fPath, "Advanced")) {
-            strcpy(dirname, "/usr/share/control-center-2.0/capplets/");
-        } else {
-            dirname[0] = '\0';
-        }
 
+        // Read all .directories files in directory, and cache them (cacheItems)
         if (isDir) {
             DIR *dir = opendir(dirname);
             if (dir != 0) {
+                int cont=0;
                 struct dirent *file;
-
                 while ((file = readdir(dir)) != NULL) {
-                    if (!strcmp(dirname, fPath) &&
-                        (strstr(file->d_name, "Accessibility") ||
-                         strstr(file->d_name, "Advanced") ||
-                         strstr(file->d_name, "Applications") ||
-                         strstr(file->d_name, "Root") ))
+                    if (*file->d_name == '.') 
                         continue;
-                    if (*file->d_name != '.')
-                        addEntry(dirname, file->d_name, strlen(dirname), false);
-                }
-                closedir(dir);
+
+                    // Only consider known filenames
+                    bool ok = false;
+                    for (int i=0; knownMenuDirs[i].filename && !ok ; i++) 
+                        if (!strcmp(file->d_name, knownMenuDirs[i].filename) && !knownMenuDirs[i].isSubmenu) 
+                             ok=true;
+                    if (!ok)
+                        continue;
+
+                    char fullpath[256];
+                    strcpy(fullpath, dirname);
+                    strcat(fullpath, "/");
+                    strcat(fullpath, file->d_name);
+                    GnomeDesktopItem *ditem =
+                             gnome_desktop_item_new_from_file(fullpath,
+                                                             (GnomeDesktopItemLoadFlags)0,
+                                                             NULL);
+                    if (ditem) {
+                        cacheItems[cont++] = ditem;
+                        cacheItems[cont] = NULL;
             }
         }
+                closedir(dir);
 
-        strcpy(dirname, "/usr/share/applications/");
+                // Sort the menu entries
+                SortItems(cacheItems);
 
-        if (isDir) {
-            category = strdup("ion;Core");
-        } else if (strstr(fPath, "Applications")) {
-            category = strdup("ion;Merg");
-        } else if (strstr(fPath, "Accessories")) {
-            category = strdup("ion;Util");
-        } else if (strstr(fPath, "Advanced")) {
-            category = strdup("ngs;Adva");
-            strcpy(dirname, "/usr/share/control-center-2.0/capplets/");
-        } else if (strstr(fPath, "Accessibility")) {
-            category = strdup("ngs;Acce");
-            strcpy(dirname, "/usr/share/control-center-2.0/capplets/");
-        } else if (strstr(fPath, "Development")) {
-            category = strdup("ion;Deve");
-        } else if (strstr(fPath, "Editors")) {
-            category = strdup("ion;Text");
-        } else if (strstr(fPath, "Games")) {
-            category = strdup("ion;Game");
-        } else if (strstr(fPath, "Graphics")) {
-            category = strdup("ion;Grap");
-        } else if (strstr(fPath, "Internet")) {
-            category = strdup("ion;Netw");
-        } else if (strstr(fPath, "Root")) {
-            category = strdup("ion;Core");
-        } else if (strstr(fPath, "Multimedia")) {
-            category = strdup("ion;Audi");
-        } else if (strstr(fPath, "Office")) {
-            category = strdup("ion;Offi");
-        } else if (strstr(fPath, "Settings")) {
-            category = strdup("ion;Sett");
-            strcpy(dirname, "/usr/share/control-center-2.0/capplets/");
-        } else if (strstr(fPath, "System")) {
-            category = strdup("ion;Syst");
-        } else {
-            category = strdup("xyz");
-        }
+                // Add the menudir entries 
+                for (cont=0; cacheItems[cont]; cont++) {
+                    GnomeDesktopItem *ditem = cacheItems[cont];
+                    const char *location   = gnome_desktop_item_get_location(ditem); 
+                    if (!strncmp(location, "file://", 7)) location += 7;
 
-        if (!strlen(dirname))
-            strcpy(dirname, "/usr/share/applications/");
+                    const char *name = strrchr(location,'/');
+                    name = name ? name + 1: location;
+                    addEntry(dirname, name, strlen(dirname), ditem, false);
+                }
+            }
+        }
 
+        // Read all applications from the apps dir, and cache them (cacheAppItems)
+        strcpy (dirname, APPLICATIONS_DIR);
+        int cont=0;
+        if (*cacheAppItems == NULL ) {
+            for (cont=0; cacheItems[cont]; cont ++) {
+                  cacheAppItems[cont] = cacheItems[cont];
+            }
         DIR* dir = opendir(dirname);
         if (dir != 0) {
             struct dirent *file;
 
             while ((file = readdir(dir)) != NULL) {
+                    if (*file->d_name != '.') {
                 char fullpath[256];
                 strcpy(fullpath, dirname);
                 strcat(fullpath, file->d_name);
@@ -284,37 +403,80 @@
                     gnome_desktop_item_new_from_file(fullpath,
                                                      (GnomeDesktopItemLoadFlags)0,
                                                      NULL);
-                const char *categories =
-                    gnome_desktop_item_get_string(ditem,
-                                                  GNOME_DESKTOP_ITEM_CATEGORIES);
-
-                if (categories && strstr(categories, category)) {
-                    if (*file->d_name != '.') {
-                        if (strstr(fPath, "Settings")) {
-                            if (!strstr(categories, "ngs;Adva") && !strstr(categories, "ngs;Acce"))
-                                addEntry(dirname, file->d_name, strlen(dirname), false);
-                        } else {
-                            addEntry(dirname, file->d_name, strlen(dirname), false);
+                        cacheAppItems[cont++] = ditem;
+                        cacheAppItems[cont] = NULL;
                         }
                     }
+                closedir(dir);
+                SortItems(cacheAppItems);
                 }
             }
 
-            if (strstr(fPath, "Settings")) {
-                addEntry("/usr/share/gnome/vfolders/", "Accessibility.directory",
-                         strlen("/usr/share/gnome/vfolders/"), false);
-                addEntry("/usr/share/gnome/vfolders/", "Advanced.directory",
-                         strlen("/usr/share/gnome/vfolders/"), false);
+        // Search for the menu configuration for this .directory file
+        MenuDir *md = NULL;
+        for (int i=0; knownMenuDirs[i].filename; i++) {
+             if (strstr(fPath, knownMenuDirs[i].filename)) {
+                  md = &knownMenuDirs[i]; break;
             }
-            closedir(dir);
+        }
+        // Add all AppItems that match the configuration conditions
+        strcpy (dirname, APPLICATIONS_DIR);
+        for (cont=0; cacheAppItems[cont]; cont++) {
+           GnomeDesktopItem *ditem = cacheAppItems[cont];
+           const char *location   = gnome_desktop_item_get_location(ditem);
+           const char *categories = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_CATEGORIES);
+           //const char *iname      = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NAME);
+           bool ok = false;
+	       if (categories && ( !md || md->includedCategories[0] || *md->excludedCategories[0])) {
+               ok = true;
+			   if (md) { // is a known menudir
+                  for (int i=0; ok &&  md->includedCategories[i]; i++) {
+                     if (!strstr(categories, md->includedCategories[i])) {
+                         ok = false; break;
+		             }
+                  }
+                  for (int i=0; ok &&  md->excludedCategories[i]; i++) {
+                     if ( strstr(categories, md->excludedCategories[i]))  {
+                         ok = false; break;
+                     }
+                  }
+               } else { // is the root menu
+                  for (int i=0; ok && root.includedCategories[i]; i++) {
+                     if (!strstr(categories, root.includedCategories[i]))  {
+                         ok = false; break;
+                     }
+                  }
+                  for (int i=0; ok && root.excludedCategories[i]; i++) {
+                     if ( strstr(categories, root.excludedCategories[i]))  {
+                         ok = false; break;
+                     }
+                  }
+               }
+           }
+           if (ok) {
+               if (location && !strncmp(location, "file://", 7))
+                   location += 7;
+               if (!stat(location, &sb) && S_ISREG(sb.st_mode)) {
+                    const char *name = strrchr(location,'/');
+                    name = name ? name + 1: location;
+                    addEntry(dirname, name, strlen(dirname), ditem, false);
+               } 
+           }
+        }
+
+        // Add submenus to this menu
+        for (int i=0; md && md->subMenus[i]; i++) {
+            addEntry(DIRECTORIES_DIR, md->subMenus[i], strlen(DIRECTORIES_DIR), NULL, false);
         }
     }
 }
 
 int makeMenu(const char *base_directory) {
+    *cacheItems = NULL;
+    *cacheAppItems = NULL;
     GnomeMenu *menu = new GnomeMenu();
     menu->populateMenu(base_directory);
-    dumpMenu(menu);
+    dumpMenu(menu,0);
     return 0;
 }
 
@@ -348,6 +511,9 @@
 
 int main(int argc, char **argv) {
 
+    gtk_set_locale();
+    gtk_init(&argc, &argv);
+
     gnome_vfs_init();
 
     for (char ** arg = argv + 1; arg < argv + argc; ++arg) {
@@ -359,6 +525,8 @@
                 return runFile(path);
             } else if ((path = GET_LONG_ARGUMENT("list")) != NULL) {
                 return makeMenu(path);
+            } else if (IS_SWITCH("e", "empty")) {
+                showEmptyMenu=1;
             }
         }
     }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/gnome2.old.cc icewm-1.2.30.LXP/src/gnome2.old.cc
--- icewm-1.2.30/src/gnome2.old.cc	1970-01-01 01:00:00.000000000 +0100
+++ icewm-1.2.30.LXP/src/gnome2.old.cc	2006-12-14 17:55:14.000000000 +0100
@@ -0,0 +1,426 @@
+/*
+ * IceWM
+ *
+ * Copyright (C) 1998-2003 Marko Macek & Nehal Mistry
+ *
+ * Changes:
+ *
+ *      2003/06/14
+ *       * created gnome2 support from gnome.cc
+ */
+
+#include "config.h"
+#ifdef CONFIG_GNOME_MENUS
+
+#include "ylib.h"
+#include "default.h"
+
+#include "ypixbuf.h"
+#include "yapp.h"
+#include "sysdep.h"
+#include "base.h"
+#include <dirent.h>
+#include <string.h>
+
+#include <gnome.h>
+#include <libgnome/gnome-desktop-item.h>
+#include <libgnomevfs/gnome-vfs-init.h>
+#include "yarray.h"
+
+char const * ApplicationName = "icewm-menu-gnome2";
+
+class GnomeMenu;
+
+class GnomeMenuItem {
+public:
+    GnomeMenuItem() { title = 0; icon = 0; dentry = 0; submenu = 0; }
+
+    const char *title;
+    const char *icon;
+    const char *dentry;
+    const char *command;
+    GnomeMenu *submenu;
+};
+
+#define MAX_APP_ITEMS 999
+GnomeDesktopItem *cacheAppItems[MAX_APP_ITEMS];
+int showEmptyMenu = 0;
+
+class GnomeMenu {
+public:
+    GnomeMenu() { }
+
+    YObjectArray<GnomeMenuItem> items;
+
+    bool isDuplicateName(const char *name);
+    void addEntry(const char *fPath, const char *name, const int plen,
+                         GnomeDesktopItem *ditem, const bool firstRun);
+    void populateMenu(const char *fPath);
+};
+
+void dumpMenu(GnomeMenu *menu, int ind) {
+    for (unsigned int i = 0; i < menu->items.getCount(); i++) {
+        GnomeMenuItem *item = menu->items.getItem(i);
+        if (item && item->dentry && !item->submenu && item->command && *item->command) {
+            const char *cmd = item->command;
+            char *c= (char *)cmd+strlen(cmd);
+            // desktop items has parameters that starts with % (%u %f ...)
+            for (;c>cmd;c--) if (*c=='%') *c=0;
+            // delete final spaces
+            c= (char *)cmd+strlen(cmd);
+            for (;c>cmd;c--) 
+               if (*c==' ') *c=0;
+               else break;
+            // delete begin spaces
+            while(*cmd == ' ') cmd++;
+            // print out indentation spaces
+            for(int cc = 0; cc < ind; cc++) printf("   ");
+            // print the program entry
+            printf("prog \"%s\" %s %s\n",
+                   item->title,
+                   item->icon ? item->icon : "-",
+                   item->command);
+        } else if (item && item->dentry && item->submenu) {
+            GnomeMenu *submenu = item->submenu;
+            if (showEmptyMenu || submenu->items.getCount()) {
+                for(int cc = 0; cc < ind; cc++) printf("   ");
+                printf("menu \"%s\" \"%s\" {\n", item->title, item->icon ? item->icon : "-");
+                dumpMenu(submenu, ind + 1);
+                for(int cc = 0; cc < ind; cc++) printf("   ");
+                printf("}\n");
+            }
+        }
+    }
+}
+
+bool GnomeMenu::isDuplicateName(const char *name) {
+    for (unsigned int i = 0; i < items.getCount(); i++) {
+        GnomeMenuItem *item = items.getItem(i);
+        if (strcmp(name, item->title) == 0)
+            return 1;
+    }
+    return 0;
+}
+
+void GnomeMenu::addEntry(const char *fPath, const char *name, const int plen, 
+                         GnomeDesktopItem *ditem, const bool firstRun)
+{
+    const int nlen = (plen == 0 || fPath[plen - 1] != '/')
+        ? plen + 1 + strlen(name)
+        : plen + strlen(name);
+    char *npath = new char[nlen + 1];
+
+    if (npath) {
+        strcpy(npath, fPath);
+
+        if (plen == 0 || npath[plen - 1] != '/') {
+            npath[plen] = '/';
+            strcpy(npath + plen + 1, name);
+        } else
+            strcpy(npath + plen, name);
+
+        GnomeMenuItem *item = new GnomeMenuItem();
+        item->title = name;
+
+        if (ditem == NULL ) 
+            ditem = gnome_desktop_item_new_from_file(npath,
+                                                    (GnomeDesktopItemLoadFlags)0,
+                                                    NULL);
+
+        struct stat sb;
+        const char *type;
+        bool isDir = (!stat(npath, &sb) && S_ISDIR(sb.st_mode));
+        type = gnome_desktop_item_get_string(ditem,
+                                             GNOME_DESKTOP_ITEM_TYPE);
+        if (!isDir && type && strstr(type, "Directory")) {
+            isDir = 1;
+        }
+
+        if (isDir) {
+            GnomeMenu *submenu = new GnomeMenu();
+            submenu->populateMenu(npath);
+
+            item->title = g_basename(npath);
+            item->icon = gnome_pixmap_file("gnome-folder.png");
+            item->submenu = submenu;
+
+            char *epath = new char[nlen + sizeof("/.directory")];
+            strcpy(epath, npath);
+            strcpy(epath + nlen, "/.directory");
+
+            if (stat(epath, &sb) == -1) {
+                strcpy(epath, npath);
+            }
+
+            ditem = gnome_desktop_item_new_from_file(epath,
+                                                     (GnomeDesktopItemLoadFlags)0,
+                                                     NULL);
+            if (ditem) {
+                item->title = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NAME);
+                item->icon = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON);
+            }
+            item->dentry = epath;
+        } else {
+            if (type && !strstr(type, "Directory")) {
+                item->title = gnome_desktop_item_get_localestring(ditem, GNOME_DESKTOP_ITEM_NAME);
+                item->command = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_EXEC);
+                if (gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON))
+                    item->icon = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_ICON);
+                item->dentry = npath;
+            }
+        }
+        if (firstRun || !isDuplicateName(item->title)) 
+            items.append(item);
+    }
+}
+
+void GnomeMenu::populateMenu(const char *fPath) {
+    struct stat sb;
+    const char *DirCapplets = "/usr/share/control-center-2.0/capplets/";
+    const char *DirVfolders = "/usr/share/gnome/vfolders/";
+    const char *DirDesktopD = "/usr/share/desktop-directories/";
+    bool isDir =       (!stat(fPath      , &sb) && S_ISDIR(sb.st_mode));
+    bool hasCapplets = (!stat(DirCapplets, &sb) && S_ISDIR(sb.st_mode));
+    bool hasVfolders = (!stat(DirVfolders, &sb) && S_ISDIR(sb.st_mode));
+    bool hasDesktopD = (!stat(DirDesktopD, &sb) && S_ISDIR(sb.st_mode));
+
+    const int plen = strlen(fPath);
+
+    char tmp[256];
+    strcpy(tmp, fPath);
+    strcat(tmp, "/.directory");
+
+    if (isDir && !stat(tmp, &sb)) { // looks like kde/gnome1 style
+
+        char *opath = new char[plen + sizeof("/.order")];
+        if (opath) {
+            strcpy(opath, fPath);
+            strcpy(opath + plen, "/.order");
+
+            FILE * order(fopen(opath, "r"));
+
+            if (order) {
+                char oentry[100];
+
+                while (fgets(oentry, sizeof (oentry), order)) {
+                    const int oend = strlen(oentry) - 1;
+
+                    if (oend > 0 && oentry[oend] == '\n')
+                        oentry[oend] = '\0';
+
+                    addEntry(fPath, oentry, plen, NULL, true);
+                }
+
+                fclose(order);
+            }
+
+            delete opath;
+        }
+
+        struct dirent **namelist;
+        int i, n;
+        if ( 0 < (n = scandir(fPath, &namelist, 0, alphasort)) ) {
+            for (i=0; i<n; i++) {
+                if (*namelist[i]->d_name != '.') 
+                    addEntry(fPath, namelist[i]->d_name, plen, NULL, false);
+                free(namelist[i]);
+            }
+            free(namelist);
+        }
+    } else {   // gnome2 style
+        char *category = NULL;
+        char dirname[256] = "a";
+
+        if (isDir) {
+            strcpy(dirname, fPath);
+        } else if (hasCapplets && strstr(fPath, "Settings")) {
+            strcpy(dirname, DirCapplets);
+        } else if (hasCapplets && strstr(fPath, "Advanced")) {
+            strcpy(dirname, DirCapplets);
+        } else {
+            dirname[0] = '\0';
+        }
+
+        if (isDir) {
+            struct dirent **namelist;
+            int i, n;
+            if ( 0 < (n = scandir(fPath, &namelist, 0, alphasort)) ) {
+                for (i=0; i<n; i++) {
+                    if (!strcmp(dirname, fPath) &&
+                        (strstr(namelist[i]->d_name, "Accessibility") ||
+                         strstr(namelist[i]->d_name, "Advanced") ||
+                         strstr(namelist[i]->d_name, "Applications") ||
+                         strstr(namelist[i]->d_name, "-More.") ||
+                         strstr(namelist[i]->d_name, "AllPrograms") ||
+                         strstr(namelist[i]->d_name, "Root") ))
+                        continue;
+                    if (*namelist[i]->d_name != '.')
+                        addEntry(dirname, namelist[i]->d_name, strlen(dirname), NULL, false);
+                    free(namelist[i]);
+                }
+                free(namelist);
+            }
+        }
+
+        strcpy(dirname, "/usr/share/applications/");
+
+        if (isDir) {
+            //category = strdup("ion;Core");
+        } else if (strstr(fPath, "Applications")) {
+            category = strdup("ion;Merg");
+        } else if (strstr(fPath, "Accessories")) {
+            category = strdup("ion;Util");
+        } else if (strstr(fPath, "Advanced")) {
+            category = strdup("ngs;Adva");
+            if (hasCapplets)
+                strcpy(dirname, DirCapplets);
+        } else if (strstr(fPath, "Accessibility")) {
+            category = strdup("ngs;Acce");
+            if (hasCapplets)
+                strcpy(dirname, DirCapplets);
+        } else if (strstr(fPath, "Development")) {
+            category = strdup("ion;Deve");
+        } else if (strstr(fPath, "Editors")) {
+            category = strdup("ion;Text");
+        } else if (strstr(fPath, "Games")) {
+            category = strdup("ion;Game");
+        } else if (strstr(fPath, "Graphics")) {
+            category = strdup("ion;Grap");
+        } else if (strstr(fPath, "Internet")) {
+            category = strdup("ion;Netw");
+        } else if (strstr(fPath, "Root")) {
+            category = strdup("ion;Core");
+        } else if (strstr(fPath, "Multimedia")) {
+            category = strdup("ion;Audi");
+        } else if (strstr(fPath, "Office")) {
+            category = strdup("ion;Offi");
+        } else if (strstr(fPath, "Settings")) {
+            category = strdup("ion;Sett");
+            if (hasCapplets)
+                strcpy(dirname, DirCapplets);
+        } else if (strstr(fPath, "System")) {
+            category = strdup("ion;Syst");
+        } else {
+            category = strdup("xyz");
+        }
+
+        if (!strlen(dirname))
+            strcpy(dirname, "/usr/share/applications/");
+
+        int cont=0;
+
+        if (*cacheAppItems == NULL ) {
+            struct dirent **namelist;
+            int i, n;
+            if ( 0 < (n = scandir(dirname, &namelist, 0, alphasort)) ) {
+                fprintf(stderr,"Loading apps from: %s ... ", dirname);
+                for (i=0; i < n ; i++) {
+                    if (*namelist[i]->d_name != '.') {
+                        char fullpath[256];
+                        strcpy(fullpath, dirname);
+                        strcat(fullpath, namelist[i]->d_name);
+                        GnomeDesktopItem *ditem =
+                            gnome_desktop_item_new_from_file(fullpath,
+                                                             (GnomeDesktopItemLoadFlags)0,
+                                                             NULL);
+                        cacheAppItems[cont++] = ditem;
+                    }
+                    free(namelist[i]);
+                }
+                cacheAppItems[cont] = NULL;
+                fprintf(stderr,"[%d]\n",cont);
+                free(namelist);
+            }
+        }
+
+        for (cont=0; cacheAppItems[cont]; cont++) {
+           GnomeDesktopItem *ditem = cacheAppItems[cont];
+           const char *location   = 
+                 gnome_desktop_item_get_location(ditem);
+
+           const char *categories = 
+                 gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_CATEGORIES);
+
+           if (categories && category && strstr(categories, category)) {
+               if (location && !strncmp(location, "file://", 7))
+                   location += 7;
+
+               if (!stat(location, &sb) && S_ISREG(sb.st_mode)) {
+                    const char *name = strrchr(location,'/');
+                    name = name ? name + 1: location;
+                    if (strstr(fPath, "Settings")) {
+                        if (!strstr(categories, "ngs;Adva") && !strstr(categories, "ngs;Acce")) {
+                            addEntry(dirname, name, strlen(dirname), ditem, false);
+                        }
+                    } else {
+                        addEntry(dirname, name, strlen(dirname), ditem, false);
+                    }
+               } 
+           }
+        }
+
+        if (*cacheAppItems && strstr(fPath, "Settings") && (hasVfolders || hasDesktopD) ) {
+            addEntry(hasVfolders ? DirVfolders : DirDesktopD , "Accessibility.directory",
+                    strlen(hasVfolders ? DirVfolders : DirDesktopD), NULL, false);
+            addEntry(hasVfolders ? DirVfolders : DirDesktopD, "Advanced.directory",
+                    strlen(hasVfolders ? DirVfolders : DirDesktopD), NULL, false);
+        }
+    }
+}
+
+int makeMenu(const char *base_directory) {
+    GnomeMenu *menu = new GnomeMenu();
+    menu->populateMenu(base_directory);
+    dumpMenu(menu,0);
+    return 0;
+}
+
+int runFile(const char *dentry_path) {
+
+    char arg[32];
+    int i;
+
+    GnomeDesktopItem *ditem =
+        gnome_desktop_item_new_from_file(dentry_path,
+                                         (GnomeDesktopItemLoadFlags)0,
+                                         NULL);
+
+    if (ditem == NULL) {
+        return 1;
+    } else {
+//      FIXME: leads to segfault for some reason, so using execlp instead
+//      gnome_desktop_item_launch(ditem, NULL, 0, NULL);
+
+        const char *app = gnome_desktop_item_get_string(ditem, GNOME_DESKTOP_ITEM_EXEC);
+        for (i = 0; app[i] && app[i] != ' '; ++i) {
+            arg[i] = app[i];
+        }
+        arg[i] = '\0';
+
+        execlp(arg, arg, NULL);
+    }
+
+    return 0;
+}
+
+int main(int argc, char **argv) {
+
+    gnome_vfs_init();
+
+    for (char ** arg = argv + 1; arg < argv + argc; ++arg) {
+        if (**arg == '-') {
+            char *path = 0;
+            if (IS_SWITCH("h", "help"))
+                break;
+            if ((path = GET_LONG_ARGUMENT("open")) != NULL) {
+                return runFile(path);
+            } else if ((path = GET_LONG_ARGUMENT("list")) != NULL) {
+                return makeMenu(path);
+            } else if (IS_SWITCH("e", "empty")) {
+                showEmptyMenu=1;
+            }
+        }
+    }
+    msg("Usage: %s [ --open PATH | --list PATH ]", argv[0]);
+}
+#endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/iceicon.cc icewm-1.2.30.LXP/src/iceicon.cc
--- icewm-1.2.30/src/iceicon.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/iceicon.cc	2006-12-14 17:55:14.000000000 +0100
@@ -161,7 +161,8 @@
 void YIconView::updateItems() {
     if (fItems == 0) {
         //fMaxWidth = 0;
-        fItems = new (YIconItem *)[fItemCount];
+        //LXP fItems = new (YIconItem *)[fItemCount];
+        fItems = new YIconItem *[fItemCount];
         if (fItems) {
             YIconItem *a = getFirst();
             int n = 0;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/icesm.cc icewm-1.2.30.LXP/src/icesm.cc
--- icewm-1.2.30/src/icesm.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/icesm.cc	2006-12-14 17:55:14.000000000 +0100
@@ -15,7 +15,16 @@
         catchSignal(SIGCHLD);
         catchSignal(SIGTERM);
         catchSignal(SIGINT);
+        // This enable the feature to choose the background manager to use
+        // ie. --bg=icewmbg --bg=idesk
+        icewmbg_command = NULL;
+        for (int i=1; i<*argc; i++) {
+           if (!strncmp(argv[0][i],"--bg=",5)) {
+              icewmbg_command=argv[0][i] + 5;
     }
+        }
+    }
+
 
     void runScript(const char *scriptName) {
         char *scriptFile = app->findConfigFile(scriptName, X_OK);
@@ -27,13 +36,19 @@
     }
 
     void runIcewmbg(bool quit = false) {
-        const char *args[] = { ICEWMBGEXE, 0, 0 };
-
+        const char *args[] = {icewmbg_command?icewmbg_command:ICEWMBGEXE, 0, 0 }; //LXP
+        if (quit && icewmbg_command && bg_pid != -1 ) {
+           kill(bg_pid,SIGTERM);
+           int status;
+           waitpid(tray_pid, &status, 0);
+           bg_pid = -1;
+        } else {
         if (quit) {
             args[1] = "-q";
         }
         bg_pid =  app->runProgram(args[0], args);
     }
+    }
 
     void runIcewmtray(bool quit = false) {
         const char *args[] = { ICEWMTRAYEXE, 0 };
@@ -98,6 +113,7 @@
     int tray_pid;
     int bg_pid;
     bool logout;
+    char *icewmbg_command; //LXP
 };
 
 int main(int argc, char **argv) {
@@ -111,7 +127,12 @@
 
     xapp.mainLoop();
 
+#ifdef CONFIG_LOOK_WINXP
+    char *ss = xapp.findConfigFile("shutdown", X_OK);
+    if (ss && strlen(ss)) system(ss);
+#else
     xapp.runScript("shutdown");
+#endif
     xapp.runIcewmtray(true);
     xapp.runWM(true);
     xapp.runIcewmbg(true);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/icetray.cc icewm-1.2.30.LXP/src/icetray.cc
--- icewm-1.2.30/src/icetray.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/icetray.cc	2006-12-14 17:55:14.000000000 +0100
@@ -21,9 +21,11 @@
 YColor *taskBarBg;
 
 XSV(const char *, clrDefaultTaskBar,            "rgb:C0/C0/C0")
+XIV(bool, trayDrawBevel,                        false)
 
 cfoption icewmbg_prefs[] = {
     OSV("ColorDefaultTaskBar",                  &clrDefaultTaskBar,             "Background of the taskbar"),
+    OBV("TrayDrawBevel",                        &trayDrawBevel,                 "Surround the tray with plastic border"),
     OK0()
 };
 #endif
@@ -52,6 +54,7 @@
     SysTrayApp(int *argc, char ***argv, const char *displayName = 0);
     ~SysTrayApp();
 
+    void loadConfig(); //LXP FX
     bool filterEvent(const XEvent &xev);
     void handleSignal(int sig);
 
@@ -65,7 +67,12 @@
     desktop->setStyle(YWindow::wsDesktopAware);
     catchSignal(SIGINT);
     catchSignal(SIGTERM);
+    catchSignal(SIGHUP);
+    loadConfig();
 
+    tray = new SysTray();
+}
+void SysTrayApp::loadConfig() {
 #ifdef CONFIG_TASKBAR
 #ifndef NO_CONFIGURE
     {
@@ -87,14 +94,10 @@
     }
     YApplication::loadConfig(icewmbg_prefs, "prefoverride");
 #endif
-#endif
-
-#ifdef CONFIG_TASKBAR
-    if (taskBarBg == 0)
+    if (taskBarBg) 
+	    delete taskBarBg;
         taskBarBg = new YColor(clrDefaultTaskBar);
 #endif
-
-    tray = new SysTray();
 }
 
 SysTrayApp::~SysTrayApp() {
@@ -119,6 +122,11 @@
 
 void SysTrayApp::handleSignal(int sig) {
     switch (sig) {
+    case SIGHUP: 
+         // Reload config colors from theme file and notify tray to repaint
+         loadConfig(); 
+         tray->trayChanged(); 
+         return; 
     case SIGINT:
     case SIGTERM:
         MSG(("exiting."));
@@ -153,7 +161,7 @@
 }
     
 void SysTray::trayChanged() {
-    fTray2->relayout();
+    fTray2->backgroundChanged();
     setSize(fTray2->width(),
             fTray2->height());
 }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/icewmbg.cc icewm-1.2.30.LXP/src/icewmbg.cc
--- icewm-1.2.30/src/icewmbg.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/icewmbg.cc	2006-12-14 17:55:14.000000000 +0100
@@ -161,12 +161,13 @@
                                      char const * filename, YColor * color)
 {
     ref<YPixmap> back;
+    YResourcePaths subdirs(paths, "");
 
     if (*filename == '/') {
         if (access(filename, R_OK) == 0)
             back.init(new YPixmap(filename));
     } else
-        back = paths.loadPixmap(0, filename);
+        back = subdirs.loadPixmap("", filename);
 
 #ifndef NO_CONFIGURE
     if (back != null && (centerBackground || desktopBackgroundScaled)) {
@@ -179,6 +180,7 @@
         if (desktopBackgroundScaled) {
             int aw = back->width();
             int ah = back->height();
+            if (desktopMaintainAspect) {
             if (aw < desktop->width()) {
                 ah = (long long)desktop->width() * ah / aw;
                 aw = desktop->width();
@@ -194,6 +196,10 @@
                     aw = desktop->width();
                 }
             }
+	    } else {
+		aw=desktop->width(); 
+		ah=desktop->height();
+	    }
             ref<YPixmap> scaled(new YPixmap(back->pixmap(), back->mask(), back->width(), back->height(), aw, ah));
             if (scaled != null) {
                 g.drawPixmap(scaled, (desktop->width() -  scaled->width()) / 2,
@@ -272,7 +278,8 @@
             currentBackground = back;
             handleBackground = true;
         }
-    } else if (DesktopBackgroundColor && DesktopBackgroundColor[0]) {
+    } 
+    if (handleBackground==false && DesktopBackgroundColor && DesktopBackgroundColor[0]) {
         XSetWindowBackgroundPixmap(xapp->display(), desktop->handle(), 0);
         XSetWindowBackground(xapp->display(), desktop->handle(), bPixel);
         handleBackground = true;
@@ -387,6 +394,8 @@
              " SupportSemitransparency  - Support for semitransparent terminals\n"
              " DesktopBackgroundColor   - Desktop background color\n"
              " DesktopBackgroundImage   - Desktop background image\n"
+	     " DesktopBackgroundScaled  - Scale image to display size\n"
+             " DesktopImageMaintainAspect - Maintain the proportions of the image when scaling it\n"
              " DesktopTransparencyColor - Color to announce for semi-transparent windows\n"
              " DesktopTransparencyImage - Image to announce for semi-transparent windows\n"),
            stderr);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/objbar.cc icewm-1.2.30.LXP/src/objbar.cc
--- icewm-1.2.30/src/objbar.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/objbar.cc	2006-12-14 17:55:14.000000000 +0100
@@ -19,6 +19,8 @@
 #include "yrect.h"
 #include "yicon.h"
 
+extern YColor *taskBarBg;
+
 YColor * ObjectBar::bgColor(NULL);
 
 ref<YFont> ObjectButton::font;
@@ -26,6 +28,10 @@
 YColor * ObjectButton::fgColor(NULL);
 
 ref<YPixmap> toolbuttonPixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+ref<YPixmap> toolbuttonPixmapO; //LXP
+ref<YPixmap> toolbuttonPixmapA; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
  ref<YPixbuf> toolbuttonPixbuf(NULL);
@@ -33,8 +39,8 @@
 
 ObjectBar::ObjectBar(YWindow *parent): YWindow(parent) {
     if (bgColor == 0)
-        bgColor = new YColor(clrDefaultTaskBar);
-    setSize(1, 1);
+	bgColor=taskBarBg;
+    setSize(0, 0); //LXP
 }
 
 ObjectBar::~ObjectBar() {
@@ -48,8 +54,15 @@
         button->setSize(button->width() + 4, button->width() + 4);
     } else
 #endif
-        button->setText(name);
-
+        //button->setText(name);
+        button->setText(" ");
+    button->setColors(bgColor, YButton::activeButtonBg, NULL /*YButton::normalButtonBg*/);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    button->setBackPixmap(taskbackPixmap);
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+    button->setPixmaps(toolbuttonPixmap,toolbuttonPixmapO,toolbuttonPixmapA); //LXP
+#endif
     button->setPosition(width(), 0);
     int h = button->height();
     if (h < height())
@@ -74,7 +87,8 @@
     else
 #endif
         if (taskbackPixmap != null)
-            g.fillPixmap(taskbackPixmap, 0, 0, width(), height());
+            g.fillPixmap(taskbackPixmap, 0, 0,
+                         width(), height(), this->x(), this->y()); //LXP
         else {
             g.setColor(bgColor);
             g.fillRect(0, 0, width(), height());
@@ -125,17 +139,6 @@
         : YButton::getColor();
 }
 
-YSurface ObjectButton::getSurface() {
-    if (bgColor == 0)
-        bgColor = new YColor(*clrToolButton ? clrToolButton : clrNormalButton);
-
-#ifdef CONFIG_GRADIENTS
-    return YSurface(bgColor, toolbuttonPixmap, toolbuttonPixbuf);
-#else
-    return YSurface(bgColor, toolbuttonPixmap);
-#endif
-}
-
 void ObjectButton::actionPerformed(YAction * action, unsigned modifiers) {
 #ifdef CONFIG_GUIEVENTS
     wmapp->signalGuiEvent(geLaunchApp);
@@ -143,6 +146,10 @@
     if (fObject) fObject->open();
     else YButton::actionPerformed(action, modifiers);
 }
+YSurface ObjectButton::getSurface() { //LXP
+   return YButton::getSurface();
+}
+
 
 #endif /* CONFIG_TASKBAR */
 
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/themes.cc icewm-1.2.30.LXP/src/themes.cc
--- icewm-1.2.30/src/themes.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/themes.cc	2006-12-14 17:55:14.000000000 +0100
@@ -123,8 +123,8 @@
     findThemes(path, this);
     delete[] path;
 
-    addSeparator();
-    add(newThemeItem(_("Default"), CONFIG_DEFAULT_THEME, CONFIG_DEFAULT_THEME));
+    //addSeparator(); //LXP FIXME
+    //add(newThemeItem(_("Default"), CONFIG_DEFAULT_THEME, CONFIG_DEFAULT_THEME));
 }
 
 int ThemesMenu::countThemes(const char *path) {
@@ -156,6 +156,9 @@
 
         if (item) {
             item->setChecked(themeName && 0 == strcmp(themeName, relThemeName));
+#ifdef CONFIG_LOOK_WINXP
+	    //item->setIcon(Icon_Theme); //LXP MODIFY
+#endif
             return item;
         }
     }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmabout.cc icewm-1.2.30.LXP/src/wmabout.cc
--- icewm-1.2.30/src/wmabout.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmabout.cc	2006-12-14 17:55:14.000000000 +0100
@@ -24,7 +24,7 @@
 
 AboutDlg::AboutDlg(): YDialog() {
     char const *version("IceWM "VERSION" ("HOSTOS"/"HOSTCPU")");
-    char *copyright(strJoin("Copyright ", _("(C)"), " 1997-2004 Marko Macek, ",
+    char *copyright(strJoin("Copyright ", _("(C)"), " 1997-2006 Marko Macek, ",
                             _("(C)"), " 2001 Mathias Hasselmann",
                             NULL));
 
@@ -32,6 +32,7 @@
     fCopyright = new YLabel(copyright, this);
     delete[] copyright;
 
+    fLXP = new YLabel("Modified by: Manuel Carrasco (2006) for LookXP v0.1-5 [lxp.sourceforge.net]", this);
     fThemeNameS = new YLabel(_("Theme:"), this);
     fThemeDescriptionS = new YLabel(_("Theme Description:"), this);
     fThemeAuthorS = new YLabel(_("Theme Author:"), this);
@@ -41,6 +42,7 @@
     autoSize();
     fProgTitle->show();
     fCopyright->show();
+    fLXP->show();
     fThemeNameS->show();
     fThemeName->show();
     fThemeDescriptionS->show();
@@ -85,10 +87,15 @@
     W = XMAX(W, RX(fCopyright));
     dy += 20;
 
+    fLXP->setPosition(dx,dy);
+    W = XMAX(W, RX(fLXP));
+    dy += 25;
+
     fThemeNameS->setPosition(dx, dy);
     fThemeDescriptionS->setPosition(dx, dy);
     fThemeAuthorS->setPosition(dx, dy);
     
+    
     dx = XMAX(dx, RX(fThemeNameS));
     dx = XMAX(dx, RX(fThemeDescriptionS));
     dx = XMAX(dx, RX(fThemeAuthorS));
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmapp.cc icewm-1.2.30.LXP/src/wmapp.cc
--- icewm-1.2.30/src/wmapp.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmapp.cc	2006-12-14 17:55:14.000000000 +0100
@@ -98,6 +98,32 @@
 
 YIcon *defaultAppIcon = 0;
 
+#ifdef CONFIG_LOOK_WINXP
+YIcon *Icon_Restore=0; //LXP
+YIcon *Icon_Close=0; //LXP
+YIcon *Icon_Kill=0; //LXP
+YIcon *Icon_Minimize=0; //LXP
+YIcon *Icon_Maximize=0; //LXP
+YIcon *Icon_Program=0; //LXP
+YIcon *Icon_Logout=0; //LXP
+YIcon *Icon_Theme=0; //LXP
+extern YIcon *Icon_MenuSelected; //ymenu.cc //LXP
+extern YIcon *Icon_Folder; //ymenu.cc //LXP
+#else
+ #define Icon_Restore NULL
+ #define Icon_Close NULL
+ #define Icon_Kill NULL
+ #define Icon_Minimize NULL
+ #define Icon_Maximize NULL
+#endif
+#define IF_WMS(a) if(strchr(windowActionsSupported,a))
+
+#ifdef MENU_LEFT_PIXMAPS
+ref<YPixmap> startmenuLeftTopPixmap; //LXP
+ref<YPixmap> startmenuLeftMidPixmap; //LXP
+ref<YPixmap> startmenuLeftBotPixmap; //LXP
+#endif
+
 static void registerProtocols() {
     Atom win_proto[] = {
         _XA_WIN_WORKSPACE,
@@ -367,7 +393,7 @@
     YResourcePaths paths("", true);
 
 #ifdef CONFIG_LOOK_PIXMAP
-    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookGtk) {
+    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookMXP || wmLook == lookGtk) { //LXP SEE FIX
 #ifdef CONFIG_GRADIENTS
         if (gradients) {
             for (char const * g(gradients + strspn(gradients, " \t\r\n"));
@@ -565,16 +591,24 @@
     if (rolloverTitleButtons) {
         menuButton[2] = paths.loadPixmap(0, "menuButtonO.xpm");
     }
-    } else
+    } /*else*/ //LXP
 #endif
     {
+      if(depthPixmap[0]==null) //LXP
            depthPixmap[0] = paths.loadPixmap(0, "depth.xpm");
+      if(closePixmap[0]==null) //LXP
            closePixmap[0] = paths.loadPixmap(0, "close.xpm");
+      if(maximizePixmap[0]==null) //LXP
         maximizePixmap[0] = paths.loadPixmap(0, "maximize.xpm");
+      if(minimizePixmap[0]==null) //LXP
         minimizePixmap[0] = paths.loadPixmap(0, "minimize.xpm");
+      if(restorePixmap[0]==null) //LXP
          restorePixmap[0] = paths.loadPixmap(0, "restore.xpm");
+      if(hidePixmap[0]==null) //LXP
             hidePixmap[0] = paths.loadPixmap(0, "hide.xpm");
+      if(rollupPixmap[0]==null) //LXP
           rollupPixmap[0] = paths.loadPixmap(0, "rollup.xpm");
+      if(rolldownPixmap[0]==null) //LXP
         rolldownPixmap[0] = paths.loadPixmap(0, "rolldown.xpm");
     }
 
@@ -588,6 +622,17 @@
         menuselPixmap = paths.loadPixmap(0, "menusel.xpm");
     if (TEST_GRADIENT(menusepPixbuf == null))
         menusepPixmap = paths.loadPixmap(0, "menusep.xpm");
+#ifdef MENU_LEFT_PIXMAPS
+    menuTL_Pixmap = paths.loadPixmap(0,"menuTL.xpm"); //LXP
+    menuL_Pixmap = paths.loadPixmap(0,"menuL.xpm"); //LXP
+    menuBL_Pixmap = paths.loadPixmap(0,"menuBL.xpm"); //LXP
+    startmenuLeftTopPixmap = paths.loadPixmap(0, "startmenuTL.xpm"); //LXP
+    if (startmenuLeftTopPixmap==null) startmenuLeftTopPixmap=menuTL_Pixmap; //LXP
+    startmenuLeftMidPixmap = paths.loadPixmap(0, "startmenuL.xpm"); //LXP
+    if (startmenuLeftMidPixmap==null) startmenuLeftMidPixmap=menuL_Pixmap; //LXP
+    startmenuLeftBotPixmap = paths.loadPixmap(0, "startmenuBL.xpm"); //LXP
+    if (startmenuLeftBotPixmap==null) startmenuLeftBotPixmap=menuBL_Pixmap; //LXP
+#endif
 
 #ifndef LITE
     if (TEST_GRADIENT(listbackPixbuf == null) &&
@@ -603,6 +648,9 @@
     if (TEST_GRADIENT(buttonAPixbuf == null) &&
         (buttonAPixmap = paths.loadPixmap(0, "buttonA.xpm")) == null)
         buttonAPixmap = paths.loadPixmap("taskbar/", "taskbuttonactive.xpm");
+#ifdef OVER_BUTTON_PIXMAPS
+     buttonOPixmap = paths.loadPixmap(0, "buttonO.xpm"); //LXP
+#endif
 
 #ifdef CONFIG_TASKBAR
     if (TEST_GRADIENT(toolbuttonPixbuf == null) &&
@@ -610,19 +658,25 @@
          paths.loadPixmap("taskbar/", "toolbuttonbg.xpm")) == null)
         IF_CONFIG_GRADIENTS (buttonIPixbuf != null,
                              toolbuttonPixbuf = buttonIPixbuf)
-                        else toolbuttonPixmap = buttonIPixmap;
+                        else if (wmLook!=lookMXP) toolbuttonPixmap = buttonIPixmap ; //LXP FIX
+
     if (TEST_GRADIENT(workspacebuttonPixbuf == null) &&
         (workspacebuttonPixmap =
          paths.loadPixmap("taskbar/", "workspacebuttonbg.xpm")) == null)
         IF_CONFIG_GRADIENTS (buttonIPixbuf != null,
                              workspacebuttonPixbuf = buttonIPixbuf)
-                        else workspacebuttonPixmap = buttonIPixmap;
+                        else if (wmLook!=lookMXP) workspacebuttonPixmap = buttonIPixmap; //LXP FIX
     if (TEST_GRADIENT(workspacebuttonactivePixbuf == null) &&
         (workspacebuttonactivePixmap =
          paths.loadPixmap("taskbar/", "workspacebuttonactive.xpm")) == null)
         IF_CONFIG_GRADIENTS (buttonAPixbuf != null,
                              workspacebuttonactivePixbuf = buttonAPixbuf)
-                        else workspacebuttonactivePixmap = buttonAPixmap;
+                        else if (wmLook!=lookMXP) workspacebuttonactivePixmap = buttonAPixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+    toolbuttonPixmapO = paths.loadPixmap("taskbar/", "toolbuttonbgO.xpm"); //LXP TODO
+    toolbuttonPixmapA = paths.loadPixmap("taskbar/", "toolbuttonbgA.xpm"); //LXP TODO
+    workspacebuttonoverPixmap=paths.loadPixmap("taskbar/", "workspacebuttonover.xpm"); //LXP
+#endif
 #endif
 
     if (logoutPixmap != null) {
@@ -659,6 +713,20 @@
         buttonIPixmap->replicate(true, false);
     if (buttonAPixmap != null)
         buttonAPixmap->replicate(true, false);
+#ifndef LITE
+ #ifdef CONFIG_LOOK_WINXP
+     Icon_Restore=YIcon::getIcon("_restore"); //LXP
+     Icon_Close=YIcon::getIcon("_close"); //LXP
+     Icon_Kill=YIcon::getIcon("_kill"); //LXP
+     Icon_Minimize=YIcon::getIcon("_minimize"); //LXP
+     Icon_Maximize=YIcon::getIcon("_maximize"); //LXP
+     Icon_MenuSelected=YIcon::getIcon("_selected"); //LXP
+     Icon_Program=YIcon::getIcon("program"); //LXP
+     Icon_Theme=YIcon::getIcon("themes"); //LXP
+     Icon_Folder = YIcon::getIcon("folder"); //LXP
+     Icon_Logout= YIcon::getIcon("logout"); //LXP
+ #endif
+#endif
 }
 
 static void initMenus() {
@@ -724,24 +792,26 @@
         moveMenu->addItem(s, 0, 0, workspaceActionMoveTo[w]);
     }
 
-    windowMenu->addItem(_("_Restore"),  -2, KEY_NAME(gKeyWinRestore), actionRestore);
-    windowMenu->addItem(_("_Move"),     -2, KEY_NAME(gKeyWinMove), actionMove);
-    windowMenu->addItem(_("_Size"),     -2, KEY_NAME(gKeyWinSize), actionSize);
-    windowMenu->addItem(_("Mi_nimize"), -2, KEY_NAME(gKeyWinMinimize), actionMinimize);
-    windowMenu->addItem(_("Ma_ximize"), -2, KEY_NAME(gKeyWinMaximize), actionMaximize);
-    if (allowFullscreen)
+    IF_WMS('m') windowMenu->addItem(_("_Restore"),  -2, KEY_NAME(gKeyWinRestore), actionRestore)_SetIcon(Icon_Restore);
+    IF_WMS('v') windowMenu->addItem(_("_Move"),     -2, KEY_NAME(gKeyWinMove), actionMove);
+    IF_WMS('z') windowMenu->addItem(_("_Size"),     -2, KEY_NAME(gKeyWinSize), actionSize);
+    IF_WMS('i') windowMenu->addItem(_("Mi_nimize"), -2, KEY_NAME(gKeyWinMinimize), actionMinimize)_SetIcon(Icon_Minimize);
+    IF_WMS('m') windowMenu->addItem(_("Ma_ximize"), -2, KEY_NAME(gKeyWinMaximize), actionMaximize)_SetIcon(Icon_Maximize);
+    IF_WMS('f') if (allowFullscreen)
         windowMenu->addItem(_("_Fullscreen"), -2, KEY_NAME(gKeyWinFullscreen), actionFullscreen);
 
 #ifndef CONFIG_PDA
-    windowMenu->addItem(_("_Hide"),     -2, KEY_NAME(gKeyWinHide), actionHide);
+    IF_WMS('h') windowMenu->addItem(_("_Hide"),     -2, KEY_NAME(gKeyWinHide), actionHide);
 #endif
-    windowMenu->addItem(_("Roll_up"),   -2, KEY_NAME(gKeyWinRollup), actionRollup);
+    IF_WMS('r') windowMenu->addItem(_("Roll_up"),   -2, KEY_NAME(gKeyWinRollup), actionRollup);
+    IF_WMS('d') {
     windowMenu->addSeparator();
     windowMenu->addItem(_("R_aise"),    -2, KEY_NAME(gKeyWinRaise), actionRaise);
     windowMenu->addItem(_("_Lower"),    -2, KEY_NAME(gKeyWinLower), actionLower);
     windowMenu->addSubmenu(_("La_yer"), -2, layerMenu);
+    }
 
-    if (workspaceCount > 1) {
+    IF_WMS('w') if (workspaceCount > 1) {
         windowMenu->addSeparator();
         windowMenu->addSubmenu(_("Move _To"), -2, moveMenu);
         windowMenu->addItem(_("Occupy _All"), -2, KEY_NAME(gKeyWinOccupyAll), actionOccupyAllOrCurrent);
@@ -754,19 +824,31 @@
 #endif
 
 #ifdef CONFIG_TRAY
-    if (taskBarShowTray)
+    IF_WMS('t') if (taskBarShowTray)
         windowMenu->addItem(_("Tray _icon"), -2, 0, actionToggleTray);
 #endif
 
     windowMenu->addSeparator();
-    windowMenu->addItem(_("_Close"), -2, KEY_NAME(gKeyWinClose), actionClose);
+    IF_WMS('x') windowMenu->addItem(_("_Close"), -2, KEY_NAME(gKeyWinClose), actionClose)_SetIcon(Icon_Close);
+    IF_WMS('k') windowMenu->addItem(_("_Kill Client"), -2, KEY_NAME(gKeyWinKill), actionKill)_SetIcon(Icon_Kill);
 #ifdef CONFIG_WINLIST
+    IF_WMS('l'){
     windowMenu->addSeparator();
     windowMenu->addItem(_("_Window list"), -2, KEY_NAME(gKeySysWindowList), actionWindowList);
+    }
 #endif
 
 #ifndef NO_CONFIGURE_MENUS
-    rootMenu = new StartMenu("menu");
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP)
+       rootMenu = new StartMenu("menu", startmenuIconSize);
+    else
+#endif
+    rootMenu = new StartMenu("menu", menuIconSize);
+
+#ifdef MENU_LEFT_PIXMAPS
+    rootMenu->setLeftPixmaps(startmenuLeftTopPixmap,startmenuLeftMidPixmap,startmenuLeftBotPixmap); //LXP
+#endif
     rootMenu->setActionListener(wmapp);
 #endif
 }
@@ -1129,6 +1211,8 @@
     initIconSize();
     initPixmaps();
     initMenus();
+    YButton::activeButtonBg = new YColor(clrActiveButton); //LXP
+    YButton::normalButtonBg = new YColor(clrNormalButton); //LXP
 
 #ifndef NO_CONFIGURE
     if (scrollBarWidth == 0) {
@@ -1149,7 +1233,7 @@
                 scrollBarWidth = 16;
                 break;
 
-            case lookMetal:
+            case lookMetal: case lookMXP: //LXP
                 scrollBarWidth = 17;
                 break;
 
@@ -1176,7 +1260,7 @@
                 scrollBarHeight = scrollBarWidth;
                 break;
 
-            case lookMetal:
+            case lookMetal: case lookMXP: //LXP
                 scrollBarHeight = scrollBarWidth;
                 break;
 
@@ -1206,6 +1290,7 @@
 #endif
     //windowList->show();
 #ifndef LITE
+    if (!disableCtrlAltDelWin)
     ctrlAltDelete = new CtrlAltDelete(manager);
 #endif
 #ifndef LITE
@@ -1465,6 +1550,15 @@
 #endif
     YWMApp app(&argc, &argv);
 
+#ifdef CONFIG_LOOK_WINXP
+    if (restart) {
+        char *scriptFile = app.findConfigFile("restart", X_OK);
+        const char *args[] = { scriptFile, 0, 0 };
+        app.runProgram(scriptFile, args);
+        delete[] scriptFile;
+    }
+#endif
+
 #ifdef CONFIG_GUIEVENTS
     app.signalGuiEvent(geStartup);
 #endif
@@ -1520,11 +1614,8 @@
         manager->wmCloseSession();
         // should we always do this??
         manager->exitAfterLastClient(true);
-    }
-
-    if (logoutMenu) {
-        logoutMenu->disableCommand(actionLogout);
-        logoutMenu->enableCommand(actionCancelLogout);
+        unregisterProtocols(); //LXP FIX
+        exit(0); //LXP FIX
     }
 }
 
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmbutton.cc icewm-1.2.30.LXP/src/wmbutton.cc
--- icewm-1.2.30/src/wmbutton.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmbutton.cc	2006-12-14 17:55:14.000000000 +0100
@@ -25,7 +25,7 @@
 extern YColor *inactiveTitleBarBg;
 
 #ifdef CONFIG_LOOK_PIXMAP
-ref<YPixmap> menuButton[2];
+ref<YPixmap> menuButton[3]; //LXP FX
 #endif
 
 YFrameButton::YFrameButton(YWindow *parent,
@@ -43,8 +43,9 @@
     fAction2 = action2;
     if (fAction == 0)
         setPopup(frame->windowMenu());
-
-
+#ifdef CONFIG_LOOK_WINXP
+   setSize(0,0); 
+#else // Code bellow could be deleted (manolo) geometry of button is setted in YFrameWindow::positionButton
     int w = 18, h = 18;
     if (minimizePixmap[0] != null) {
         w = minimizePixmap[0]->width();
@@ -86,6 +87,7 @@
     default:
         break;
     }
+#endif
 }
 
 YFrameButton::~YFrameButton() {
@@ -166,7 +168,7 @@
         return depthPixmap[pn];
 #ifdef CONFIG_LOOK_PIXMAP
     else if (fAction == 0 &&
-             (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookGtk))
+             (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookMXP || wmLook == lookGtk)) //LXP
         return menuButton[pn];
 #endif
     else
@@ -175,7 +177,7 @@
 
 void YFrameButton::paint(Graphics &g, const YRect &/*r*/) {
     int xPos = 1, yPos = 1;
-    int pn = (wmLook == lookPixmap || wmLook == lookMetal ||
+    int pn = (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookMXP || //LXP
               wmLook == lookGtk) && getFrame()->focused() ? 1 : 0;
     const bool armed(isArmed());
 
@@ -199,9 +201,8 @@
         getFrame()->clientIcon()->small() : null;
 #endif
 
-    ref<YPixmap> pixmap =
-        ((wmLook == lookPixmap || wmLook == lookMetal ||
-          wmLook == lookGtk) || fAction) ? getImage(pn) : null;
+    ref<YPixmap> pixmap = getImage(pn); //LXP SEE
+    if (pn && pixmap==null) pixmap=getImage(0); //LXP FX
 
     switch (wmLook) {
 #ifdef CONFIG_LOOK_WARP4
@@ -302,8 +303,43 @@
         break;
 #endif
 #ifdef CONFIG_LOOK_PIXMAP
-    case lookPixmap:
+ #ifdef CONFIG_LOOK_WINXP
+    case lookMetal:
+    case lookMXP: //LXP
+	if (getImage(1)==null || pixmap==null) {
+		YColor *color=getFrame()->focused()?activeTitleBarBg:inactiveTitleBarBg;
+		g.setColor(color);
+		g.fillRect(0, 0, width(), height());
+                if (wmLook==lookMXP && fAction==actionClose) {
+		    color=color->redder();
+		    g.setColor(color);
+		}
+		if (wmLook==lookMXP && fAction) {
+		    if (armed)      g.setColor(color->darker());
+		    else if (fOver&&rolloverTitleButtons) g.setColor(color->brighter());
+		    g.fillRect(3, 3, width()-4, height()-7);
+		}
+		if (pixmap!=null) {
+		    int x(((int)width()  - (int)pixmap->width())  / 2);
+		    int y(((int)height() - (int)pixmap->height()) / 2);
+                    g.drawPixmap(pixmap, x, y);
+		}
+		if (wmLook==lookMXP && fAction)
+	            g.drawBorderXP(1,1,width()-1,height()-3);
+                if (wmLook==lookMetal && fAction)
+                    g.drawBorderM(1,2,width()-1,height()-4,true);
+	} else 
+                g.copyPixmap(pixmap, 0, 
+			armed ? pixmap->height()/2 : 0, 
+			pixmap->width(), pixmap->height()/2 , 0, 0);
+        if (fAction == 0 && icon != null && showFrameIcon)
+            g.drawImage(icon, ((int)width() - (int)icon->width()) / 2,
+                        ((int)height() - (int)icon->height()) / 2);
+        break;
+ #else
     case lookMetal:
+ #endif
+    case lookPixmap:
     case lookGtk:
         if (pixmap != null) {
             int const h(pixmap->height() / 2);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmconfig.cc icewm-1.2.30.LXP/src/wmconfig.cc
--- icewm-1.2.30/src/wmconfig.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmconfig.cc	2006-12-14 17:55:14.000000000 +0100
@@ -106,6 +106,11 @@
         wmLook = lookGtk;
     else
 #endif
+#ifdef CONFIG_LOOK_WINXP
+    if (strcmp(arg, "mxp") == 0 || strcmp(arg, "flat")==0 ) //LXP
+        wmLook = lookMXP; //LXP
+    else //LXP
+#endif
     {
         msg(_("Bad Look name"));
     }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmdialog.cc icewm-1.2.30.LXP/src/wmdialog.cc
--- icewm-1.2.30/src/wmdialog.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmdialog.cc	2006-12-14 17:55:14.000000000 +0100
@@ -14,6 +14,7 @@
 #include "yactionbutton.h"
 
 #include "prefs.h"
+#include "yprefs.h" //LXP
 #include "wmapp.h"
 #include "wmmgr.h"
 #include "yrect.h"
@@ -26,6 +27,7 @@
 #define MIDV 6
 
 static YColor *cadBg = 0;
+extern YColor *trayBarBg;
 
 CtrlAltDelete *ctrlAltDelete = 0;
 
@@ -50,7 +52,7 @@
     YButton *b;
 
     if (cadBg == 0)
-        cadBg = new YColor(clrDialog);
+        cadBg = wmLook==lookMXP ? trayBarBg: new YColor(clrDialog);
 
     setStyle(wsOverrideRedirect);
     setPointer(YXApplication::leftPointer);
@@ -60,6 +62,10 @@
     b->setText(_("Lock _Workstation"), -2);
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->setActionListener(this);
     b->show();
 
@@ -68,6 +74,10 @@
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
     b->setActionListener(this);
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->show();
 
     b = cancelButton = new YActionButton(this);
@@ -75,6 +85,10 @@
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
     b->setActionListener(this);
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->show();
 
     b = restartButton = new YActionButton(this);
@@ -82,6 +96,10 @@
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
     b->setActionListener(this);
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->show();
 
     b = rebootButton = new YActionButton(this);
@@ -89,6 +107,10 @@
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
     b->setActionListener(this);
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->show();
 
     b = shutdownButton = new YActionButton(this);
@@ -96,6 +118,10 @@
     if (b->width() > w) w = b->width();
     if (b->height() > h) h = b->height();
     b->setActionListener(this);
+    b->setColors(cadBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+    b->setBackPixmap(logoutPixmap);
+#endif
     b->show();
 
     if (!canShutdown(true))
@@ -103,6 +129,15 @@
     if (!canShutdown(false))
         shutdownButton->setEnabled(false);
 
+    int vpos=0; //LXP
+#ifdef CONFIG_LOOK_WINXP
+    // Center Buttons vertically over Background Pixmap
+    if (wmLook==lookMXP && logoutPixmap!=null && logoutPixmap->height()>h*2) { //LXP
+         setSize(HORZ + w + MIDH + w + MIDH + w + HORZ, //LXP
+                 logoutPixmap->height()); //LXP
+         vpos=(logoutPixmap->height()/2) - (VERT + h + MIDV); //LXP
+    } else 
+#endif
     setSize(HORZ + w + MIDH + w + MIDH + w + HORZ,
             VERT + h + MIDV + h + VERT);
 
@@ -111,12 +146,12 @@
     setPosition(dx + (dw - width()) / 2,
                 dy + (dh - height()) / 2);
 
-    lockButton->setGeometry(YRect(HORZ, VERT, w, h));
-    logoutButton->setGeometry(YRect(HORZ + w + MIDH, VERT, w, h));
-    cancelButton->setGeometry(YRect(HORZ + w + MIDH + w + MIDH, VERT, w, h));
-    restartButton->setGeometry(YRect(HORZ, VERT + h + MIDV, w, h));
-    rebootButton->setGeometry(YRect(HORZ + w + MIDH, VERT + h + MIDV, w, h));
-    shutdownButton->setGeometry(YRect(HORZ + w + MIDH + w + MIDH, VERT + h + MIDV, w, h));
+    lockButton->setGeometry(YRect(HORZ, vpos + VERT, w, h));
+    logoutButton->setGeometry(YRect(HORZ + w + MIDH, vpos + VERT, w, h));
+    cancelButton->setGeometry(YRect(HORZ + w + MIDH + w + MIDH, vpos + VERT, w, h));
+    restartButton->setGeometry(YRect(HORZ, vpos + VERT + h + MIDV, w, h));
+    rebootButton->setGeometry(YRect(HORZ + w + MIDH, vpos + VERT + h + MIDV, w, h));
+    shutdownButton->setGeometry(YRect(HORZ + w + MIDH + w + MIDH, vpos + VERT + h + MIDV, w, h));
 }
 
 CtrlAltDelete::~CtrlAltDelete() {
@@ -130,13 +165,18 @@
 
 void CtrlAltDelete::paint(Graphics &g, const YRect &/*r*/) {
 #ifdef CONFIG_GRADIENTS    
-    YSurface surface(cadBg, logoutPixmap, logoutPixbuf);
+    YSurface surface(cadBg, cadBg, logoutPixmap, logoutPixmap, logoutPixbuf);
 #else
-    YSurface surface(cadBg, logoutPixmap);
+    YSurface surface(cadBg, cadBg, logoutPixmap, logoutPixmap); //LXP SEE FIX
 #endif
     g.setColor(surface.color);
-    g.drawSurface(surface, 1, 1, width() - 2, height() - 2);
+    //if (wmLook==lookMXP) {
+      //g.drawSurface(surface, 0, 0, width(), height());
+      //g.drawBorderXP(0,0,width(),height());
+    //} else {
+      g.drawSurface(surface, 0, 1, width() - 1, height() - 1);
     g.draw3DRect(0, 0, width() - 1, height() - 1, true);
+    //}
 }
 
 void CtrlAltDelete::actionPerformed(YAction *action, unsigned int /*modifiers*/) {
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmframe.cc icewm-1.2.30.LXP/src/wmframe.cc
--- icewm-1.2.30/src/wmframe.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmframe.cc	2006-12-14 17:55:14.000000000 +0100
@@ -1807,7 +1807,7 @@
 #endif
 #endif
 #ifdef CONFIG_LOOK_PIXMAP
-    case lookPixmap:
+    case lookPixmap: case lookMXP:
     case lookMetal:
     case lookGtk:
         {
@@ -1887,7 +1887,11 @@
                         mxbl, height() - borderY(),
                         width() - mxbl - mxbr, borderY());
 #endif
-
+#ifdef CONFIG_LOOK_WINXP
+            } else if (wmLook == lookMXP ) {
+                g.fillRect(0, 0, width(), height());
+                g.drawBorderWXP(0, 0, width(), height());
+#endif
             } else {
                 g.fillRect(1, 1, width() - 3, height() - 3);
                 g.drawBorderW(0, 0, width() - 1, height() - 1, true);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmprog.cc icewm-1.2.30.LXP/src/wmprog.cc
--- icewm-1.2.30/src/wmprog.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmprog.cc	2006-12-14 17:55:14.000000000 +0100
@@ -19,6 +19,7 @@
 #include "objbutton.h"
 #include "objbar.h"
 #include "prefs.h"
+#include "yprefs.h"
 #include "wmapp.h"
 #include "sysdep.h"
 #include "base.h"
@@ -135,8 +136,11 @@
         app->runProgram(fCmd, fArgs.getCArray());
 }
 
-DProgram *DProgram::newProgram(const char *name, YIcon *icon,
-                               const bool restart, const char *wmclass,
+DProgram *DProgram::newProgram(const char *name,  YIcon *
+#ifndef LITE //LXP FX
+icon
+#endif
+                               ,const bool restart, const char *wmclass,
                                const char *exe, YStringArray &args) {
     char *fullname(NULL);
 
@@ -148,7 +152,13 @@
     }
 
     DProgram *program =
-        new DProgram(name, icon, restart, wmclass, fullname, args);
+        new DProgram(name, 
+#ifndef LITE
+            icon && icon->getScaledIcon(menuIconSize)!=null?icon:Icon_Program, 
+#else	
+	    NULL,
+#endif
+	    restart, wmclass, fullname, args); //LXP SEE
 
     delete[] fullname;
     return program;
@@ -251,7 +261,8 @@
                 container->addSeparator();
             else if (!(strcmp(word, "prog") &&
                        strcmp(word, "restart") &&
-                       strcmp(word, "runonce")))
+                       strcmp(word, "runonce") 
+			))
             {
                 char *name;
 
@@ -322,7 +333,7 @@
                     if (sub->itemCount() == 0)
                         delete sub;
                     else
-                        container->addContainer(name, icon, sub);
+                        container->addContainer(_(name), icon, sub);
 
                 } else {
                     msg(_("Unexepected keyword: %s"), word);
@@ -354,7 +365,7 @@
                 ObjectMenu *filemenu = new MenuFileMenu(menufile, 0);
 
                 if (menufile)
-                    container->addContainer(name, icon, filemenu);
+                    container->addContainer(_(name), icon, filemenu);
                 delete[] name;
                 delete[] icons;
                 delete[] menufile;
@@ -388,7 +399,7 @@
                 if (fullPath) {
                     ObjectMenu *progmenu = new MenuProgMenu(name, command, args, 0);
                     if (progmenu)
-                        container->addContainer(name, icon, progmenu);
+                        container->addContainer(_(name), icon, progmenu); //LXP FIX
                     delete [] fullPath;
                 }
                 delete[] name;
@@ -431,7 +442,7 @@
                 if (fullPath) {
                     ObjectMenu *progmenu = new MenuProgReloadMenu(name, timeout, command, args, 0);
                     if (progmenu)
-                        container->addContainer(name, icon, progmenu);
+                        container->addContainer(_(name), icon, progmenu);
                     delete [] fullPath;
                 }
                 delete[] name;
@@ -694,7 +704,8 @@
     }
 }
 
-StartMenu::StartMenu(const char *name, YWindow *parent): MenuFileMenu(name, parent) {
+StartMenu::StartMenu(const char *name, int size, YWindow *parent): MenuFileMenu(name, parent) {
+    iconsSize = size; //LXP
     fHasGnomeAppsMenu =
         fHasGnomeUserMenu =
         fHasKDEMenu = false;
@@ -722,6 +733,10 @@
 }
 
 void StartMenu::refresh() {
+#ifdef CONFIG_LOOK_WINXP
+    int m = menuIconSize; 
+    //if (wmLook==lookMXP) menuIconSize=startmenuIconSize; //LXP
+#endif
     MenuFileMenu::refresh();
 
     if (itemCount())
@@ -733,7 +748,7 @@
     if (showPrograms) {
         ObjectMenu *programs = new MenuFileMenu("programs", 0);
         ///    if (programs->itemCount() > 0)
-        addSubmenu(_("Programs"), 0, programs);
+        addSubmenu(_("Programs"), 0, programs)_SetIcon(Icon_Folder);
     }
 #endif
 
@@ -773,9 +788,9 @@
     if (showRun) {
         if (runDlgCommand && runDlgCommand[0])
             addItem(_("_Run..."), -2, "", actionRun);
+        addSeparator(); //LXP FX
     }
 
-    addSeparator();
 
 #ifndef LITE
 #ifdef CONFIG_TASKBAR
@@ -802,14 +817,17 @@
     if (showThemesMenu) {
         YMenu *themes = new ThemesMenu();
         if (themes)
-            addSubmenu(_("_Themes"), -2, themes);
+            addSubmenu(_("_Themes"), -2, themes)_SetIcon(Icon_Theme);
     }
 
     if (logoutMenu) {
         if (showLogoutSubMenu)
             addItem(_("_Logout..."), -2, actionLogout, logoutMenu);
         else
-            addItem(_("_Logout..."), -2, "", actionLogout);
+            addItem(_("_Logout..."), -2, "", actionLogout)_SetIcon(Icon_Logout);
     }
+#ifdef CONFIG_LOOK_WINXP
+    menuIconSize = m; //LXP
+#endif
 }
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmtaskbar.cc icewm-1.2.30.LXP/src/wmtaskbar.cc
--- icewm-1.2.30/src/wmtaskbar.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmtaskbar.cc	2006-12-18 14:10:38.000000000 +0100
@@ -51,13 +51,30 @@
 
 TaskBar *taskBar = 0;
 
-static YColor *taskBarBg = 0;
+YColor *taskBarBg = 0;
+YColor *trayBarBg = 0;
 
 static ref<YIconImage> icewmImage;
 static ref<YIconImage> windowsImage;
 static ref<YIconImage> showDesktopImage;
+static ref<YIconImage> hideTaskbarImage; //LXP
+static ref<YIconImage> showTaskbarImage; //LXP
 #warning "these should be static/elsewhere"
 ref<YPixmap> taskbackPixmap;
+ref<YPixmap> traybackPixmap; //LXP
+#ifdef CONFIG_LOOK_WINXP
+ref<YPixmap> tasktrayseparatorPixmap; //LXP
+int tray_size=0; //LXP
+int sep_size=0; //LXP
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+static ref<YPixmap> icewmImageA; //LXP
+static ref<YPixmap> icewmImageO; //LXP
+static ref<YPixmap> icewmImageI; //LXP
+static ref<YPixmap> windowsPixmapA; //LXP
+static ref<YPixmap> windowsPixmapO; //LXP
+static ref<YPixmap> windowsPixmapI; //LXP
+#endif
 #ifdef CONFIG_GRADIENTS
 ref<YPixbuf> taskbackPixbuf;
 ref<YPixbuf> taskbuttonPixbuf;
@@ -88,9 +105,16 @@
     if ((icewmImage = themedirs.loadImage(base, ICEWM_PIXMAP)) == null &&
         (icewmImage = themedirs.loadImage(base, START_PIXMAP)) == null)
         icewmImage = subdirs.loadImage(base, ICEWM_PIXMAP);
+#ifdef OVER_BUTTON_PIXMAPS
+    icewmImageI = subdirs.loadPixmap(base, "icewmbgI.xpm"); //LXP
+    icewmImageO = subdirs.loadPixmap(base, "icewmbgO.xpm"); //LXP
+    icewmImageA = subdirs.loadPixmap(base, "icewmbgA.xpm"); //LXP
+#endif
 
     windowsImage = subdirs.loadImage(base, "windows.xpm");
     showDesktopImage = subdirs.loadImage(base, "desktop.xpm");
+    hideTaskbarImage = subdirs.loadImage(base, "taskb_hide.xpm"); //LXP
+    showTaskbarImage = subdirs.loadImage(base, "taskb_show.xpm"); //LXP
 
 #ifdef CONFIG_GRADIENTS
     if (taskbackPixbuf == null)
@@ -108,6 +132,24 @@
     taskbuttonminimizedPixmap = subdirs.loadPixmap(base, "taskbuttonminimized.xpm");
 #endif
 
+#ifdef CONFIG_LOOK_WINXP
+    traybackPixmap = subdirs.loadPixmap(base, "traybarbg.xpm"); //LXP
+    if (traybackPixmap==null) traybackPixmap= subdirs.loadPixmap(base, "taskbarbg.xpm");
+    tasktrayseparatorPixmap = subdirs.loadPixmap(base, "tasktraysep.xpm"); //LXP
+#else
+    traybackPixmap=taskbackPixmap;
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+    taskbuttonOverPixmap = subdirs.loadPixmap(base, "taskbuttonbgO.xpm"); // LXP
+    taskbuttonactiveOverPixmap = subdirs.loadPixmap(base, "taskbuttonactiveO.xpm");  // LXP
+    taskbuttonminimizedOverPixmap = subdirs.loadPixmap(base, "taskbuttonminimizedO.xpm"); // LXP
+    taskbuttonpressedPixmap = subdirs.loadPixmap(base, "taskbuttonpressed.xpm"); // LXP
+    taskbuttonflashingPixmap = subdirs.loadPixmap(base, "taskbuttonflashing.xpm"); // LXP
+    windowsPixmapA = subdirs.loadPixmap(base, "windowsbuttonA.xpm"); // LXP
+    windowsPixmapO = subdirs.loadPixmap(base, "windowsbuttonO.xpm"); // LXP
+    windowsPixmapI = subdirs.loadPixmap(base, "windowsbuttonI.xpm"); // LXP
+#endif
+
 #ifdef CONFIG_APPLET_MAILBOX
     base = "mailbox/";
     subdirs.init(paths, base);
@@ -159,7 +201,8 @@
     fShowDesktop = 0;
 
     if (taskBarBg == 0) {
-        taskBarBg = new YColor(clrDefaultTaskBar);
+        trayBarBg = new YColor(clrDefaultTaskBar); 
+        taskBarBg = wmLook==lookMXP ?new YColor(clrTaskBar) :trayBarBg;
     }
 
     ///setToplevel(true);
@@ -308,8 +351,7 @@
 }
 
 void TaskBar::initMenu() {
-    taskBarMenu = new YMenu();
-    if (taskBarMenu) {
+    if (!disableTaskBarMenu && (taskBarMenu=new YMenu()) ) {
         taskBarMenu->setActionListener(this);
         taskBarMenu->addItem(_("Tile _Vertically"), -2, KEY_NAME(gKeySysTileVertical), actionTileVertical);
         taskBarMenu->addItem(_("T_ile Horizontally"), -2, KEY_NAME(gKeySysTileHorizontal), actionTileHorizontal);
@@ -396,7 +438,16 @@
         fCollapseButton = new YButton(this, actionCollapseTaskbar);
         if (fCollapseButton) {
             fCollapseButton->setText(">");
+	    fCollapseButton->setImage(hideTaskbarImage);  //LXP
+	    fCollapseButton->setToolTip(_("Hide taskbar")); //LXP
+	    fCollapseButton->setColors(trayBarBg, NULL, NULL); //LXP
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+            fCollapseButton->setBackPixmap(traybackPixmap);
+	    fCollapseButton->setPixmaps(null,null,null);
+#endif
             fCollapseButton->setActionListener(this);
+	    if (hideTaskbarImage!=null)
+		fCollapseButton->setSize(hideTaskbarImage->width(),hideTaskbarImage->height());
         }
     } else
         fCollapseButton = 0;
@@ -440,8 +491,28 @@
     if (taskBarShowStartMenu) {
         fApplications = new ObjectButton(this, rootMenu);
         fApplications->setActionListener(this);
+	fApplications->setText(_("Icewm")); //LXP
         fApplications->setImage(icewmImage);
         fApplications->setToolTip(_("Favorite applications"));
+#ifdef CONFIG_LOOK_WINXP
+        if (wmLook==lookMXP)
+	    fApplications->setColors(taskBarBg, YButton::activeButtonBg->greener(), YButton::normalButtonBg->greener());
+	else
+#endif
+        fApplications->setColors(taskBarBg, YButton::activeButtonBg, YButton::normalButtonBg);
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+        fApplications->setBackPixmap(taskbackPixmap);
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+	fApplications->setPixmaps(icewmImageI,icewmImageO,icewmImageA); //LXP
+#endif
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP && icewmImage!=null)
+		fApplications->setSize(icewmImage->width(), fApplications->height());
+	//if (wmLook==lookMXP) LXP FIX
+	   //fApplications->setSize(104, max(fApplications->height(),25));
+	   //fApplications->setSize(fApplications->width(), max(fApplications->height(),25));
+#endif
     } else
         fApplications = 0;
 
@@ -453,13 +524,31 @@
             delete [] t;
         }
     }
+#ifdef CONFIG_LOOK_WINXP
+    fRightBar = new ObjectBar(this);
+    if (fRightBar) {
+        char *t = app->findConfigFile("rightbar");
+        if (t) {
+            loadMenus(t, fRightBar);
+            delete [] t;
+        }
+    }
+#endif
 #endif
 #ifdef CONFIG_WINMENU
     if (taskBarShowWindowListMenu) {
         fWinList = new ObjectButton(this, windowListMenu);
+	fWinList->setText("W"); //LXP
         fWinList->setImage(windowsImage);
         fWinList->setActionListener(this);
         fWinList->setToolTip(_("Window list menu"));
+	fWinList->setColors(taskBarBg, YButton::activeButtonBg, NULL); //NULL LXP FIX
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+        fWinList->setBackPixmap(taskbackPixmap);
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+	fWinList->setPixmaps(windowsPixmapI,windowsPixmapO,windowsPixmapA); //LXP
+#endif
     } else
         fWinList = 0;
 #endif
@@ -469,8 +558,15 @@
         fShowDesktop->setImage(showDesktopImage);
         fShowDesktop->setActionListener(wmapp);
         fShowDesktop->setToolTip(_("Show Desktop"));
+	fShowDesktop->setColors(taskBarBg, YButton::activeButtonBg, NULL); //NULL LXP FIX
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+        fShowDesktop->setBackPixmap(taskbackPixmap);
+#endif
+#ifdef OVER_BUTTON_PIXMAPS
+	fShowDesktop->setPixmaps(toolbuttonPixmap,toolbuttonPixmapO,toolbuttonPixmapA); //LXP
+#endif
     }
-    if (taskBarShowWorkspaces && workspaceCount > 0) {
+    if (taskBarShowWorkspaces && workspaceCount > 1) { //LXP o
         fWorkspaces = new WorkspacesPane(this);
     } else
         fWorkspaces = 0;
@@ -509,18 +605,18 @@
         bool expand;
     } *wl, wlist[] = {
 #ifndef NO_CONFIGURE_MENUS
-        { fApplications, true, 1, true, 0, 0, true },
+        { fApplications, true, 1, true, 0, 0, (wmLook==lookMXP?true:true) }, //LXP FIX
 #endif
-        { fShowDesktop, true, 0, true, 0, 0, true },
+        { fShowDesktop, true, 0, true, 0, 0, (wmLook==lookMXP?false:true) },
 #ifdef CONFIG_WINMENU
-        { fWinList, true, 0, true, 0, 0, true},
+        { fWinList, true, 0, true, 0, 0, (wmLook==lookMXP?false:true)},
 #endif
 #ifndef NO_CONFIGURE_MENUS
-        { fObjectBar, true, 1, true, 4, 0, true },
+        { fObjectBar, true, 1, true, 4, 0, (wmLook==lookMXP?false:true) },
 #endif
-        { fWorkspaces, taskBarWorkspacesLeft, 0, true, 4, 4, true },
+        { fWorkspaces, taskBarWorkspacesLeft, 0, true, 4, 4, (wmLook==lookMXP?false:true) },
 
-        { fCollapseButton, false, 0, true, 0, 2, true },
+        { fCollapseButton, false, 0, true, 0, 2, (wmLook==lookMXP?false:true) },
 #ifdef CONFIG_APPLET_CLOCK
         { fClock, false, 1, true, 2, 2, false },
 #endif
@@ -546,14 +642,57 @@
 #endif
         { fTray2, false, 1, true, 1, 1, false },
 #ifdef CONFIG_TRAY
-        { fTray, false, 0, true, 1, 1, true },
+        { fTray, false, 0, true, 1, 1, (wmLook==lookMXP?false:true) },
+#endif
+
+#if 0
+#ifndef NO_CONFIGURE_MENUS
+        { fApplications, true, 1, true, 0, 0, (wmLook==lookMXP?false:true) }, //LXP
+#endif
+        { fShowDesktop, true, 1, true, 0, 0, (wmLook==lookMXP?false:true) }, //LXP
+#ifndef NO_CONFIGURE_MENUS
+        { fObjectBar, true, 1, true, 0, 0, (wmLook==lookMXP?false:true) }, //LXP
+#endif
+        { fWorkspaces, taskBarWorkspacesLeft, 1, true, 4, 4, (wmLook==lookMXP?false:true) }, //LXP
+#ifdef CONFIG_WINMENU
+        { fWinList, true, 1, true, 0, 0, (wmLook==lookMXP?false:true)}, //LXP
+#endif
+
+        { fCollapseButton, false, 0, true, 0, 2, (wmLook==lookMXP?false:true) }, //LXP
+#ifdef CONFIG_APPLET_CLOCK
+        { fClock, false, 1, true, 2, 2, false },
+#endif
+#ifdef CONFIG_APPLET_MAILBOX
+        { fMailBoxStatus ? fMailBoxStatus[0] : 0, false, 1, true, 1, 1, false },
+#warning "a hack"
+        { fMailBoxStatus && fMailBoxStatus[0] ? fMailBoxStatus[1] : 0, false, 1, true, 1, 1, false },
+        { fMailBoxStatus && fMailBoxStatus[0] && fMailBoxStatus[1] ? fMailBoxStatus[2] : 0, false, 1, true, 1, 1, false },
+#endif
+#ifdef CONFIG_APPLET_CPU_STATUS
+        { fCPUStatus, false, 0, true, 2, 2, false },
+#endif
+#ifdef CONFIG_APPLET_NET_STATUS
+#ifdef CONFIG_APPLET_MAILBOX
+        { fNetStatus ? fNetStatus[0] : 0, false, 0, true, 1, 1, false },
+#warning "a hack"
+        { fNetStatus && fNetStatus[0] ? fNetStatus[1] : 0, false, 0, true, 1, 1, false },
+        { fNetStatus && fNetStatus[0] && fNetStatus[1] ? fNetStatus[2] : 0, false, 0, true, 1, 1, false },
+#endif
+#endif
+#ifdef CONFIG_APPLET_APM
+        { fApm, false,0 , true, 0, 0, false }, //LXP
+#endif
+        { fTray2, false, 0, true, 1, 1, false },
+#ifdef CONFIG_TRAY
+        { fTray, false, 1, true, 0, 0, (wmLook==lookMXP?false:true) },  //LXP
+#endif
 #endif
     };
     const int wcount = sizeof(wlist)/sizeof(wlist[0]);
 
     int w = 0;
     int y[2] = { 0, 0 };
-    int h[2] = { 0, 0 };
+    int h[2] = {  taskBarHeight ? taskBarHeight : (wmLook==lookMXP?30:0), 0 }; //LXP NEW
     int left[2] = { 0, 0 };
     int right[2] = { 0, 0 };
     int i;
@@ -570,13 +709,35 @@
             h[wl->row] = wl->w->height();
     }
 
+#ifdef CONFIG_LOOK_WINXP
+    if (taskBarDoubleHeight && wmLook==lookMXP) { //LXP
+        h[0]=h[1]=max(h[0],h[1]);//LXP
+ #ifdef CONFIG_IMLIB
+        if (taskbackPixmap!=null && taskbackPixmap->height()<h[0]+h[1])
+            taskbackPixmap->scaleImage(taskbackPixmap->pixmap(), taskbackPixmap->mask(),
+               0, 0, taskbackPixmap->width(), taskbackPixmap->height(),
+               taskbackPixmap->width(),
+               h[0]+h[1]);
+        if (traybackPixmap!=null && traybackPixmap->height()<h[0]+h[1])
+            traybackPixmap->scaleImage(traybackPixmap->pixmap(), traybackPixmap->mask(),
+               0, 0, traybackPixmap->width(), traybackPixmap->height(),
+               traybackPixmap->width(),
+               h[0]+h[1]);
+        if (tasktrayseparatorPixmap!=null && tasktrayseparatorPixmap->height()<h[0]+h[1])
+            tasktrayseparatorPixmap->scaleImage(tasktrayseparatorPixmap->pixmap(), tasktrayseparatorPixmap->mask(),
+               0, 0, tasktrayseparatorPixmap->width(), tasktrayseparatorPixmap->height(),
+               tasktrayseparatorPixmap->width(),
+               h[0]+h[1]);
+ #endif
+    }
+#endif
     {
         int dx, dy, dw, dh;
         manager->getScreenGeometry(&dx, &dy, &dw, &dh);
         w = dw;
     }
 
-    if (taskBarAtTop) { // !!! for now
+    if (wmLook!=lookMXP && taskBarAtTop) { // !!! for now
         y[1] = 0;
         y[0] = h[1] + y[1];
 #if 0
@@ -586,7 +747,7 @@
         y[1] = h[0] + y[0];
 #endif
     } else {
-        y[1] = 1;
+        y[1] = (wmLook==lookMXP?(traybackPixmap==null?2:0):1);
         y[0] = h[1] + y[1];
     }
 
@@ -607,8 +768,8 @@
         if (wl->expand) {
             yy = y[wl->row];
         } else {
-            hh = wl->w->height();
-            yy = y[wl->row] + (h[wl->row] - wl->w->height()) / 2;
+            hh = taskButtonHeight ? taskButtonHeight: wl->w->height();
+            yy = y[wl->row] + ( hh < h[wl->row] ? (1 + (h[wl->row] - hh)/2) : 0 ); //LXP
         }
 
         if (wl->left) {
@@ -627,13 +788,40 @@
     }
 
     /* ----------------------------------------------------------------- */
+    int mr=min(right[0],right[1]);//LXP FIX SEE
+    int mrr=mr;
+#ifndef NO_CONFIGURE_MENUS
+ #ifdef CONFIG_LOOK_WINXP
+    tray_size=width()-mr; //LXP
+    mr -= tasktrayseparatorPixmap!=null?tasktrayseparatorPixmap->width():4; //LXP
+    if (fRightBar) {
+	    int row = taskBarDoubleHeight ? 1 : 0;
+        int yy = y[row];
+	    int ww = fRightBar->width();
+        int hh = h[row];
+        if (wmLook==lookMXP) {
+            hh = taskButtonHeight ? taskButtonHeight: fRightBar->height();
+            yy = y[row] + ( hh < h[row] ? (1 + (h[row] - hh)/2) : 0 );
+        } 
+            
+	    int xx = mr - ww - 2;
+	    fRightBar->setGeometry(YRect(xx,yy,ww,hh));
+	    mr= taskBarDoubleHeight ? mr : xx - 1;
+	    mrr= xx - 1;
+	    fRightBar->show();
+    }
+ #endif
+#endif
 
     if (taskBarShowWindows) {
         if (fTasks) {
-            fTasks->setGeometry(YRect(left[0],
-                                      y[0],
-                                      right[0] - left[0],
-                                      h[0]));
+            int hh= taskButtonHeight ? taskButtonHeight : fTasks->height();  //LXP NEW
+            int yy= hh>4 && hh<h[0] ? y[0]+1+(h[0]-hh)/2 : y[0]; //LXP
+                hh= hh>4 && hh<h[0] ? hh: h[0]; //LXP
+            fTasks->setGeometry(YRect(left[0], //LXP
+                                      yy, //LXP
+                                      mr-left[0],//LXP
+                                      hh)); //LXP
             fTasks->show();
             fTasks->relayout();
         }
@@ -641,11 +829,13 @@
 #ifdef CONFIG_ADDRESSBAR
     if (fAddressBar) {
         int row = taskBarDoubleHeight ? 1 : 0;
-
-        fAddressBar->setGeometry(YRect(left[row],
-                                       y[row] + 2,
-                                       right[row] - left[row],
-                                       h[row] - 4));
+        int xx(left[row]), yy(2); //LXP
+        int ww(mrr-xx), hh(h[row] - (yy*2));
+        if (wmLook==lookMXP) {
+		yy+=8; xx +=6; ww -=12; hh -= 8;
+	}
+        fAddressBar->setGeometry(YRect(xx, yy, ww, hh));
+	fAddressBar->setToolTip(_("Run Command")); //LXP
         fAddressBar->raise();
         if (showAddressBar) {
             if (taskBarDoubleHeight || !taskBarShowWindows)
@@ -655,21 +845,23 @@
 #endif
 
     size_w = w;
-    size_h = h[0] + h[1] + 1;
+    size_h = h[0] + h[1] + y[1];
 }
 
 void TaskBar::relayoutNow() {
-#ifdef CONFIG_TRAY
-    if (taskBar && taskBar->trayPane())
-        taskBar->trayPane()->relayoutNow();
-#endif
     if (fNeedRelayout) {
 
         updateLocation();
         fNeedRelayout = false;
     }
-    if (taskBar->taskPane())
-        taskBar->taskPane()->relayoutNow();
+    if  ( 
+          (
+	   (taskBar->taskPane() && taskBar->taskPane()->relayoutNow())
+#ifdef CONFIG_TRAY
+	   || (taskBar->trayPane() && taskBar->trayPane()->relayoutNow())
+#endif
+          ) && wmLook==lookMXP ) 
+	repaint(); //to recalculate traybackground size
 }
 
 void TaskBar::updateLocation() {
@@ -809,7 +1001,7 @@
     }
 #endif
 
-    g.setColor(taskBarBg);
+    g.setColor(taskBarBg); //LXP SEE
     //g.draw3DRect(0, 0, width() - 1, height() - 1, true);
 
 #ifdef CONFIG_GRADIENTS
@@ -817,11 +1009,36 @@
         g.copyPixbuf(*fGradient, 0, 0, width(), height(), 0, 0);
     else
 #endif
-        if (taskbackPixmap != null)
+        if (taskbackPixmap != null) {
             g.fillPixmap(taskbackPixmap, 0, 0, width(), height());
-        else {
-            int y = taskBarAtTop ? 0 : 1;
-            g.fillRect(0, y, width(), height() - 1);
+#ifdef CONFIG_LOOK_WINXP
+	    g.fillPixmap(traybackPixmap, width()-tray_size, 0, tray_size,height()); //LXP
+            if (tasktrayseparatorPixmap!=null)
+		g.fillPixmap(tasktrayseparatorPixmap, width()-tray_size-tasktrayseparatorPixmap->width(), 0,
+							tasktrayseparatorPixmap->width(),height());
+#endif
+        } else {
+            int y = taskBarAtTop ? 0 : 1; //LXP SEE AND FIX
+            g.fillRect(0, y, width(), height() - 1); //LXP draw entire taskbarBG
+#ifdef CONFIG_LOOK_WINXP
+	    if (wmLook == lookMXP) {
+		YColor *b=g.color();
+		g.setColor(trayBarBg);
+		g.fillRect(width()-tray_size-1, y , tray_size+1, height()-1); //LXP draw traybarBG
+		//g.drawBorderW(width()-tray_size-4,0,2,height(),false); //LXP draw separator
+		g.setColor(b);
+		g.drawTopBorderWXP(0,0,width());
+		g.setColor(b->darker());
+		g.drawLine(0,height()-2,width(),height()-2);
+		g.drawLine(width()-tray_size-4,3,width()-tray_size-4,height()-2);
+		g.setColor(YColor::black);
+		g.drawLine(0,height()-1,width(),height()-1);
+		g.drawLine(width()-tray_size-3,2,width()-tray_size-3,height()-2);
+		g.setColor(taskBarBg->brighter());
+		g.drawLine(width()-tray_size-2,3,width()-tray_size-2,height()-2);
+		g.setColor(b);
+	    } else 
+#endif
             if (!taskBarAtTop) {
                 y++;
                 g.setColor(taskBarBg->brighter());
@@ -831,6 +1048,10 @@
                 g.drawLine(0, height() - 1, width(), height() - 1);
             }
         }
+#ifdef CONFIG_LOOK_WINXP
+        if (wmLook == lookMXP && fAddressBar && showAddressBar && (taskBarDoubleHeight || !taskBarShowWindows) )
+	    g.drawBorderXP(fAddressBar->x()-3,fAddressBar->y()-3,fAddressBar->width()+6,fAddressBar->height()+6);
+#endif
 }
 
 bool TaskBar::handleKey(const XKeyEvent &key) {
@@ -860,6 +1081,8 @@
 }
 
 void TaskBar::contextMenu(int x_root, int y_root) {
+    if (disableTaskBarMenu) 
+	return;
     taskBarMenu->popup(this, 0, 0, x_root, y_root,
                        YPopupWindow::pfCanFlipVertical |
                        YPopupWindow::pfCanFlipHorizontal);
@@ -877,10 +1100,20 @@
     }
 }
 
+#ifdef CONFIG_LOOK_WINXP
+void TaskBar::handleEndDrag(const XButtonEvent &/*down*/, const XButtonEvent &/*up*/) {
+    xapp->releaseEvents();
+}
+#endif
 void TaskBar::handleDrag(const XButtonEvent &/*down*/, const XMotionEvent &motion) {
 #ifndef NO_CONFIGURE
     int newPosition = 0;
 
+    xapp->grabEvents(this, YXApplication::movePointer.handle(),
+                         ButtonPressMask |
+                         ButtonReleaseMask |
+                         PointerMotionMask); //LXP
+
     if (motion.y_root < int(desktop->height() / 2))
         newPosition = 1;
 
@@ -889,7 +1122,8 @@
         //setPosition(x(), taskBarAtTop ? -1 : int(manager->height() - height() + 1));
         manager->setWorkAreaMoveWindows(true);
         updateLocation();
-        repaint();
+        relayout(); //LXP
+        showBar(true); //LXP
         //manager->updateWorkArea();
         manager->setWorkAreaMoveWindows(false);
     }
@@ -963,6 +1197,8 @@
     fIsCollapsed = !fIsCollapsed;
     fCollapseButton->setText(fIsCollapsed ? "<": ">");
 
+    fCollapseButton->setImage(fIsCollapsed ? showTaskbarImage: hideTaskbarImage); //LXP
+    fCollapseButton->setToolTip(fIsCollapsed ?_("Show taskbar"):_("Hide taskbar"));//LXP
     relayout();
     showBar(true);
 }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmtitle.cc icewm-1.2.30.LXP/src/wmtitle.cc
--- icewm-1.2.30/src/wmtitle.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmtitle.cc	2006-12-14 17:55:14.000000000 +0100
@@ -163,7 +163,7 @@
         getFrame()->menuButton()->repaint();
 #endif
 #ifdef CONFIG_LOOK_PIXMAP
-    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookGtk) {
+    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookMXP || wmLook == lookGtk) { //LXP 
         if (getFrame()->menuButton()) getFrame()->menuButton()->repaint();
         if (getFrame()->closeButton()) getFrame()->closeButton()->repaint();
         if (getFrame()->maximizeButton()) getFrame()->maximizeButton()->repaint();
@@ -273,7 +273,7 @@
 #endif
 #ifdef CONFIG_LOOK_PIXMAP
     case lookPixmap:
-    case lookMetal:
+    case lookMetal: case lookMXP: //LXP
     case lookGtk: {
         int const pi(getFrame()->focused() ? 1 : 0);
 
@@ -383,7 +383,7 @@
 #ifdef CONFIG_SHAPED_DECORATION
 void YFrameTitleBar::renderShape(Pixmap shape) {
 #ifdef CONFIG_LOOK_PIXMAP
-    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookGtk) {
+    if (wmLook == lookPixmap || wmLook == lookMetal || wmLook == lookMXP || wmLook == lookGtk) { //LXP FIX SEE
         Graphics g(shape, getFrame()->width(), getFrame()->height());
 
         int onLeft(0);
@@ -397,6 +397,9 @@
 
                     ref<YPixmap> pixmap = b->getImage(0);
                     if (pixmap != null) {
+#ifdef CONFIG_LOOK_WINXP
+			if (b->getImage(1)!=null)
+#endif
                         g.copyDrawable(pixmap->mask(), 0, 0,
                                        b->width(),
                                        b->height(),
@@ -414,6 +417,9 @@
 
                     ref<YPixmap> pixmap = b->getImage(0);
                     if (pixmap != null) {
+#ifdef CONFIG_LOOK_WINXP
+			if (b->getImage(1)!=null)
+#endif
                         g.copyDrawable(pixmap->mask(), 0, 0,
                                        b->width(),
                                        b->height(),
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/wmwinlist.cc icewm-1.2.30.LXP/src/wmwinlist.cc
--- icewm-1.2.30/src/wmwinlist.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/wmwinlist.cc	2006-12-14 17:55:14.000000000 +0100
@@ -59,7 +59,7 @@
         if (fWorkspace < 0 || fWorkspace >= workspaceCount)
             return _("All Workspaces");
         else
-            return workspaceNames[fWorkspace];
+	    return strJoin(_("Workspace: "),workspaceNames[fWorkspace],NULL); //LXP FX
 }
 
 YIcon *WindowListItem::getIcon() {
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yapp.cc icewm-1.2.30.LXP/src/yapp.cc
--- icewm-1.2.30/src/yapp.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/yapp.cc	2006-12-14 17:55:14.000000000 +0100
@@ -250,7 +250,7 @@
             if (signalPipe[0] != -1)
                 FD_SET(signalPipe[0], &read_fds);
 
-#warning "make this more general"
+/// TODO #warning "make this more general"
             int IceSMfd = readFdCheckSM();
             if (IceSMfd != -1)
                 FD_SET(IceSMfd, &read_fds);
@@ -449,7 +449,7 @@
 }
 
 void YApplication::runCommand(const char *cmdline) {
-#warning calling /bin/sh is considered to be bloat
+/// TODO #warning calling /bin/sh is considered to be bloat
     char const * argv[] = { "/bin/sh", "-c", cmdline, NULL };
     runProgram(argv[0], argv);
 }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ybutton.cc icewm-1.2.30.LXP/src/ybutton.cc
--- icewm-1.2.30/src/ybutton.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ybutton.cc	2006-12-14 17:55:14.000000000 +0100
@@ -34,6 +34,13 @@
 ref<YPixmap> taskbuttonPixmap;
 ref<YPixmap> taskbuttonactivePixmap;
 ref<YPixmap> taskbuttonminimizedPixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+ref<YPixmap> taskbuttonOverPixmap; //LXP
+ref<YPixmap> taskbuttonactiveOverPixmap; //LXP
+ref<YPixmap> taskbuttonminimizedOverPixmap; //LXP
+ref<YPixmap> taskbuttonpressedPixmap; //LXP
+ref<YPixmap> taskbuttonflashingPixmap; //LXP
+#endif
 
 YButton::YButton(YWindow *parent, YAction *action, YMenu *popup) :
     YWindow(parent),
@@ -50,14 +57,18 @@
         normalButtonFont = YFont::getFont(XFA(normalButtonFontName));
     if (activeButtonFont == null)
         activeButtonFont = YFont::getFont(XFA(activeButtonFontName));
-    if (normalButtonBg == 0)
-        normalButtonBg = new YColor(clrNormalButton);
+
+
+    //if (normalButtonBg == 0)
+        //normalButtonBg = new YColor(clrNormalButton);
     if (normalButtonFg == 0)
         normalButtonFg = new YColor(clrNormalButtonText);
-    if (activeButtonBg == 0)
-        activeButtonBg = new YColor(clrActiveButton);
+    //if (activeButtonBg == 0)
+        //activeButtonBg = new YColor(clrActiveButton);
     if (activeButtonFg == 0)
         activeButtonFg = new YColor(clrActiveButtonText);
+    colorI=normalButtonBg; colorA=activeButtonBg; colorB=0;
+    PixmapB = null;PixmapI = buttonIPixmap; PixmapA = buttonAPixmap;PixmapO = buttonOPixmap;
 }
 
 YButton::~YButton() {
@@ -72,8 +83,6 @@
 
 void YButton::paint(Graphics &g, int const d, const YRect &r) {
     int x = r.x(), y = r.y(), w = r.width(), h = r.height();
-    YSurface surface(getSurface());
-    g.drawSurface(surface, x, y, w, h);
 
     if (fImage != null)
         g.drawImage(fImage, x + (w - fImage->width()) / 2,
@@ -100,7 +109,15 @@
 
     if (w > 1 && h > 1) {
         YSurface surface(getSurface());
-        g.setColor(surface.color);
+#ifdef CONFIG_LOOK_WINXP
+	if (wmLook==lookMXP) {
+            int yy=this->y()?this->y(): (parent()->y()<400?parent()->y():0); //LXP SEE
+            g.drawSurface(surface, x, y, w, h,0,yy,w,h);
+        } else
+#endif
+        g.drawSurface(surface, x, y, w, h);
+
+        if (surface.color) g.setColor(surface.color);
 
         if (wmLook == lookMetal) {
             g.drawBorderM(x, y, w - 1, h - 1, !d);
@@ -108,6 +125,26 @@
         } else if (wmLook == lookGtk) {
             g.drawBorderG(x, y, w - 1, h - 1, !d);
             x += 1 + d; y += 1 + d; w -= 3; h -= 3;
+#ifdef CONFIG_LOOK_WINXP
+        } else if (wmLook==lookMXP) { // LXP SEE this logic
+            //if ( surface.pixmap==null && surface.pixmapBg==null &&
+                //( fImage==null || surface.color!=colorB  ) )
+//fprintf(stderr,"%s: colorB %d, color %d, colorBg %d, pixmap %d, pixmapBg %d, gradient %d, fImage: %d\n",
+//fText,
+//colorB==0?0:1,
+//surface.color==0?0:1,
+//surface.colorBg==0?0:1,
+//surface.pixmap==null?0:1,
+//surface.pixmapBg==null?0:1,
+//surface.gradient==null?0:1,
+//fImage==null?0:1);
+            if ( 
+		 (fImage==null && colorA && colorI && colorB ) ||
+                 (surface.color!=colorB &&  surface.pixmap==null )
+               )
+                g.drawBorderXP(0,0,width(),height());
+            x += 2; y += 2; w -= 4; h -= 4;
+#endif
         } else {
             g.drawBorderW(x, y, w - 1, h - 1, !d);
             x += 1 + d; y += 1 + d; w -= 3; h -= 3;
@@ -130,7 +167,7 @@
         g.drawRect(dp, dp, width() - ds - 1, height() - ds - 1);
         g.setFunction(GXcopy);
         g.setPenStyle(false);
-    } else {
+    } else if (wmLook != lookMXP) { //LXP
         XRectangle focus[] = {
             { dp, dp, width() - ds, 1 },
             { dp, dp + 1, 1, height() - ds - 2 },
@@ -296,8 +333,14 @@
     fImage = image;
 
     if (image != null)
+#ifdef CONFIG_LOOK_WINXP
+        if (wmLook==lookMXP) setSize(image->width()+2,max(image->height(),24) ); //LXP
+        else 
+#endif
         setSize(image->width() + 3 + 2 - ((wmLook == lookMetal) ? 1 : 0),
                 image->height() + 3 + 2 - ((wmLook == lookMetal) ? 1 : 0));
+    else
+	setSize(max(width(),16) ,max(height(),16) ); //LXP FX
 }
 
 void YButton::setText(const char *str, int hotChar) {
@@ -331,7 +374,7 @@
                 installAccelerator(hotKey, xapp->AltMask, this);
         }
 
-        setSize(3 + w + 4 + 2, 3 + h + 4 + 2);
+        setSize( max(width(),3 + w + 4 + 2), max(height(),3 + h + 4 + 2) );
     } else
         hotKey = -1;
 }
@@ -404,12 +447,65 @@
     return (fPressed ? activeButtonFg : normalButtonFg);
 }
 
+#if defined(CONFIG_LOOK_WINXP) || defined(OVER_BUTTON_PIXMAPS)
+void YButton::setBackPixmap(ref<YPixmap> B) {
+   PixmapB = B;
+}
+#endif
+
+#ifdef OVER_BUTTON_PIXMAPS
+void YButton::setPixmaps(ref<YPixmap> I, ref<YPixmap> O, ref<YPixmap> A) { //LXP
+   PixmapI = I; PixmapO = O; PixmapA = A; //LXP
+   if (wmLook==lookMXP) {
+       if (A==null)
+	   setSize(width(),25);
+       else 
+	   setSize(max(A->width(),width()), max(A->height(),height()));
+   }
+}
+#endif
+void YButton::setColors(YColor *Default, YColor *Active, YColor *Normal) {
+    colorB=Default;
+    colorA=Active;
+    colorI=Normal;
+}
+/*
+YSurface YButton::getSurface() {
+    YColor *color= (fPressed || isFocused() || fArmed) ? activeButtonBg : normalButtonBg;
+#ifdef CONFIG_LOOK_WINXP //LXP SEE FIX
+    if (wmLook==lookMXP && fText && *fText && !strcmp(_("Icewm"),fText) ) {
+       if (PixmapA!=null && PixmapO!=null && PixmapI!=null)
+	  color=normalButtonBg;
+       else
+          color=(fOver && rolloverTitleButtons) ? color->greener()->darker()->brighter()->brighter(): color->greener();
+    } else 
+       color=(fOver && rolloverTitleButtons) ? color->darker()->brighter()->brighter(): color;
+#endif
+#ifdef CONFIG_GRADIENTS
+    if (fPressed || isFocused() || fArmed) return YSurface(color, PixmapA, buttonAPixbuf); //LXP
+    else if (fOver && rolloverTitleButtons) return YSurface(color, PixmapO, buttonIPixbuf); //LXP
+    else return YSurface(color, PixmapI, buttonIPixbuf); //LXP
+#else
+    if (fPressed || isFocused() || fArmed) return YSurface(color,PixmapA); //LXP
+    else if (fOver && rolloverTitleButtons) return YSurface(color, PixmapO); //LXP
+    else return YSurface(color, PixmapI); //LXP
+#endif
+}
+*/
+
 YSurface YButton::getSurface() {
+    YColor *color= (fPressed || isFocused() || fArmed) ? colorA : colorI;
+    if (!color) color=colorB;
+#ifdef CONFIG_LOOK_WINXP //LXP SEE FIX
+    color=(color && fOver && rolloverTitleButtons) ? color->darker()->brighter()->brighter(): color;
+#endif
 #ifdef CONFIG_GRADIENTS
-    return (fPressed ? YSurface(activeButtonBg, buttonAPixmap, buttonAPixbuf)
-                     : YSurface(normalButtonBg, buttonIPixmap, buttonIPixbuf));
+    if (fPressed || isFocused() || fArmed) return YSurface(color, colorB, PixmapA, PixmapB, buttonAPixbuf); //LXP
+    else if (fOver && rolloverTitleButtons) return YSurface(color, colorB, PixmapO, PixmapB, buttonIPixbuf); //LXP
+    else return YSurface(color, colorB, PixmapI, PixmapB, buttonIPixbuf); //LXP
 #else
-    return (fPressed ? YSurface(activeButtonBg, buttonAPixmap)
-                     : YSurface(normalButtonBg, buttonIPixmap));
+    if (fPressed || isFocused() || fArmed) return YSurface(color,colorB,PixmapA,PixmapB); //LXP
+    else if (fOver && rolloverTitleButtons) return YSurface(color,colorB,PixmapO,PixmapB); //LXP
+    else return YSurface(color,colorB,PixmapI,PixmapB); //LXP
 #endif
 }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yconfig.cc icewm-1.2.30.LXP/src/yconfig.cc
--- icewm-1.2.30/src/yconfig.cc	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/src/yconfig.cc	2006-12-14 17:55:14.000000000 +0100
@@ -55,6 +55,25 @@
                 if (!access(prog, mode) && isreg(prog))
                     return newstr(prog);
 #endif
+
+                // If prog isn't executable and doesn't end with .xpm or .png, append .png and try the search
+                if ( !(mode & X_OK) &&
+                      (strlen(prog)+4<sizeof(prog)) &&
+                     (strlen(prog) > 4) && 
+                     (strcmp((prog + strlen(prog) - 4), ".png") ||
+                     strcmp((prog + strlen(prog) - 4), ".xpm"))) 
+                {
+                   strcat(prog,".png");
+#ifdef __EMX__
+                   if (!access(prog, 0))
+                       return newstr(prog);
+#else
+                   if (!access(prog, mode) && isreg(prog))
+                       return newstr(prog);
+#endif
+                }
+
+
             }
         }
     }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ycursor.cc icewm-1.2.30.LXP/src/ycursor.cc
--- icewm-1.2.30/src/ycursor.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ycursor.cc	2006-12-14 17:55:14.000000000 +0100
@@ -233,6 +233,7 @@
 
 #ifndef LITE
 void YCursor::load(char const *path) {
+#if defined(CONFIG_XPM) || defined(CONFIG_IMLIB) //FX
     YCursorPixmap pixmap(path);
     
     if (pixmap.isValid()) { // ============ convert coloured pixmap into a bilevel one ===
@@ -272,6 +273,7 @@
 
         XFreePixmap(xapp->display(), bilevel);
     }
+#endif
 }
 #endif
 
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ydialog.cc icewm-1.2.30.LXP/src/ydialog.cc
--- icewm-1.2.30/src/ydialog.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ydialog.cc	2006-12-14 17:55:14.000000000 +0100
@@ -14,6 +14,7 @@
 
 #include "yxapp.h"
 #include "prefs.h"
+#include "yprefs.h" //LXP
 #include "WinMgr.h"
 #include "wmframe.h"
 #include "wmclient.h"
@@ -58,6 +59,8 @@
 #endif    
     if (dialogbackPixmap != null)
         g.fillPixmap(dialogbackPixmap, 1, 1, width() -2, height() - 2);
+    else if (wmLook==lookMXP) 
+        g.fillRect(0, 0, width(), height()); //LXP
     else
         g.fillRect(1, 1, width() - 2, height() - 2);
 }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yimage.cc icewm-1.2.30.LXP/src/yimage.cc
--- icewm-1.2.30/src/yimage.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yimage.cc	2006-12-14 17:55:14.000000000 +0100
@@ -136,6 +136,7 @@
 void YPixmap::scaleImage(Pixmap pixmap, Pixmap mask,
                          int x, int y, int w, int h, int nw, int nh)
 {
+    //fWidth = nw; fHeight = nh; //LXP FX
     if (pixmap != None) {
         ImlibImage *im =
             Imlib_create_image_from_drawable (hImlib, pixmap, 0, x, y, w, h);
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ylistbox.cc icewm-1.2.30.LXP/src/ylistbox.cc
--- icewm-1.2.30/src/ylistbox.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ylistbox.cc	2006-12-14 17:55:14.000000000 +0100
@@ -20,6 +20,8 @@
 #include "yxapp.h"
 #include "prefs.h"
 #include "ascii.h"
+#include "yprefs.h" //LXP
+#include "ymenu.h" //LXP
 
 #include <string.h>
 
@@ -571,8 +573,12 @@
     }
 
     if (s) {
+        if (menuselPixmap!=null)  //LXP FX
+                g.fillPixmap(menuselPixmap, 0, y - fOffsetY, width(), lh); //LXP
+	else { //LXP
         g.setColor(listBoxSelBg);
         g.fillRect(0, y - fOffsetY, width(), lh);
+	} //LXP
     } else {
 #ifdef CONFIG_GRADIENTS
         if (fGradient != null)
@@ -588,7 +594,7 @@
             }
     }
 
-    if (fFocusedItem == n) {
+    if (wmLook != lookMXP && fFocusedItem == n) { //LXP
         g.setColor(YColor::black);
         g.setPenStyle(true);
         int cw = 3 + 20 + a->getOffset();
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ymenu.cc icewm-1.2.30.LXP/src/ymenu.cc
--- icewm-1.2.30/src/ymenu.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ymenu.cc	2006-12-14 17:55:14.000000000 +0100
@@ -36,6 +36,12 @@
 int YMenu::fAutoScrollMouseY = -1;
 YMenu *YMenu::fPointedMenu = 0;
 
+#ifdef CONFIG_LOOK_WINXP
+#include "yicon.h" 
+YIcon *Icon_Folder=0;
+YIcon *Icon_MenuSelected=0;
+#endif
+
 void YMenu::setActionListener(YActionListener *actionListener) {
     fActionListener = actionListener;
 }
@@ -55,6 +61,12 @@
 
 YMenu::YMenu(YWindow *parent):
     YPopupWindow(parent) INIT_GRADIENT(fGradient, NULL) {
+#ifdef MENU_LEFT_PIXMAPS
+    LTP=menuTL_Pixmap; //LXP
+    LP=menuL_Pixmap; //LXP
+    LBP=menuBL_Pixmap; //LXP
+#endif
+
     if (menuFont == null)
         menuFont = YFont::getFont(XFA(menuFontName));
     if (menuBg == 0)
@@ -83,6 +95,7 @@
     fTimerX = 0;
     fTimerY = 0;
     fTimerSubmenuItem = -1;
+    iconsSize = menuIconSize; //LXP
 }
 
 YMenu::~YMenu() {
@@ -714,7 +727,9 @@
     }
 
 void YMenu::getOffsets(int &left, int &top, int &right, int &bottom) {
-    if (wmLook == lookMetal) {
+    if (wmLook == lookMXP) { //LXP
+        left = 1; right = 2; top = 1; bottom = 2; //LXP
+    } else if (wmLook == lookMetal) { //LXP
         left = 1;
         right = 1;
         top = 2;
@@ -775,11 +790,16 @@
     int width, height;
     int maxName(0);
     int maxParam(0);
-    int maxIcon(16);
+    int maxIcon(iconsSize);
     int l, t, r, b;
     int padx(1);
     int left(1);
 
+    if (!itemCount()) { //LXP FX
+	setSize(0,0); //LXP
+	return; //LXP
+    } //LXP
+
     getOffsets(l, t, r, b);
     int dx, dy, dw, dh;
     desktop->getScreenGeometry(&dx, &dy, &dw, &dh, getXiScreen());
@@ -790,6 +810,16 @@
     for (int i = 0; i < itemCount(); i++) {
         const YMenuItem *mitem = getItem(i);
 
+#ifdef CONFIG_LOOK_WINXP
+        // asign a default icon if the iten is a folder
+        if (wmLook == lookMXP && mitem->getIcon()==null && mitem->getSubmenu())
+            mitem->setIcon(Icon_Folder);
+        // Resize all icons of this menu to identical size
+        if (wmLook == lookMXP && mitem->getIcon()!=null && mitem->getIconWidth() != iconsSize)
+            mitem->setIcon(YIconImage::scale(mitem->getIcon(), iconsSize, iconsSize));
+#endif
+        
+
         int ih, top, bottom, pad;
         height+= (ih = mitem->queryHeight(top, bottom, pad));
 
@@ -811,10 +841,28 @@
     if (maxName > hspace)
         maxName = hspace;
 
-    namePos = l + left + padx + maxIcon + 2;
+    itemPos = l; //LXP
+#ifdef MENU_LEFT_PIXMAPS
+    if (LP!=null) //LXP
+        itemPos += LP->width(); //LXP
+#endif
+
+    namePos = itemPos + left + padx + maxIcon + 2; //LXP
+
+    iconPos = itemPos; //LXP
+#ifdef MENU_LEFT_PIXMAPS
+    if (LP!=null && LBP==null && LP->width()>maxIcon ) { //LXP
+        iconPos -= maxIcon + (LP->width() - maxIcon)/2; //LXP
+        namePos -= maxIcon;  //LXP
+    } //LXP
+#endif
+
     paramPos = namePos + 2 + maxName + 6;
     width = paramPos + maxParam + 4 + r;
     height += b;
+#ifdef MENU_LEFT_PIXMAPS
+    if (LP!=null) width+=LP->width(); //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
     if (menubackPixbuf != null
@@ -877,7 +925,17 @@
 
         drawBackground(g, x, y + 2 + (menusepPixmap->height()+1)/2,
                        w, 2 - (menusepPixmap->height()+1)/2);
-    } else if (wmLook == lookMetal) {
+#ifdef CONFIG_LOOK_WINXP
+    } else if (wmLook == lookMXP) { //LXP
+        drawBackground(g, x, y + 0, w, 3); //LXP
+	g.setColor(activeMenuItemBg?activeMenuItemBg:menuBg); //LXP
+	g.drawLine(3 
+#ifdef MENU_LEFT_PIXMAPS
+		+ (LP!=null?LP->width():0)
+#endif
+		, y + 1, w - 2 , y + 1);
+#endif
+    } else if (wmLook == lookMetal) { //LXP
         drawBackground(g, x, y + 0, w, 1);
 
         if (activeMenuItemBg)
@@ -911,9 +969,9 @@
 
     if (!mitem->getName() && !mitem->getSubmenu()) {
         if (draw && t + 4 >= minY && t <= maxY)
-            drawSeparator(g, 1, t, width() - 2);
+            drawSeparator(g, l, t, width() - 2);  //LXP FX
 
-        t += (wmLook == lookMetal) ? 3 : 4;
+        t += (wmLook == lookMetal || wmLook == lookMXP ) ? 3 : 4;  // LXP SEE use queryHeight
     } else {
         bool const active(i == paintedItem &&
                           (mitem->getAction() || mitem->getSubmenu()));
@@ -949,11 +1007,11 @@
 
                 if (wmLook == lookMetal && i != selectedItem) {
                     g.setColor(menuBg->brighter());
-                    g.drawLine(1, t, 1, t + eh - 1);
+                    g.drawLine(itemPos, t, itemPos, t + eh - 1);
                     g.setColor(menuBg);
                 }
 
-                if (wmLook != lookWin95 && wmLook != lookWarp4 && active) {
+                if ( active && wmLook != lookMXP && wmLook != lookWin95 && wmLook != lookWarp4 ) {  //LXP
 #ifdef OLDMOTIF
                     bool raised(wmLook == lookMotif);
 #else
@@ -961,16 +1019,16 @@
 #endif
                     g.setColor(menuBg);
                     if (wmLook == lookGtk) {
-                        g.drawBorderW(l, t, width() - r - l - 1, eh - 1, true);
+                        g.drawBorderW(itemPos, t, width() - r - 1, eh - 1, true);
                     } else if (wmLook == lookMetal) {
                         g.setColor((activeMenuItemBg ? activeMenuItemBg
                                     : menuBg)->darker());
-                        g.drawLine(l, t, width() - r - l, t);
+                        g.drawLine(itemPos, t, width() - r, t);
                         g.setColor((activeMenuItemBg ? activeMenuItemBg
                                     : menuBg)->brighter());
-                        g.drawLine(l, t + eh - 1, width() - r - l, t + eh - 1);
+                        g.drawLine(itemPos, t + eh - 1, width() - r, t + eh - 1);
                     } else
-                        g.draw3DRect(l, t, width() - r - l - 1, eh - 1, raised);
+                        g.draw3DRect(itemPos, t, width() - r - 1, eh - 1, raised);
 
 
                     if (wmLook == lookMotif)
@@ -987,15 +1045,27 @@
                 int delta = (active) ? 1 : 0;
                 if (wmLook == lookMotif || wmLook == lookGtk ||
                     wmLook == lookWarp4 || wmLook == lookWin95 ||
-                    wmLook == lookMetal)
+                    wmLook == lookMetal || wmLook == lookMXP ) //LXP
                     delta = 0;
                 int baseLine = t + top + pad + (ih - fontHeight) / 2 + fontBaseLine + delta;
                 //1 + 1 + t + (eh - fontHeight) / 2 + fontBaseLine + delta;
-
+#ifdef CONFIG_LOOK_WINXP
+		if (wmLook == lookMXP && mitem->getSubmenu() && mitem->getIcon()==null)
+			mitem->setIcon(Icon_Folder); //FIX use Folder 
+#endif
                 if (mitem->isChecked()) {
+#ifdef CONFIG_LOOK_WINXP
+                 if (wmLook == lookMXP && Icon_MenuSelected && Icon_MenuSelected->small()!=null ) { //LXP
+                   g.drawImage(Icon_MenuSelected->small(),  //LXP
+                                 iconPos + 1 + delta, t + delta + top + pad + //LXP
+                                (eh - top - pad * 2 - bottom - //LXP
+                                 Icon_MenuSelected->small()->height()) / 2); //LXP ///FIX
+                 } else 
+#endif
+		 { 
                     XPoint points[4];
 
-                    points[0].x = l + 3 + (16 - 10) / 2;
+                    points[0].x = iconPos + 3 + (16 - 10) / 2; //LXP
                     points[1].x = 5;
                     points[2].x = 5;
                     points[3].x = -5;
@@ -1005,9 +1075,10 @@
                     points[3].y = 5;
 
                     g.fillPolygon(points, 4, Convex, CoordModePrevious);
+                 }
                 } else if (mitem->getIcon() != null) {
                     g.drawImage(mitem->getIcon(),
-                                l + 1 + delta, t + delta + top + pad +
+                                iconPos + 1 + delta, t + delta + top + pad + //LXP
                                 (eh - top - pad * 2 - bottom -
                                  mitem->getIcon()->height()) / 2);
                 }
@@ -1054,7 +1125,7 @@
                             drawBackground(g, width() - r - 1 -ih - pad, t + top + pad, ih, ih);
                             g.drawBorderW(width() - r - 1 - ih - pad, t + top + pad, ih - 1, ih - 1,
                                           active ? false : true);
-                        } else {
+                        } else if (wmLook != lookMXP) { //LXP
                             g.setColor(menuBg->darker());
                             g.drawLine(cascadePos, t + top + pad,
                                        cascadePos, t + top + pad + ih);
@@ -1082,6 +1153,7 @@
 ///                        if (wmLook == lookWarp3) {
 ///                            g.drawArrow(lookNice, Right, ax, ay, asize);
 ///                        } else {
+			if (mitem->getAction() && wmLook == lookMXP ) g.drawArrow(Right, ax-asize+4, ay, asize); //LXP
                         g.drawArrow(Right, ax, ay, asize);
 ///                        }
                     }
@@ -1093,12 +1165,42 @@
 }
 
 void YMenu::paint(Graphics &g, const YRect &r1) {
-    if (wmLook == lookMetal) {
+    int l, t, r, b;
+    getOffsets(l, t, r, b);
+#ifdef MENU_LEFT_PIXMAPS    
+    // Paint Left pixmaps
+    if (LP!=null) { //LXP
+       int tt=t; //LXP
+       int bb=height()-b; //LXP
+       if (LBP!=null) { //LXP
+          bb= (bb - LBP->height()) > tt ? bb - LBP->height() : tt; //LXP
+          g.fillPixmap(LBP,l,bb,LP->width(),LBP->height()); //LXP
+       } //LXP
+       if (LTP!=null) { //LXP
+          tt= (tt + LTP->height()) < bb ? tt + LTP->height() : bb; //LXP
+          g.fillPixmap(LTP,l,t,LP->width(),LTP->height()); //LXP
+       } //LXP
+       if (tt < bb) { //LXP
+          g.fillPixmap(LP,l,tt,LP->width(),bb-tt); //LXP
+       } //LXP
+    } //LXP
+#endif
+
+    // Paint Items
+    for (int i = 0; i < itemCount(); i++) {
+	paintItem(g, i, itemPos, t, r, r1.y(), r1.y() + r1.height(), 1); //LXP
+    }
+
+    // Paint Menu border
+    if (wmLook == lookMXP) { //LXP
+	g.setColor(YColor::black);
+	g.drawBorder(0,0,width()-1,height() - 1,1); //LXP
+	g.setColor(activeMenuItemBg ? activeMenuItemBg : menuBg); //LXP
+	g.drawBorder(0,0,width()-2,height() - 2,1); //LXP
+    } //LXP
+    else if (wmLook == lookMetal) {
         g.setColor(activeMenuItemBg ? activeMenuItemBg : menuBg);
-        g.drawLine(0, 0, width() - 1, 0);
-        g.drawLine(0, 0, 0, height() - 1);
-        g.drawLine(width() - 1, 0, width() - 1, height() - 1);
-        g.drawLine(0, height() - 1, width() - 1, height() - 1);
+	g.drawBorder(0,0,width()-1,height() - 1,1); //LXP
         g.setColor(menuBg->brighter());
         g.drawLine(1, 1, width() - 2, 1);
         g.setColor(menuBg);
@@ -1106,17 +1208,7 @@
     } else {
         g.setColor(menuBg);
         g.drawBorderW(0, 0, width() - 1, height() - 1, true);
-        g.drawLine(1, 1, width() - 3, 1);
-        g.drawLine(1, 1, 1, height() - 3);
-        g.drawLine(1, height() - 3, width() - 3, height() - 3);
-        g.drawLine(width() - 3, 1, width() - 3, height() - 3);
-    }
-
-    int l, t, r, b;
-    getOffsets(l, t, r, b);
-
-    for (int i = 0; i < itemCount(); i++) {
-        paintItem(g, i, l, t, r, r1.y(), r1.y() + r1.height(), 1);
+	g.drawBorder(1,1,width()-3,height()-3,1); //LXP
     }
 }
 
@@ -1127,3 +1219,8 @@
     fPopupActive = 0;
     submenuItem = -1;
 }
+#ifdef MENU_LEFT_PIXMAPS
+void YMenu::setLeftPixmaps(const ref<YPixmap> T, const ref<YPixmap> M, const ref<YPixmap> B) {
+   LTP=T; LP=M; LBP=B;
+}
+#endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ymenuitem.cc icewm-1.2.30.LXP/src/ymenuitem.cc
--- icewm-1.2.30/src/ymenuitem.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ymenuitem.cc	2006-12-14 17:55:14.000000000 +0100
@@ -108,7 +108,7 @@
         bottom = 0;
         pad = 1;
 
-        return (wmLook == lookMetal ? 3 : 4);
+        return (wmLook == lookMetal || wmLook == lookMXP ? 3 : 4); //LXP
     }
 }
 
@@ -129,6 +129,12 @@
 
 #ifndef LITE
 void YMenuItem::setIcon(YIcon *icon) {
+    if (!icon) return;
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP)
+    setIcon(icon->getScaledIcon(startmenuIconSize));
+    else
+#endif
     setIcon(icon->getScaledIcon(menuIconSize));
 }
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ymsgbox.cc icewm-1.2.30.LXP/src/ymsgbox.cc
--- icewm-1.2.30/src/ymsgbox.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ymsgbox.cc	2006-12-14 17:55:14.000000000 +0100
@@ -30,11 +30,14 @@
 
     setToplevel(true);
 
+    YColor *dialogBg = new YColor(clrDialog);
+
     if (buttons & mbOK) {
         fButtonOK = new YActionButton(this);
         if (fButtonOK) {
             fButtonOK->setText(_("OK"));
             fButtonOK->setActionListener(this);
+	    fButtonOK->setColors(dialogBg, YButton::activeButtonBg, YButton::normalButtonBg);
             fButtonOK->show();
         }
     }
@@ -43,6 +46,7 @@
         if (fButtonCancel) {
             fButtonCancel->setText(_("Cancel"));
             fButtonCancel->setActionListener(this);
+	    fButtonCancel->setColors(dialogBg, YButton::activeButtonBg, YButton::normalButtonBg);
             fButtonCancel->show();
         }
     }
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/ypaint.cc icewm-1.2.30.LXP/src/ypaint.cc
--- icewm-1.2.30/src/ypaint.cc	2005-01-09 22:48:23.000000000 +0100
+++ icewm-1.2.30.LXP/src/ypaint.cc	2006-12-14 17:55:14.000000000 +0100
@@ -28,12 +28,20 @@
 YColor::YColor(unsigned short red, unsigned short green, unsigned short blue):
     fRed(red), fGreen(green), fBlue(blue),
     fDarker(NULL), fBrighter(NULL)
+#ifdef CONFIG_LOOK_WINXP
+,fRedder(NULL)
+,fGreener(NULL)
+#endif
     INIT_XFREETYPE(xftColor, NULL) {
     alloc();
 }
 
 YColor::YColor(unsigned long pixel):
     fDarker(NULL), fBrighter(NULL)
+#ifdef CONFIG_LOOK_WINXP
+,fRedder(NULL)
+,fGreener(NULL)
+#endif
     INIT_XFREETYPE(xftColor, NULL) {
 
     XColor color;
@@ -49,6 +57,10 @@
 
 YColor::YColor(const char *clr):
     fDarker(NULL), fBrighter(NULL)
+#ifdef CONFIG_LOOK_WINXP
+,fRedder(NULL)
+,fGreener(NULL)
+#endif
     INIT_XFREETYPE(xftColor, NULL) {
 
     XColor color;
@@ -173,6 +185,28 @@
     }
     return fBrighter;
 }
+#ifdef CONFIG_LOOK_WINXP
+YColor *YColor::redder() { // !!! fix //LXP
+    if (fRedder==0) {
+        unsigned short red, blue, green;
+	red   = max((unsigned)fRed,(unsigned)0xCCCC);
+	green = min((unsigned)fGreen,(unsigned)0x4444);
+	blue  = min((unsigned)fBlue,(unsigned)0x2222);
+        fRedder = new YColor(red, green, blue);
+    }
+    return fRedder;
+}
+YColor *YColor::greener() { // !!! fix //LXP
+    if (fGreener==0) {
+        unsigned short red, blue, green;
+        red   = min((unsigned)fRed,(unsigned)0x6D6D);
+        green = max((unsigned)fGreen,(unsigned)0xB3B3);
+        blue  = min((unsigned)fBlue,(unsigned)0x5555);
+        fGreener = new YColor(red, green, blue);
+    }
+    return fGreener;
+}
+#endif
 
 /******************************************************************************/
 
@@ -587,9 +621,11 @@
 /******************************************************************************/
 
 void Graphics::setColor(YColor * aColor) {
+    if (aColor) {
     fColor = aColor;
     XSetForeground(fDisplay, gc, fColor->pixel());
 }
+}
 
 void Graphics::setFont(ref<YFont> aFont) {
     fFont = aFont;
@@ -729,6 +765,87 @@
     drawPoint(x, y + h);
 }
 
+void Graphics::drawBorder(int x, int y, int w, int h, int size) {
+    for (int i=size-1;i>=0;i--){
+	drawLine(x+i,y+i,w-i,y+i);
+	drawLine(x+i,y+i,x+i,h-i);
+	drawLine(x+i,h-i,w-i,h-i);
+	drawLine(w-i,y+i,w-i,h-i);
+    }
+}
+#ifdef CONFIG_LOOK_WINXP
+void Graphics::drawBorderXP(int x, int y, int w, int h) {
+    YColor *back(color());
+    if (!back) return;
+    YColor *bright(back->brighter());
+    YColor *dark(back->darker());
+	w+=x; h+=y;
+	int i=2;
+	w-=1; h-=1;
+	setColor(dark);
+	drawLine(x+i,y,w-i,y);
+	drawLine(x,y+i,x,h-i);
+	drawLine(x+i,h,w-i,h);
+	drawLine(w,y+i,w,h-i);
+	i=1;
+	x+=1;y+=1;w-=1; h-=1;
+	drawPoint(x,y);drawPoint(x,h);drawPoint(w,y);drawPoint(w,h);
+	//drawBorder(x,y,w,h,1);
+	setColor(bright);
+	drawLine(x+i,y,w-i,y);
+	drawLine(x,y+i,x,h-i);
+	drawLine(x+i,h,w-i,h);
+	drawLine(w,y+i,w,h-i);
+}
+void Graphics::drawTopBorderWXP(int x, int y, int w) { //LXP
+   YColor *c[] = { color()->darker(), color(), color()->brighter(), color()->brighter() };
+   for (int i=0; i<4; i++) {
+	setColor(c[i]);
+	drawLine(x,y+i,w,y+i);
+   }
+}
+#include <math.h>
+void Graphics::drawBorderMaskWXP(int x, int y, int w, int /*h*/) { //LXP
+    YColor *back(color());
+    setColor(YColor::black);
+    int r=6;
+    for (int i=0; i<(r-1); i++) {
+            for (int j=0; j<(r-1); j++) {
+                //int d=(int)sqrt(((r-i)*(r-i))+((r-j)*(r-j)));
+                int d=(int)sqrt(pow(r-i,2)+pow(r-j,2));
+                if (d>=r) {
+                        drawPoint(x+i,y+j); //Top-Left corner
+                        drawPoint(w-i,y+j); //Top-Right corner
+                }
+            }
+     }
+     setColor(back);
+}
+void Graphics::drawBorderWXP(int x, int y, int w, int h) { //LXP
+    YColor *back(color());
+    YColor *dark(back->darker());
+    int t1= 5; 
+    drawTopBorderWXP(x+t1,y,w-t1); // Top +0 +1 +2 +3
+    setColor(dark);
+    drawLine(x, y + t1, x, y + h - 1); //Left+0
+    setColor(YColor::black);
+    drawLine(x, y + h, x + w, y + h); //Botton-0
+    drawLine(x + w, y + t1, x + w, y + h); //Right-0
+    setColor(dark);
+    drawLine(x, y + h -1, x + w, y + h -1); //Botton-1
+    drawLine(x + w - 1, y + t1, x + w - 1, y + h); //Right-1
+    for (int i=0; i< t1; i++) { // Top Corners
+	    for (int j=0; j<t1; j++) {
+		int d=(int)sqrt(((t1-i)*(t1-i))+((t1-j)*(t1-j)));
+		if (d==t1) {
+			drawPoint(x+1+i,y+1+j); //Top-Left corner
+			drawPoint(w-1-i,y+1+j); //Top-Right corner
+		}
+	    }
+     }
+     setColor(back);
+}
+#endif
 void Graphics::drawBorderW(int x, int y, int w, int h, bool raised) {
     YColor *back(color());
     YColor *bright(back->brighter());
@@ -883,6 +1000,31 @@
         h -= ph;
     }
 }
+#ifdef CONFIG_LOOK_WINXP
+void Graphics::fillClippedPixmap(const ref<YPixmap> &pixmap, int x, int y,
+                          int w, int h, int px, int py) 
+{
+    static GC clipPixmapGC = None;
+    XGCValues gcv;
+    if (clipPixmapGC == None) {
+        gcv.graphics_exposures = False;
+        clipPixmapGC = XCreateGC(xapp->display(), desktop->handle(), GCGraphicsExposures, &gcv);
+    }
+    gcv.clip_mask = pixmap->mask();
+    int pw=pixmap->width()-px, ph=pixmap->height()-py;
+    for (int xx=x; xx<w; xx+=pw) 
+         for (int yy=y; yy<h; yy+=ph) {
+                gcv.clip_x_origin = xx - xOrigin;
+                gcv.clip_y_origin = yy - yOrigin;
+                XChangeGC(fDisplay, clipPixmapGC, GCClipMask|GCClipXOrigin|GCClipYOrigin, &gcv);
+                XCopyArea(fDisplay, pixmap->pixmap(), fDrawable, clipPixmapGC,
+                          px, py, min(pw, w-xx), min(ph, h-yy), xx - xOrigin, yy - yOrigin);
+         }
+    gcv.clip_mask = None;
+    XChangeGC(fDisplay, clipPixmapGC, GCClipMask, &gcv);
+}
+#endif
+
 
 void Graphics::fillPixmap(const ref<YPixmap> &pixmap, int x, int y,
                           int w, int h, int px, int py) {
@@ -919,11 +1061,34 @@
                            int const sx, int const sy,
 #ifdef CONFIG_GRADIENTS
                            const int sw, const int sh) {
+#else
+        const int /*sw*/, const int /*sh*/) {
+#endif
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP) {
+	if (surface.pixmapBg != null) {
+           fillPixmap(surface.pixmapBg, x, y, w, h, sx, sy); //LXP
+	} else if (surface.colorBg ) {
+           setColor(surface.colorBg);
+           fillRect(x,y,w,h);
+        }
+#ifdef CONFIG_GRADIENTS
+        if (surface.gradient != null)
+            drawGradient(surface.gradient, x+2, y+2, w-4, h-4, sx, sy, sw, sh);
+        else
+#endif
+        if (surface.pixmap != null ) {
+            fillClippedPixmap(surface.pixmap, x, y, w, h, 0, 0);
+        } else if (surface.pixmapBg==null && surface.color) {
+           setColor(surface.color);
+           fillRect(x+2,y+2,w-4,h-4);
+        }
+    } else
+#endif
+#ifdef CONFIG_GRADIENTS
     if (surface.gradient != null)
         drawGradient(surface.gradient, x, y, w, h, sx, sy, sw, sh);
     else
-#else
-        const int /*sw*/, const int /*sh*/) {
 #endif
 if (surface.pixmap != null)
     fillPixmap(surface.pixmap, x, y, w, h, sx, sy);
@@ -939,6 +1104,15 @@
                             int const gx, int const gy, const int gw, const int gh)
 {
     ref<YPixbuf> scaled = YPixbuf::scale(pixbuf, gw, gh);
+#ifdef CONFIG_LOOK_WINXP
+    if (wmLook==lookMXP) { // fill scaled pixbuf into grafic area whith gx and gy offsets
+        int rgx=gx%gw, rgy=gy%gh;
+        int ww=gw-rgx, hh=gh-rgy;
+        for (int xx=x; xx<(x+w); xx+=ww)
+           for (int yy=y; yy<(y+h); yy+=hh)
+              scaled->copyToDrawable(fDrawable, gc, rgx, rgy, min(ww,x+w-xx), min(hh,y+h-yy), xx - xOrigin, yy - yOrigin);
+    } else
+#endif
     scaled->copyToDrawable(fDrawable, gc, gx, gy, w, h, x - xOrigin, y - yOrigin);
 }
 #endif
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yscrollbar.cc icewm-1.2.30.LXP/src/yscrollbar.cc
--- icewm-1.2.30/src/yscrollbar.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yscrollbar.cc	2006-12-14 17:55:14.000000000 +0100
@@ -272,7 +272,7 @@
             g.fillRect(2, y + h + 2, width() - 3, height() - h - y - 3);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.fillRect(0, beg, width(), min);
             g.fillRect(0, y + h + 2, width(), end - h - y - 1);
 
@@ -308,7 +308,7 @@
             g.drawArrow(Up, 2, 2, width() - 5, fScrollTo == goUp);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawArrow(Up, 4, (beg - width() + 12) / 2,
                         width() - 8, fScrollTo == goUp);
             break;
@@ -338,7 +338,7 @@
             g.drawArrow(Down, 2, end + 2, width() - 5, fScrollTo == goDown);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawArrow(Down, 4, end + (beg - width() + 14) / 2,
                         width() - 8, fScrollTo == goDown);
             break;
@@ -384,7 +384,7 @@
             g.fillRect(3, y, width() - 7, h);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawBorderM(0, y, width() - 1, h + 1, true);
             g.fillRect(2, y + 2, width() - 4, h - 2);
             break;
@@ -451,7 +451,7 @@
             g.fillRect(x + w + 2, 2, width() - w - x - 3, height() - 3);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.fillRect(beg, 0, min, height());
             g.fillRect(x + w + 2, 0, end - w - x - 1, height());
 
@@ -487,7 +487,7 @@
             g.drawArrow(Left, 2, 2, height() - 5, fScrollTo == goUp);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawArrow(Left, (beg - height() + 12) / 2, 4,
                         height() - 8, fScrollTo == goUp);
             break;
@@ -518,7 +518,7 @@
                         fScrollTo == goDown);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawArrow(Right, end + (beg - height() + 14) / 2, 4,
                         height() - 8, fScrollTo == goDown);
             break;
@@ -565,7 +565,7 @@
             g.fillRect(x, 3, w + 1, height() - 7);
             break;
 
-        case lookMetal:
+        case lookMetal: case lookMXP: //LXP
             g.drawBorderM(x, 0, w + 1, height() - 1, true);
             g.fillRect(x + 2, 2, w - 2, height() - 4);
             break;
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yxapp.cc icewm-1.2.30.LXP/src/yxapp.cc
--- icewm-1.2.30/src/yxapp.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yxapp.cc	2006-12-14 17:55:14.000000000 +0100
@@ -107,6 +107,9 @@
 YColor *YColor::white(NULL);
 
 ref<YPixmap> buttonIPixmap;
+#ifdef OVER_BUTTON_PIXMAPS
+ref<YPixmap> buttonOPixmap;
+#endif
 ref<YPixmap> buttonAPixmap;
 
 ref<YPixmap> logoutPixmap;
@@ -117,6 +120,11 @@
 ref<YPixmap> menubackPixmap;
 ref<YPixmap> menusepPixmap;
 ref<YPixmap> menuselPixmap;
+#ifdef MENU_LEFT_PIXMAPS
+ref<YPixmap> menuTL_Pixmap; //LXP
+ref<YPixmap> menuL_Pixmap; //LXP
+ref<YPixmap> menuBL_Pixmap; //LXP
+#endif
 
 #ifdef CONFIG_GRADIENTS
 ref<YPixbuf> buttonIPixbuf;
@@ -778,7 +786,9 @@
     windowContext = XUniqueContext();
 
     new YDesktop(0, RootWindow(display(), DefaultScreen(display())));
+#if defined(CONFIG_XPM) || defined(CONFIG_IMLIB) //LXP FX
     YPixbuf::init();
+#endif
 
     initAtoms();
     initModifiers();
diff -Nuw --ignore-blank-lines icewm-1.2.30/src/yxtray.cc icewm-1.2.30.LXP/src/yxtray.cc
--- icewm-1.2.30/src/yxtray.cc	2005-01-09 22:48:24.000000000 +0100
+++ icewm-1.2.30.LXP/src/yxtray.cc	2006-12-14 17:55:14.000000000 +0100
@@ -8,10 +8,11 @@
 #include "wmtaskbar.h"
 #include "sysdep.h"
 
-static YColor *trayBg;
+extern YColor *taskBarBg;
 
 // make this configurable
-#define TRAY_ICON_SIZE 24
+#define TICON_H_MAX 24
+#define TICON_W_MAX 30
 
 class YXTrayProxy: public YWindow {
 public:
@@ -68,7 +69,7 @@
 }
 
 void YXTrayProxy::handleClientMessage(const XClientMessageEvent &message) {
-#warning "implement systray notifications"
+/// TODO #warning "implement systray notifications"
     if (message.message_type == _NET_SYSTEM_TRAY_OPCODE) {
         if (message.data.l[1] == SYSTEM_TRAY_REQUEST_DOCK)
             fTray->trayRequestDock(message.data.l[2]);
@@ -95,15 +96,15 @@
 {
     setStyle(wsManager);
 
-    if (trayBg == 0) {
-        trayBg = new YColor(clrDefaultTaskBar);
+    if (taskBarBg == 0) {
+        taskBarBg = new YColor(clrDefaultTaskBar);
     }
 
     fNotifier = notifier;
     fInternal = internal;
     fTrayProxy = new YXTrayProxy(atom, this);
     show();
-    XSetWindowBackground(xapp->display(), handle(), trayBg->pixel());
+    XSetWindowBackground(xapp->display(), handle(), taskBarBg->pixel());
 }
 
 YXTray::~YXTray() {
@@ -133,10 +134,10 @@
         int hh = client->height();
 
         // !!! hack, hack
-        if (ww < 16 || ww > 8 * TRAY_ICON_SIZE)
-            ww = TRAY_ICON_SIZE;
-        if (hh < 16 || hh > TRAY_ICON_SIZE)
-            hh = TRAY_ICON_SIZE;
+        if (ww < 16 || ww > 8 * TICON_W_MAX)
+            ww = TICON_W_MAX;
+        if (hh < 16 || hh > TICON_H_MAX)
+            hh = TICON_H_MAX;
 
         client->setSize(ww, hh);
     }
@@ -173,9 +174,9 @@
         if (ec->handle() == configureRequest.window) {
             int w = configureRequest.width;
             int h = configureRequest.height;
-            if (h != TRAY_ICON_SIZE) {
-                w = w * h / TRAY_ICON_SIZE;
-                h = TRAY_ICON_SIZE;
+            if (h != TICON_H_MAX) {
+                w = w * h / TICON_H_MAX; //LXP FIX
+                h = TICON_H_MAX;
             }
             if (w != ec->width() || h != ec->height())
                 changed = true;
@@ -199,18 +200,17 @@
     fDocked.clear();
 }
 
-void YXTray::paint(Graphics &/*g*/, const YRect &/*r*/) {
-#define BORDER 0
-#if 0
+
+void YXTray::paint(Graphics &g, const YRect &/*r*/) {
+    if (fInternal) 
+        return;
 #ifdef CONFIG_TASKBAR
     if (taskBarBg)
         g.setColor(taskBarBg);
 #endif
-    if (BORDER == 1)
+    g.fillRect(0, 0, width(), height());
+    if (trayDrawBevel && fDocked.getCount())
         g.draw3DRect(0, 0, width() - 1, height() - 1, false);
-
-    g.fillRect(BORDER, BORDER, width() - 2 * BORDER, height() - 2 * BORDER);
-#endif
 }
 
 void YXTray::configure(const YRect &r, const bool resized) {
@@ -218,19 +218,41 @@
     if (resized)
         relayout();
 }
+void YXTray::backgroundChanged() {
+    if (fInternal)
+        return;
+    XSetWindowBackground(xapp->display(),handle(), taskBarBg->pixel());
+    for (unsigned int i = 0; i < fDocked.getCount(); i++) {
+        YXEmbedClient *ec = fDocked[i];
+        XSetWindowBackground(xapp->display(), ec->handle(), taskBarBg->pixel());
+	ec->repaint();
+    }
+    relayout();
+    repaint();
+}
 
 void YXTray::relayout() {
-    int aw = BORDER;
-    int ah = 24;
-    /// FIXME
-    int h = ah + BORDER * 2;
+    int aw = 0;
+    int h  = TICON_H_MAX;
+    if (!fInternal && trayDrawBevel)
+        aw+=1;
     
     for (unsigned int i = 0; i < fDocked.getCount(); i++) {
         YXEmbedClient *ec = fDocked[i];
-        ec->setGeometry(YRect(aw, BORDER, ec->width(), ah));
-        aw += ec->width();
+        int eh(h), ew=ec->width(), ay(0);
+        if (!fInternal) {
+	   ew=min(TICON_W_MAX,ec->width());
+           if (trayDrawBevel) {
+               eh-=2; ay=1;
+           }	
     }
-    int w = aw + BORDER;
+        ec->setGeometry(YRect(aw,ay,ew,eh));
+        aw += ew;
+    }
+    if (!fInternal && trayDrawBevel)
+        aw+=1;
+
+    int w = aw;
     if (!fInternal) {
         if (w < 1)
             w = 1;
@@ -239,12 +261,6 @@
             w = 0;
     }
 
-    if (h < 24)
-        h = 24;
-    if (h > 48) {
-        w = 24;
-        h = 24;
-    }
     MSG(("relayout %d %d : %d %d", w, h, width(), height()));
     if (w != width() || h != height()) {
         setSize(w, h);
diff -Nuw --ignore-blank-lines icewm-1.2.30/configure.in icewm-1.2.30.LXP/configure.in
--- icewm-1.2.30/configure.in	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/configure.in	2006-08-11 18:51:41.000000000 +0200
@@ -149,7 +149,7 @@
 AC_PATH_XTRA
 
 if test x"$no_x" != x; then
-  AC_MSG_ERROR([X Window System not found])
+  AC_MSG_ERROR([X Window System or development libraries not found. Make sure you have headers and libraries installed!])
 fi
 
 dnl ===================================================== Maintaince Support ===
@@ -427,6 +427,15 @@
   fi
   if test "$enable_xfreetype" != "no" -o "$enable_xfreetype" = "implied"; then
     AC_PATH_PROG(XFT_CONFIG, xft-config,, ${with_xft_arg-${PATH}})
+    if test "${XFT_CONFIG}" == ""; then
+      AC_PATH_PROG(PKG_CONFIG, pkg-config)
+      if test "${PKG_CONFIG}" != ""; then
+        ${PKG_CONFIG} xft 2>/dev/null
+        if test $? -eq 0 ; then
+          XFT_CONFIG='pkg-config xft'
+        fi
+      fi
+    fi
     if test "${XFT_CONFIG}" != ""; then
       XFT_CFLAGS=`${XFT_CONFIG} --cflags`
       XFT_LIBS=`${XFT_CONFIG} --libs`
@@ -459,6 +468,32 @@
     features="${features} corefonts"
   fi
 
+AC_ARG_ENABLE(lookxp,[  --enable-lookxp         Enable WinXP look themes (experimental)
+                          implies: --enable-mnuleftpixm --enable-btnoverpixm])
+  if test "$enable_lookxp" = "yes"; then
+    AC_DEFINE(CONFIG_LOOK_WINXP, 1, [Define to enable WinXP look themes.])
+    features="${features} lookxp"
+    INSTALLXPTHEMES=yes
+    AC_SUBST(INSTALLXPTHEMES)
+    enable_mnuleftpixm=yes
+    enable_btnoverpixm=yes
+  fi
+AC_ARG_ENABLE(mnuleftpixm,
+[  --enable-mnuleftpixm    Enable pixmaps at left side in menus])
+  if test "$enable_mnuleftpixm" = "yes"; then
+    AC_DEFINE(MENU_LEFT_PIXMAPS, 1, [Define to enable left side pixmaps in menus])
+    features="${features} mnuleftpixm"
+  fi
+AC_ARG_ENABLE(btnoverpixm,
+[  --enable-btnoverpixm    Enable pixmap when the mouse is over buttons])
+  if test "$enable_btnoverpixm" = "yes"; then
+    AC_DEFINE(OVER_BUTTON_PIXMAPS, 1, [Define to enable pixmaps when the mouse is over the buttons])
+    features="${features} btnoverpixm"
+  fi
+
+
+
+
 dnl ============================================================= GUI Events ===
 dnl
 AC_ARG_ENABLE(guievents,
@@ -854,6 +889,8 @@
 ICE_EXPAND(LOCDIR,${localedir})
 ICE_EXPAND(KDEDIR,${kdedatadir})
 ICE_EXPAND(DOCDIR,${docdir})
+ICE_EXPAND(MANDIR,${mandir})
+ICE_EXPAND(DATADIR,${datadir})
 
 AC_SUBST(PREFIX)
 AC_SUBST(BINDIR)
@@ -862,7 +899,9 @@
 AC_SUBST(LOCDIR)
 AC_SUBST(KDEDIR)
 AC_SUBST(DOCDIR)
+AC_SUBST(MANDIR)
 AC_SUBST(GWMDIR)
+AC_SUBST(DATADIR)
 
 dnl ---------------------------------------------------------- Build targets ---
 DEPENDENCIES=""
@@ -904,6 +943,7 @@
 AC_SUBST(INSTALLBIN,"${INSTALL_PROGRAM}")
 AC_SUBST(INSTALLLIB,"${INSTALL_DATA}")
 AC_SUBST(INSTALLETC,"${INSTALL_DATA}")
+AC_SUBST(INSTALLMAN,"${INSTALL_DATA}")
 
 dnl --------------------------------------------------------- Generate files ---
 AC_CONFIG_COMMANDS(config.status, [
@@ -945,3 +985,4 @@
 ICE_MSG_VALUE([       CFGDIR], cfgdatadir)
 ICE_MSG_VALUE([       KDEDIR], kdedatadir)
 ICE_MSG_VALUE([       DOCDIR], docdir)
+ICE_MSG_VALUE([       MANDIR], mandir)
diff -Nuw --ignore-blank-lines icewm-1.2.30/icewm.spec.in icewm-1.2.30.LXP/icewm.spec.in
--- icewm-1.2.30/icewm.spec.in	2005-01-09 22:48:22.000000000 +0100
+++ icewm-1.2.30.LXP/icewm.spec.in	2006-12-22 17:54:26.000000000 +0100
@@ -1,13 +1,13 @@
 
 Name:		icewm
 Version:	%%VERSION%%
-Release:	1
+Release: 7
 Obsoletes:	icewm-common <= 1.2.2
 Summary:	Fast and small X11 window manager
 Group:		User Interface/Desktops
 License:	LGPL
-URL:		http://www.icewm.org/
-Packager:       Marko Macek <Marko.Macek@gmx.net>
+URL:		http://lxp.sourceforge.net
+Packager:   Manuel Carrasco (manuel_carrasco@users.sourceforge.net)
 Source:		http://ftp.sourceforge.net/icewm/%{name}-%{version}.tar.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
 
@@ -41,7 +41,8 @@
 Group:		%{group}
 Summary:        GNOME menu support for icewm (using gnome 2.x).
 Requires:       icewm > 1.2.2
-Requires:       gnome-libs >= 1.4
+Requires:       libgnome > 2.0.0
+Requires:       gnome-vfs2 > 2.0.0
 
 %description menu-gnome2
 GNOME 1.0 menu support for icewm (using gnome 2.x).
@@ -59,6 +60,8 @@
      --datadir=%{_datadir} \
      --sysconfdir=%{_sysconfdir} \
      --with-docdir=%{_docdir} \
+     --enable-lookxp --enable-mnuleftpixm --enable-btnoverpixm --enable-menus-gnome2 \
+     --enable-gradients --enable-antialiasing --enable-xfreetype --enable-i18n \
      %{?_with_menus_gnome2:--enable-menus-gnome2} \
      %{?_with_debug:--enable-debug}
   make
@@ -89,12 +92,19 @@
 %dir %{pkgdata}/taskbar
 %dir %{pkgdata}/themes
 
-%{_bindir}/*
+%{_bindir}/icehelp
+%{_bindir}/icesh
+%{_bindir}/icewm
+%{_bindir}/icewm-session
+%{_bindir}/icewmbg
+%{_bindir}/icewmhint
+%{_bindir}/icewmtray
+
 %{pkgdata}/icons/*
 %{pkgdata}/ledclock/*
 %{pkgdata}/mailbox/*
 %{pkgdata}/taskbar/*
-%{pkgdata}/themes/icedesert/*
+# %{pkgdata}/themes/icedesert/*
 
 %if %{?_with_menus_gnome2:1}%{!?_with_menus_gnome2:0}
 
@@ -108,26 +118,39 @@
 %{_datadir}/locale/*
 
 %files themes
-%dir %{pkgdata}/themes/nice
-%{pkgdata}/themes/nice/*
-%dir %{pkgdata}/themes/nice2
-%{pkgdata}/themes/nice2/*
-%dir %{pkgdata}/themes/gtk2
-%{pkgdata}/themes/gtk2/*
-%dir %{pkgdata}/themes/warp3
-%{pkgdata}/themes/warp3/*
-%dir %{pkgdata}/themes/warp4
-%{pkgdata}/themes/warp4/*
-%dir %{pkgdata}/themes/motif
-%{pkgdata}/themes/motif/*
-%dir %{pkgdata}/themes/win95
-%{pkgdata}/themes/win95/*
-%dir %{pkgdata}/themes/metal2
-%{pkgdata}/themes/metal2/*
-%dir %{pkgdata}/themes/Infadel2
-%{pkgdata}/themes/Infadel2/*
-%dir %{pkgdata}/themes/yellowmotif
-%{pkgdata}/themes/yellowmotif/*
+# %dir %{pkgdata}/themes/nice
+# %{pkgdata}/themes/nice/*
+# %dir %{pkgdata}/themes/nice2
+# %{pkgdata}/themes/nice2/*
+# %dir %{pkgdata}/themes/gtk2
+# %{pkgdata}/themes/gtk2/*
+# %dir %{pkgdata}/themes/warp3
+# %{pkgdata}/themes/warp3/*
+# %dir %{pkgdata}/themes/warp4
+# %{pkgdata}/themes/warp4/*
+# %dir %{pkgdata}/themes/motif
+# %{pkgdata}/themes/motif/*
+# %dir %{pkgdata}/themes/win95
+# %{pkgdata}/themes/win95/*
+# %dir %{pkgdata}/themes/metal2
+# %{pkgdata}/themes/metal2/*
+# %dir %{pkgdata}/themes/Infadel2
+# %{pkgdata}/themes/Infadel2/*
+# %dir %{pkgdata}/themes/yellowmotif
+# %{pkgdata}/themes/yellowmotif/*
+# %dir %{pkgdata}/themes/WinXP-Lite
+# %{pkgdata}/themes/WinXP-Lite/*
+%dir %{pkgdata}/themes/WinXP-Plain
+%{pkgdata}/themes/WinXP-Plain/*
+%dir %{pkgdata}/themes/WinXP-Blue
+%{pkgdata}/themes/WinXP-Blue/*
+%dir %{pkgdata}/themes/WinXP-Olive
+%{pkgdata}/themes/WinXP-Olive/*
+%dir %{pkgdata}/themes/WinXP-Silver
+%{pkgdata}/themes/WinXP-Silver/*
+%dir %{pkgdata}/themes/WinXP-Vista
+%{pkgdata}/themes/WinXP-Vista/*
+
 
 %changelog
 * Sun Feb 02 2003 Christian W. Zuckschwerdt <zany@triq.net>
diff -Nuw --ignore-blank-lines icewm-1.2.30/configure icewm-1.2.30.LXP/configure
--- icewm-1.2.30/configure	2005-01-09 22:48:35.000000000 +0100
+++ icewm-1.2.30.LXP/configure	2006-08-11 18:51:50.000000000 +0200
@@ -309,7 +309,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXX_LINK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXXCPP EGREP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XGETTEXT MSGMERGE MSGFMT NLS_SOURCES NLS_POFILES NLS_POXFILES NLS_MOFILES XFT_CONFIG ESD_CONFIG IMLIB_CONFIG MKFONTDIR GNOME1_CONFIG PKG_CONFIG GNOME_VER CONFIG_GNOME1_MENU_DIR CONFIG_GNOME2_MENU_DIR CONFIG_KDE_MENU_DIR PACKAGE VERSION HOSTOS HOSTCPU DEBUG GCCDEP CORE_CFLAGS IMAGE_CFLAGS AUDIO_CFLAGS GNOME1_CFLAGS GNOME2_CFLAGS CORE_LIBS IMAGE_LIBS AUDIO_LIBS GNOME1_LIBS GNOME2_LIBS PREFIX BINDIR LIBDIR CFGDIR LOCDIR KDEDIR DOCDIR GWMDIR BASEOBJS BASEBINS TESTOBJS TESTBINS TARGETS TARGETS_INSTALL APPLICATIONS TESTCASES BINFILES INSTALL INSTALLDIR INSTALLBIN INSTALLLIB INSTALLETC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXX_LINK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXXCPP EGREP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XGETTEXT MSGMERGE MSGFMT NLS_SOURCES NLS_POFILES NLS_POXFILES NLS_MOFILES XFT_CONFIG PKG_CONFIG INSTALLXPTHEMES ESD_CONFIG IMLIB_CONFIG MKFONTDIR GNOME1_CONFIG GNOME_VER CONFIG_GNOME1_MENU_DIR CONFIG_GNOME2_MENU_DIR CONFIG_KDE_MENU_DIR PACKAGE VERSION HOSTOS HOSTCPU DEBUG GCCDEP CORE_CFLAGS IMAGE_CFLAGS AUDIO_CFLAGS GNOME1_CFLAGS GNOME2_CFLAGS CORE_LIBS IMAGE_LIBS AUDIO_LIBS GNOME1_LIBS GNOME2_LIBS PREFIX BINDIR LIBDIR CFGDIR LOCDIR KDEDIR DOCDIR MANDIR GWMDIR DATADIR BASEOBJS BASEBINS TESTOBJS TESTBINS TARGETS TARGETS_INSTALL APPLICATIONS TESTCASES BINFILES INSTALL INSTALLDIR INSTALLBIN INSTALLLIB INSTALLETC INSTALLMAN LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -866,6 +866,10 @@
   --enable-corefonts   Support X11 core fonts
   --disable-xfreetype     Don't use XFreeType for text rendering.
                           Requires --enable-i18n.
+  --enable-lookxp         Enable WinXP look themes (experimental)
+                          implies: --enable-mnuleftpixm --enable-btnoverpixm
+  --enable-mnuleftpixm    Enable pixmaps at left side in menus
+  --enable-btnoverpixm    Enable pixmap when the mouse is over buttons
   --enable-guievents      Enable GUI events (experimental)
   --disable-xinerama      Disable xinerama support
   --disable-x86-asm       Don't use optimized x86 assembly code
@@ -7146,7 +7150,7 @@
 /usr/openwin/share/include'
 
 if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Intrinsic.h.
+  # Guess where to find include files, by looking for Xlib.h.
   # First, try using that file with no special directory specified.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -7154,7 +7158,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -7181,7 +7185,7 @@
 sed 's/^/| /' conftest.$ac_ext >&5
 
   for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Intrinsic.h"; then
+  if test -r "$ac_dir/X11/Xlib.h"; then
     ac_x_includes=$ac_dir
     break
   fi
@@ -7202,11 +7206,11 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 int
 main ()
 {
-XtMalloc (0)
+XrmInitialize ()
   ;
   return 0;
 }
@@ -8441,8 +8445,8 @@
 
 
 if test x"$no_x" != x; then
-  { { echo "$as_me:$LINENO: error: X Window System not found" >&5
-echo "$as_me: error: X Window System not found" >&2;}
+  { { echo "$as_me:$LINENO: error: X Window System or development libraries not found. Make sure you have headers and libraries installed!" >&5
+echo "$as_me: error: X Window System or development libraries not found. Make sure you have headers and libraries installed!" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -10354,6 +10358,53 @@
 echo "${ECHO_T}no" >&6
 fi
 
+    if test "${XFT_CONFIG}" == ""; then
+      # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+      if test "${PKG_CONFIG}" != ""; then
+        ${PKG_CONFIG} xft 2>/dev/null
+        if test $? -eq 0 ; then
+          XFT_CONFIG='pkg-config xft'
+        fi
+      fi
+    fi
     if test "${XFT_CONFIG}" != ""; then
       XFT_CFLAGS=`${XFT_CONFIG} --cflags`
       XFT_LIBS=`${XFT_CONFIG} --libs`
@@ -10622,6 +10673,53 @@
     features="${features} corefonts"
   fi
 
+# Check whether --enable-lookxp or --disable-lookxp was given.
+if test "${enable_lookxp+set}" = set; then
+  enableval="$enable_lookxp"
+
+fi;
+  if test "$enable_lookxp" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CONFIG_LOOK_WINXP 1
+_ACEOF
+
+    features="${features} lookxp"
+    INSTALLXPTHEMES=yes
+
+    enable_mnuleftpixm=yes
+    enable_btnoverpixm=yes
+  fi
+# Check whether --enable-mnuleftpixm or --disable-mnuleftpixm was given.
+if test "${enable_mnuleftpixm+set}" = set; then
+  enableval="$enable_mnuleftpixm"
+
+fi;
+  if test "$enable_mnuleftpixm" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define MENU_LEFT_PIXMAPS 1
+_ACEOF
+
+    features="${features} mnuleftpixm"
+  fi
+# Check whether --enable-btnoverpixm or --disable-btnoverpixm was given.
+if test "${enable_btnoverpixm+set}" = set; then
+  enableval="$enable_btnoverpixm"
+
+fi;
+  if test "$enable_btnoverpixm" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define OVER_BUTTON_PIXMAPS 1
+_ACEOF
+
+    features="${features} btnoverpixm"
+  fi
+
+
+
+
 # Check whether --enable-guievents or --disable-guievents was given.
 if test "${enable_guievents+set}" = set; then
   enableval="$enable_guievents"
@@ -12135,6 +12233,44 @@
   exec_prefix="${ice_stored_exec_prefix}"
 
 
+  ice_stored_prefix="${prefix}"
+  test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
+
+  ice_stored_exec_prefix="${exec_prefix}"
+  test "${exec_prefix}" = "NONE" && exec_prefix="${prefix}"
+
+  MANDIR=`eval echo \""${mandir}"\"`
+
+  ice_previous_value=''
+  until test "${ice_previous_value}" = "${MANDIR}"; do
+    ice_previous_value="${MANDIR}"
+    MANDIR=`eval echo "${MANDIR}"`
+  done
+
+  prefix="${ice_stored_prefix}"
+  exec_prefix="${ice_stored_exec_prefix}"
+
+
+  ice_stored_prefix="${prefix}"
+  test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
+
+  ice_stored_exec_prefix="${exec_prefix}"
+  test "${exec_prefix}" = "NONE" && exec_prefix="${prefix}"
+
+  DATADIR=`eval echo \""${datadir}"\"`
+
+  ice_previous_value=''
+  until test "${ice_previous_value}" = "${DATADIR}"; do
+    ice_previous_value="${DATADIR}"
+    DATADIR=`eval echo "${DATADIR}"`
+  done
+
+  prefix="${ice_stored_prefix}"
+  exec_prefix="${ice_stored_exec_prefix}"
+
+
+
+
 
 
 
@@ -12186,6 +12322,8 @@
 
 INSTALLETC="${INSTALL_DATA}"
 
+INSTALLMAN="${INSTALL_DATA}"
+
 
           ac_config_commands="$ac_config_commands config.status"
 
@@ -12861,11 +12999,12 @@
 s,@NLS_POXFILES@,$NLS_POXFILES,;t t
 s,@NLS_MOFILES@,$NLS_MOFILES,;t t
 s,@XFT_CONFIG@,$XFT_CONFIG,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@INSTALLXPTHEMES@,$INSTALLXPTHEMES,;t t
 s,@ESD_CONFIG@,$ESD_CONFIG,;t t
 s,@IMLIB_CONFIG@,$IMLIB_CONFIG,;t t
 s,@MKFONTDIR@,$MKFONTDIR,;t t
 s,@GNOME1_CONFIG@,$GNOME1_CONFIG,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
 s,@GNOME_VER@,$GNOME_VER,;t t
 s,@CONFIG_GNOME1_MENU_DIR@,$CONFIG_GNOME1_MENU_DIR,;t t
 s,@CONFIG_GNOME2_MENU_DIR@,$CONFIG_GNOME2_MENU_DIR,;t t
@@ -12893,7 +13032,9 @@
 s,@LOCDIR@,$LOCDIR,;t t
 s,@KDEDIR@,$KDEDIR,;t t
 s,@DOCDIR@,$DOCDIR,;t t
+s,@MANDIR@,$MANDIR,;t t
 s,@GWMDIR@,$GWMDIR,;t t
+s,@DATADIR@,$DATADIR,;t t
 s,@BASEOBJS@,$BASEOBJS,;t t
 s,@BASEBINS@,$BASEBINS,;t t
 s,@TESTOBJS@,$TESTOBJS,;t t
@@ -12908,6 +13049,7 @@
 s,@INSTALLBIN@,$INSTALLBIN,;t t
 s,@INSTALLLIB@,$INSTALLLIB,;t t
 s,@INSTALLETC@,$INSTALLETC,;t t
+s,@INSTALLMAN@,$INSTALLMAN,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
@@ -13795,3 +13937,25 @@
   echo "$as_me:$LINENO: result:        DOCDIR: $ice_value" >&5
 echo "${ECHO_T}       DOCDIR: $ice_value" >&6
 )
+(
+
+  ice_stored_prefix="${prefix}"
+  test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
+
+  ice_stored_exec_prefix="${exec_prefix}"
+  test "${exec_prefix}" = "NONE" && exec_prefix="${prefix}"
+
+  ice_value=`eval echo \""$mandir"\"`
+
+  ice_previous_value=''
+  until test "${ice_previous_value}" = "${ice_value}"; do
+    ice_previous_value="${ice_value}"
+    ice_value=`eval echo "${ice_value}"`
+  done
+
+  prefix="${ice_stored_prefix}"
+  exec_prefix="${ice_stored_exec_prefix}"
+
+  echo "$as_me:$LINENO: result:        MANDIR: $ice_value" >&5
+echo "${ECHO_T}       MANDIR: $ice_value" >&6
+)
diff -Nuw --ignore-blank-lines icewm-1.2.30/icewm.spec icewm-1.2.30.LXP/icewm.spec
--- icewm-1.2.30/icewm.spec	2006-11-29 12:17:19.000000000 +0100
+++ icewm-1.2.30.LXP/icewm.spec	2006-12-22 17:54:43.000000000 +0100
@@ -1,13 +1,13 @@
 
 Name:		icewm
-Version:	1.2.30
-Release:	4
+Version:	1.2.30.LXP
+Release: 7
 Obsoletes:	icewm-common <= 1.2.2
 Summary:	Fast and small X11 window manager
 Group:		User Interface/Desktops
 License:	LGPL
 URL:		http://www.icewm.org/
-Packager:       Marko Macek <Marko.Macek@gmx.net>
+Packager:       LookXP (Manuel Carrasco) http://lxp.sourceforge.net
 Source:		http://ftp.sourceforge.net/icewm/%{name}-%{version}.tar.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
 
@@ -41,7 +41,8 @@
 Group:		%{group}
 Summary:        GNOME menu support for icewm (using gnome 2.x).
 Requires:       icewm > 1.2.2
-Requires:       gnome-libs >= 1.4
+Requires:       libgnome > 2.0.0
+Requires:       gnome-vfs2 > 2.0.0
 
 %description menu-gnome2
 GNOME 1.0 menu support for icewm (using gnome 2.x).
@@ -59,6 +60,8 @@
      --datadir=%{_datadir} \
      --sysconfdir=%{_sysconfdir} \
      --with-docdir=%{_docdir} \
+     --enable-lookxp --enable-mnuleftpixm --enable-btnoverpixm --enable-menus-gnome2 \
+     --enable-gradients --enable-antialiasing --enable-xfreetype --enable-i18n \
      %{?_with_menus_gnome2:--enable-menus-gnome2} \
      %{?_with_debug:--enable-debug}
   make
@@ -89,12 +92,19 @@
 %dir %{pkgdata}/taskbar
 %dir %{pkgdata}/themes
 
-%{_bindir}/*
+%{_bindir}/icehelp
+%{_bindir}/icesh
+%{_bindir}/icewm
+%{_bindir}/icewm-session
+%{_bindir}/icewmbg
+%{_bindir}/icewmhint
+%{_bindir}/icewmtray
+
 %{pkgdata}/icons/*
 %{pkgdata}/ledclock/*
 %{pkgdata}/mailbox/*
 %{pkgdata}/taskbar/*
-%{pkgdata}/themes/icedesert/*
+#%{pkgdata}/themes/icedesert/*
 
 %if %{?_with_menus_gnome2:1}%{!?_with_menus_gnome2:0}
 
@@ -108,26 +118,39 @@
 %{_datadir}/locale/*
 
 %files themes
-%dir %{pkgdata}/themes/nice
-%{pkgdata}/themes/nice/*
-%dir %{pkgdata}/themes/nice2
-%{pkgdata}/themes/nice2/*
-%dir %{pkgdata}/themes/gtk2
-%{pkgdata}/themes/gtk2/*
-%dir %{pkgdata}/themes/warp3
-%{pkgdata}/themes/warp3/*
-%dir %{pkgdata}/themes/warp4
-%{pkgdata}/themes/warp4/*
-%dir %{pkgdata}/themes/motif
-%{pkgdata}/themes/motif/*
-%dir %{pkgdata}/themes/win95
-%{pkgdata}/themes/win95/*
-%dir %{pkgdata}/themes/metal2
-%{pkgdata}/themes/metal2/*
-%dir %{pkgdata}/themes/Infadel2
-%{pkgdata}/themes/Infadel2/*
-%dir %{pkgdata}/themes/yellowmotif
-%{pkgdata}/themes/yellowmotif/*
+# %dir %{pkgdata}/themes/nice
+# %{pkgdata}/themes/nice/*
+# %dir %{pkgdata}/themes/nice2
+# %{pkgdata}/themes/nice2/*
+# %dir %{pkgdata}/themes/gtk2
+# %{pkgdata}/themes/gtk2/*
+# %dir %{pkgdata}/themes/warp3
+# %{pkgdata}/themes/warp3/*
+# %dir %{pkgdata}/themes/warp4
+# %{pkgdata}/themes/warp4/*
+# %dir %{pkgdata}/themes/motif
+# %{pkgdata}/themes/motif/*
+# %dir %{pkgdata}/themes/win95
+# %{pkgdata}/themes/win95/*
+# %dir %{pkgdata}/themes/metal2
+# %{pkgdata}/themes/metal2/*
+# %dir %{pkgdata}/themes/Infadel2
+# %{pkgdata}/themes/Infadel2/*
+# %dir %{pkgdata}/themes/yellowmotif
+# %{pkgdata}/themes/yellowmotif/*
+# %dir %{pkgdata}/themes/WinXP-Lite
+# %{pkgdata}/themes/WinXP-Lite/*
+%dir %{pkgdata}/themes/WinXP-Plain
+%{pkgdata}/themes/WinXP-Plain/*
+%dir %{pkgdata}/themes/WinXP-Blue
+%{pkgdata}/themes/WinXP-Blue/*
+%dir %{pkgdata}/themes/WinXP-Olive
+%{pkgdata}/themes/WinXP-Olive/*
+%dir %{pkgdata}/themes/WinXP-Silver
+%{pkgdata}/themes/WinXP-Silver/*
+%dir %{pkgdata}/themes/WinXP-Vista
+%{pkgdata}/themes/WinXP-Vista/*
+
 
 %changelog
 * Sun Feb 02 2003 Christian W. Zuckschwerdt <zany@triq.net>
