diff --git a/configure.ac b/configure.ac index 6b866fec..7bb4e40a 100644 --- a/configure.ac +++ b/configure.ac @@ -372,18 +372,6 @@ dnl vdesktop_on=yes dnl fi]) -dnl -dnl Disable some stuff that are duplicated in kde -dnl --------------------------------------------- -AC_ARG_ENABLE(lite, - [ --enable-lite disable some stuff (dont use it) ], - [if test x$enableval = xyes; then - LITE=yes - AC_DEFINE(LITE, 1, [define if you want the 'lite' version]) - AC_SUBST(LITE) - fi]) - - dnl dnl Beautify compilation messages dnl --------------------------------------------- diff --git a/src/actions.h b/src/actions.h index 1974e4b0..1674dc83 100644 --- a/src/actions.h +++ b/src/actions.h @@ -42,9 +42,7 @@ void wUnshadeWindow(WWindow *wwin); void wIconifyWindow(WWindow *wwin); void wDeiconifyWindow(WWindow *wwin); -#ifndef LITE void wSelectWindows(WScreen *scr, XEvent *ev); -#endif void wSelectWindow(WWindow *wwin, Bool flag); void wUnselectWindows(WScreen *scr); diff --git a/src/defaults.c b/src/defaults.c index 1d4b107a..cd2ae25c 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -547,12 +547,10 @@ WDefaultEntry optionList[] = { {"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences, NULL, getPropList, setSwPOptions}, /* keybindings */ -#ifndef LITE {"RootMenuKey", "None", (void *)WKBD_ROOTMENU, NULL, getKeybind, setKeyGrab}, {"WindowListKey", "None", (void *)WKBD_WINDOWLIST, NULL, getKeybind, setKeyGrab}, -#endif /* LITE */ {"WindowMenuKey", "None", (void *)WKBD_WINDOWMENU, NULL, getKeybind, setKeyGrab}, {"ClipLowerKey", "None", (void *)WKBD_CLIPLOWER, @@ -1104,7 +1102,7 @@ void wDefaultsCheckDomains(void) WMReleasePropList(shared_dict); } } -#ifndef LITE + if (stat(WDRootMenu->path, &stbuf) >= 0 && WDRootMenu->timestamp < stbuf.st_mtime) { dict = WMReadPropListFromFile(WDRootMenu->path); #ifdef HEARTBEAT @@ -1128,8 +1126,6 @@ void wDefaultsCheckDomains(void) } WDRootMenu->timestamp = stbuf.st_mtime; } -#endif /* !LITE */ - } void wReadDefaults(WScreen * scr, WMPropList * new_dict) diff --git a/src/event.c b/src/event.c index ee5e8f20..2069ee50 100644 --- a/src/event.c +++ b/src/event.c @@ -744,7 +744,6 @@ static void handleButtonPress(XEvent * event) wBalloonHide(scr); #endif -#ifndef LITE if (event->xbutton.window == scr->root_win) { if (event->xbutton.button == Button1 && wPreferences.mouse_button1 != WA_NONE) { executeButtonAction(scr, event, wPreferences.mouse_button1); @@ -758,7 +757,6 @@ static void handleButtonPress(XEvent * event) wWorkspaceRelativeChange(scr, -1); } } -#endif /* !LITE */ desc = NULL; if (XFindContext(dpy, event->xbutton.subwindow, wWinContext, (XPointer *) & desc) == XCNOENT) { @@ -1360,14 +1358,8 @@ static void handleKeyPress(XEvent * event) } if (command < 0) { -#ifdef LITE - { -#if 0 - } -#endif -#else + if (!wRootMenuPerformShortcut(event)) { -#endif static int dontLoop = 0; if (dontLoop > 10) { @@ -1390,7 +1382,7 @@ static void handleKeyPress(XEvent * event) #define ISFOCUSED(w) ((w) && (w)->flags.focused) switch (command) { -#ifndef LITE + case WKBD_ROOTMENU: /*OpenRootMenu(scr, event->xkey.x_root, event->xkey.y_root, True); */ if (!CheckFullScreenWindowFocused(scr)) { @@ -1406,7 +1398,7 @@ static void handleKeyPress(XEvent * event) True); } break; -#endif /* !LITE */ + case WKBD_WINDOWMENU: if (ISMAPPED(wwin) && ISFOCUSED(wwin)) OpenWindowMenu(wwin, wwin->frame_x, wwin->frame_y + wwin->frame->top_width, True); diff --git a/src/funcs.h b/src/funcs.h index 0e4fb886..c900976a 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -44,9 +44,6 @@ void SetupEnvironment(WScreen *scr); void DispatchEvent(XEvent *event); -#ifdef LITE -#define UpdateSwitchMenu(a,b,c) -#else void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action); Bool wRootMenuPerformShortcut(XEvent *event); @@ -59,10 +56,6 @@ void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard); void InitializeSwitchMenu(void); -#endif /* !LITE */ - - - void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard); void OpenMiniwindowMenu(WWindow *wwin, int x, int y); diff --git a/src/menu.c b/src/menu.c index a8656816..2076e755 100644 --- a/src/menu.c +++ b/src/menu.c @@ -32,9 +32,7 @@ #include #include #include -#if 0 -#include -#endif + #include "WindowMaker.h" #include "wcore.h" #include "framewin.h" @@ -81,19 +79,12 @@ MENU_SCROLL_STEPS_US, MENU_SCROLL_DELAY_US}}; static void menuMouseDown(WObjDescriptor * desc, XEvent * event); static void menuExpose(WObjDescriptor * desc, XEvent * event); - static void menuTitleDoubleClick(WCoreWindow * sender, void *data, XEvent * event); static void menuTitleMouseDown(WCoreWindow * sender, void *data, XEvent * event); - static void menuCloseClick(WCoreWindow * sender, void *data, XEvent * event); - static void updateTexture(WMenu * menu); - -#ifndef LITE static int saveMenuRecurs(WMPropList * menus, WScreen * scr, WMenu * menu); static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, char *path); -#endif /* !LITE */ - static void selectEntry(WMenu * menu, int entry_no); static void closeCascade(WMenu * menu); @@ -2332,7 +2323,6 @@ void wMenuSaveState(WScreen * scr) menus = WMCreatePLDictionary(NULL, NULL); -#ifndef LITE if (scr->switch_menu && scr->switch_menu->flags.buttoned) { key = WMCreatePLString("SwitchMenu"); saveMenuInfo(menus, scr->switch_menu, key); @@ -2343,7 +2333,6 @@ void wMenuSaveState(WScreen * scr) if (saveMenuRecurs(menus, scr, scr->root_menu)) save_menus = 1; -#endif /* !LITE */ if (scr->workspace_menu && scr->workspace_menu->flags.buttoned) { key = WMCreatePLString("WorkspaceMenu"); saveMenuInfo(menus, scr->workspace_menu, key); @@ -2359,8 +2348,6 @@ void wMenuSaveState(WScreen * scr) WMReleasePropList(menus); } -#ifndef LITE - static Bool getMenuPath(WMenu * menu, char *buffer, int bufSize) { Bool ok = True; @@ -2416,7 +2403,6 @@ static Bool saveMenuRecurs(WMPropList * menus, WScreen * scr, WMenu * menu) } return save_menus; } -#endif /* !LITE */ #define COMPLAIN(key) wwarning(_("bad value in menus state info: %s"), key) @@ -2461,12 +2447,10 @@ static int restoreMenu(WScreen * scr, WMPropList * menu, int which) if (!getMenuInfo(menu, &x, &y, &lowered)) return False; -#ifndef LITE if (which & WSS_SWITCHMENU) { OpenSwitchMenu(scr, x, y, False); pmenu = scr->switch_menu; } -#endif /* !LITE */ if (pmenu) { int width = MENUW(pmenu); @@ -2494,7 +2478,6 @@ static int restoreMenu(WScreen * scr, WMPropList * menu, int which) return False; } -#ifndef LITE static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, char *path) { WMPropList *key, *entry; @@ -2557,7 +2540,6 @@ static int restoreMenuRecurs(WScreen * scr, WMPropList * menus, WMenu * menu, ch return res; } -#endif /* !LITE */ void wMenuRestoreState(WScreen * scr) { @@ -2581,13 +2563,11 @@ void wMenuRestoreState(WScreen * scr) WMReleasePropList(skey); restoreMenu(scr, menu, WSS_SWITCHMENU); -#ifndef LITE if (!scr->root_menu) { OpenRootMenu(scr, scr->scr_width * 2, 0, False); wMenuUnmap(scr->root_menu); } restoreMenuRecurs(scr, menus, scr->root_menu, ""); -#endif /* !LITE */ } void OpenWorkspaceMenu(WScreen * scr, int x, int y) @@ -2595,12 +2575,11 @@ void OpenWorkspaceMenu(WScreen * scr, int x, int y) WMenu *menu, *parent; WMenuEntry *entry; -#ifndef LITE if (!scr->root_menu) { OpenRootMenu(scr, scr->scr_width * 2, 0, False); wMenuUnmap(scr->root_menu); } -#endif + menu = scr->workspace_menu; if (menu) { if (menu->flags.mapped) { diff --git a/src/moveres.c b/src/moveres.c index b0d4a467..86193ee8 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -2123,7 +2123,6 @@ void wUnselectWindows(WScreen * scr) scr->selected_windows = NULL; } -#ifndef LITE static void selectWindowsInside(WScreen * scr, int x1, int y1, int x2, int y2) { WWindow *tmpw; @@ -2212,7 +2211,6 @@ void wSelectWindows(WScreen * scr, XEvent * ev) } } } -#endif /* !LITE */ void InteractivePlaceWindow(WWindow * wwin, int *x_ret, int *y_ret, unsigned width, unsigned height) { diff --git a/src/rootmenu.c b/src/rootmenu.c index 6a0b920a..f3a521f4 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -23,8 +23,6 @@ #include "wconfig.h" -#ifndef LITE - #include #include #include @@ -1771,5 +1769,3 @@ void OpenRootMenu(WScreen * scr, int x, int y, int keyboard) if (scr->flags.root_menu_changed_shortcuts) rebindKeygrabs(scr); } - -#endif /* !LITE */ diff --git a/src/screen.c b/src/screen.c index e4d8cf28..e359dcb1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -63,19 +63,12 @@ #include "defaults.h" -#ifdef LITE -#define EVENT_MASK (LeaveWindowMask|EnterWindowMask|PropertyChangeMask\ - |SubstructureNotifyMask|PointerMotionMask \ - |SubstructureRedirectMask|KeyPressMask|KeyReleaseMask) -#else #define EVENT_MASK (LeaveWindowMask|EnterWindowMask|PropertyChangeMask\ |SubstructureNotifyMask|PointerMotionMask \ |SubstructureRedirectMask|ButtonPressMask|ButtonReleaseMask\ |KeyPressMask|KeyReleaseMask) -#endif /**** Global variables ****/ - extern Cursor wCursor[WCUR_LAST]; extern WPreferences wPreferences; extern Atom _XA_WINDOWMAKER_STATE; @@ -90,7 +83,6 @@ extern int wXkbSupported; extern WDDomain *WDWindowMaker; /**** Local ****/ - #define STIPPLE_WIDTH 2 #define STIPPLE_HEIGHT 2 static char STIPPLE_DATA[] = { 0x02, 0x01 }; @@ -960,10 +952,8 @@ void wScreenRestoreState(WScreen * scr) WMPropList *state; char *path; -#ifndef LITE OpenRootMenu(scr, -10000, -10000, False); wMenuUnmap(scr->root_menu); -#endif make_keys(); diff --git a/src/screen.h b/src/screen.h index 03f74f4a..2f0099f0 100644 --- a/src/screen.h +++ b/src/screen.h @@ -28,7 +28,6 @@ #include - #define WTB_LEFT 0 #define WTB_RIGHT 1 @@ -38,7 +37,6 @@ #define WTB_MENU 6 - typedef struct { WMRect *screens; int count; /* screen count, 0 = inactive */ @@ -216,10 +214,8 @@ typedef struct _WScreen { struct WPixmap *menu_shade_indicator; /* for shaded window */ int app_menu_x, app_menu_y; /* position for application menus */ -#ifndef LITE struct WMenu *root_menu; /* root window menu */ struct WMenu *switch_menu; /* window list menu */ -#endif struct WMenu *workspace_menu; /* workspace operation */ struct WMenu *window_menu; /* window command menu */ struct WMenu *icon_menu; /* icon/appicon menu */ diff --git a/src/startup.c b/src/startup.c index 3550afe6..013845e8 100644 --- a/src/startup.c +++ b/src/startup.c @@ -776,9 +776,7 @@ void StartUp(Bool defaultScreenOnly) wScreenCount++; } -#ifndef LITE InitializeSwitchMenu(); -#endif /* initialize/restore state for the screens */ for (j = 0; j < wScreenCount; j++) { diff --git a/src/switchmenu.c b/src/switchmenu.c index 52a599b4..8a11701c 100644 --- a/src/switchmenu.c +++ b/src/switchmenu.c @@ -22,8 +22,6 @@ #include "wconfig.h" -#ifndef LITE - #include #include #include @@ -424,5 +422,3 @@ static void wsobserver(void *self, WMNotification * notif) } } - -#endif /* !LITE */ diff --git a/src/window.c b/src/window.c index 77b02156..cb9b81ba 100644 --- a/src/window.c +++ b/src/window.c @@ -2653,9 +2653,7 @@ void wWindowSetKeyGrabs(WWindow * wwin) wwin->frame->core->window, True, GrabModeAsync, GrabModeAsync); } -#ifndef LITE wRootMenuBindShortcuts(wwin->frame->core->window); -#endif } void wWindowResetMouseGrabs(WWindow * wwin) diff --git a/util/Makefile.am b/util/Makefile.am index 2a080e9b..b597a580 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -65,7 +65,6 @@ wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile -e "s|#sysconfdir#|$(sysconfdir)/WindowMaker|" \ -e "s|#version#|$(VERSION)|" \ -e "s|#bindir#|$(bindir)|" \ - -e "s|#LITE#|@LITE@|" \ $(srcdir)/wmaker.inst.in >wmaker.inst chmod 755 wmaker.inst