diff --git a/cde/programs/dtwm/README b/cde/programs/dtwm/README index 99daac37b..7b3be0960 100644 --- a/cde/programs/dtwm/README +++ b/cde/programs/dtwm/README @@ -80,9 +80,6 @@ header file include flags, and macros (e.g. ABS). MOTIF_DEFAULT_ICON Enables the default window icon with four buttons. - MOTIF_ONE_DOT_ONE - Enables compatibility with Motif 1.1 libraries. - NO Vestigal/experimental code for position help dialog (WmHelp.c). diff --git a/cde/programs/dtwm/WmCEvent.c b/cde/programs/dtwm/WmCEvent.c index 2e7eeb96f..af976c574 100644 --- a/cde/programs/dtwm/WmCEvent.c +++ b/cde/programs/dtwm/WmCEvent.c @@ -911,7 +911,6 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent) (buttonEvent->time == baseWinTime))) { -#ifndef MOTIF_ONE_DOT_ONE /* * Motif 1.2, ignore replayed events UNPOST_AND_REPLAY events * generated from the menu system (time stamps are exactly @@ -926,9 +925,6 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent) { ProcessClickBPress (buttonEvent, pCD, context, subContext); } -#else - ProcessClickBPress (buttonEvent, pCD, context, subContext); -#endif if (CheckForButtonAction (buttonEvent, context, subContext, pCD) && pCD) diff --git a/cde/programs/dtwm/WmEvent.c b/cde/programs/dtwm/WmEvent.c index 70d8a03ef..9a47d818d 100644 --- a/cde/programs/dtwm/WmEvent.c +++ b/cde/programs/dtwm/WmEvent.c @@ -91,9 +91,7 @@ int smAckState = SM_UNITIALIZED; extern FunctionTableEntry functionTable[]; extern int F_NOP_INDEX; -#ifndef MOTIF_ONE_DOT_ONE #include -#endif @@ -702,14 +700,9 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) { PopGadgetOut (pCD, FRAME_SYSTEM); } -#ifdef MOTIF_ONE_DOT_ONE - TraversalOn (pCD->systemMenuSpec); - doXtDispatchEvent = False; -#else _XmGetMenuState(XtParent(pCD->systemMenuSpec->menuWidget)) ->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time; doXtDispatchEvent = True; -#endif } else if ((!wmGD.clickData.pCD) && (((XButtonEvent *)event)->button == wmGD.clickData.button) && @@ -741,15 +734,10 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event) if (timeDiff < wmGD.doubleClickTime) { -#ifdef MOTIF_ONE_DOT_ONE - TraversalOn (wmGD.menuActive); - doXtDispatchEvent = False; -#else _XmGetMenuState (XtParent(wmGD.menuActive->menuWidget)) ->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time; doXtDispatchEvent = True; -#endif } wmGD.clickData.clickPending = False; } diff --git a/cde/programs/dtwm/WmGlobal.h b/cde/programs/dtwm/WmGlobal.h index 797e6c622..0315a9570 100644 --- a/cde/programs/dtwm/WmGlobal.h +++ b/cde/programs/dtwm/WmGlobal.h @@ -74,10 +74,6 @@ * Value definitions and macros: */ -#ifdef MOTIF_ONE_DOT_ONE -#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET" -#endif - extern int WmIdentity; /* diff --git a/cde/programs/dtwm/WmIDecor.c b/cde/programs/dtwm/WmIDecor.c index 0754e7394..726f7251b 100644 --- a/cde/programs/dtwm/WmIDecor.c +++ b/cde/programs/dtwm/WmIDecor.c @@ -1242,7 +1242,6 @@ void ShowActiveIcon (ClientData *pcd) if ((!ACTIVE_PSD->useIconBox) || (P_ICON_BOX(pcd) == NULL)) { -#ifndef MOTIF_ONE_DOT_ONE if (ICON_DECORATION(pcd) & ICON_IMAGE_PART) { Dimension dheight, dwidth; @@ -1281,9 +1280,6 @@ void ShowActiveIcon (ClientData *pcd) (unsigned int) ICON_WIDTH(pcd), (unsigned int) ICON_HEIGHT(pcd), False); } -#else - XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd)); -#endif } else { @@ -1314,11 +1310,7 @@ void ShowActiveIcon (ClientData *pcd) } /* simulate exposure of window */ -#ifndef MOTIF_ONE_DOT_ONE IconExposureProc(pcd, False); -#else - IconExposureProc(pcd, True); -#endif } @@ -1387,7 +1379,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh) if ((!ACTIVE_PSD->useIconBox) || (P_ICON_BOX(pcd) == NULL)) { -#ifndef MOTIF_ONE_DOT_ONE XmeClearBorder (DISPLAY, ICON_FRAME_WIN(pcd), 0, 0, ICON_WIDTH(pcd), ICON_IMAGE_HEIGHT(pcd), 4); @@ -1397,9 +1388,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh) 0, ICON_IMAGE_HEIGHT(pcd), (unsigned int) ICON_WIDTH(pcd), (unsigned int) ICON_HEIGHT(pcd), False); -#else - XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd)); -#endif } else { @@ -1417,11 +1405,7 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh) /* simulate exposure of window */ -#ifndef MOTIF_ONE_DOT_ONE IconExposureProc(pcd, False); -#else - IconExposureProc(pcd, True); -#endif } } diff --git a/cde/programs/dtwm/WmIconBox.c b/cde/programs/dtwm/WmIconBox.c index beb24764b..1335e37a5 100644 --- a/cde/programs/dtwm/WmIconBox.c +++ b/cde/programs/dtwm/WmIconBox.c @@ -470,10 +470,8 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD) pIBD->frameWidget, (ArgList)setArgs, i); -#ifndef MOTIF_ONE_DOT_ONE XtAddCallback(pIBD->scrolledWidget, XmNtraverseObscuredCallback, (XtCallbackProc) IconScrollVisibleCallback, (caddr_t)NULL); -#endif XtAddEventHandler(pIBD->scrolledWidget, StructureNotifyMask, @@ -3101,8 +3099,6 @@ void ShowClientIconState (ClientData *pCD, int newState) } /* END FUNCTION ShowClientIconState */ - -#ifndef MOTIF_ONE_DOT_ONE /*************************************<->************************************* * * IconScrollVisibleCallback @@ -3128,9 +3124,7 @@ void IconScrollVisibleCallback (Widget w, caddr_t client_data, XmAnyCallbackStru */ } /* END OF FUNCTION IconScrollVisibleCallback */ -#endif - /*************************************<->************************************* * * IconActivateCallback diff --git a/cde/programs/dtwm/WmIconBox.h b/cde/programs/dtwm/WmIconBox.h index 12729a805..53ba736f4 100644 --- a/cde/programs/dtwm/WmIconBox.h +++ b/cde/programs/dtwm/WmIconBox.h @@ -52,10 +52,8 @@ extern void HandleIconBoxButtonMotion (Widget icon, caddr_t client_data, XEvent *pev); extern void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy, XKeyEvent *keyEvent); -#ifndef MOTIF_ONE_DOT_ONE extern void IconScrollVisibleCallback (Widget w, caddr_t client_data, XmAnyCallbackStruct *call_data); -#endif extern void IconActivateCallback (Widget w, caddr_t client_data, XmAnyCallbackStruct *call_data); extern void IconBoxPopUp (WmWorkspaceData *pWS, Boolean up); diff --git a/cde/programs/dtwm/WmImage.c b/cde/programs/dtwm/WmImage.c index d449c6da0..15f5ee119 100644 --- a/cde/programs/dtwm/WmImage.c +++ b/cde/programs/dtwm/WmImage.c @@ -39,18 +39,12 @@ #define MWM_NEED_IIMAGE #include "WmIBitmap.h" -#ifdef MOTIF_ONE_DOT_ONE -#include -#include -#define MATCH_CHAR 'P' /* Default match character - defined in Xmos.p */ -#else #include /* Copied from XmosI.h */ extern String _XmOSInitPath( String file_name, String env_pathname, Boolean *user_path) ; -#endif #include #include
@@ -68,11 +62,6 @@ extern String _XmOSInitPath( #include "WmMenu.h" #include "WmError.h" -#ifdef MOTIF_ONE_DOT_ONE -extern char *getenv (); -#endif - - /******************************<->************************************* * * MakeClientIconPixmap (pCD, iconBitmap, iconMask) @@ -982,9 +971,7 @@ char *BitmapPathName (string) static char fileName[MAXWMPATH+1]; char *retname; SubstitutionRec subs[1]; -#ifndef MOTIF_ONE_DOT_ONE char *homeDir = XmeGetHomeDirName(); -#endif if (!string || !*string) { @@ -1004,11 +991,7 @@ char *BitmapPathName (string) * Handle "~/.." */ { -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(fileName); -#else strcpy (fileName, homeDir); -#endif strncat (fileName, &(string[1]), MAXWMPATH - strlen (fileName)); return (fileName); } @@ -1026,11 +1009,7 @@ char *BitmapPathName (string) if ((wmGD.bitmapDirectory[0] == '~') && (wmGD.bitmapDirectory[1] == '/')) { -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(fileName); -#else strcpy (fileName, homeDir); -#endif strncat (fileName, &wmGD.bitmapDirectory[1], MAXWMPATH - strlen (fileName)); } else { @@ -1051,9 +1030,6 @@ char *BitmapPathName (string) /* Fall back on a path search */ -#ifdef MOTIF_ONE_DOT_ONE - return (NULL); -#else { char *search_path; Boolean user_path; @@ -1073,7 +1049,6 @@ char *BitmapPathName (string) XtFree(retname); return (fileName); } -#endif } /* END OF FUNCTION BitmapPathName */ diff --git a/cde/programs/dtwm/WmResCvt.c b/cde/programs/dtwm/WmResCvt.c index 0dbc2195b..7253828e9 100644 --- a/cde/programs/dtwm/WmResCvt.c +++ b/cde/programs/dtwm/WmResCvt.c @@ -43,9 +43,7 @@ #include #endif -#ifndef MOTIF_ONE_DOT_ONE #include -#endif /* * include extern functions diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index eed207a1b..f2692743a 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -70,12 +70,7 @@ #include #endif -#ifdef MOTIF_ONE_DOT_ONE -#include -#include -#else #include /* for XmeGetHomeDirName */ -#endif #include /* maximum string lengths */ @@ -108,9 +103,6 @@ #include "WmImage.h" #include "WmXSMP.h" -#ifdef MOTIF_ONE_DOT_ONE -extern char *getenv (); -#endif # include # ifdef X_NOT_STDC_ENV extern int errno; @@ -198,9 +190,6 @@ typedef struct _CCIFuncArg { } CCIFuncArg; #endif /* defined(MWM_QATS_PROTOCOL) */ -#ifdef MOTIF_ONE_DOT_ONE -void GetHomeDirName(String fileName); -#endif static String GetNetworkFileName (char *pchFile); #if (defined(MWM_QATS_PROTOCOL)) static MenuItem *MakeSeparatorTemplate (int); @@ -1627,62 +1616,6 @@ unsigned int PeekAhead(unsigned char *currentChar, } /* END OF FUNCTION PeekAhead */ - - -#ifdef MOTIF_ONE_DOT_ONE -/*************************************<->************************************* - * - * GetHomeDirName (fileName) - * - * Description: - * ----------- - * This function finds the "HOME" directory - * - * - * Inputs: - * ------ - * fileName - * - * Outputs: - * ------- - * fileName - * - * Comments: - * -------- - * - *************************************<->***********************************/ -void GetHomeDirName(String fileName) -{ - int uid; - struct passwd *pw; - char *ptr = NULL; - - if((ptr = getenv("HOME")) == NULL) - { - if((ptr = getenv("USER")) != NULL) - { - pw = getpwnam(ptr); - } - else - { - uid = getuid(); - pw = getpwuid(uid); - } - - if (pw) - { - ptr = pw->pw_dir; - } - else - { - ptr = ""; - } - } - strcpy(fileName, ptr); -} -#endif - - /*************************************<->************************************* * * SyncModifierStrings (fileName) @@ -1986,9 +1919,7 @@ FILE *FopenConfigFile (void) char *LANG, *LANGp; FILE *fileP; -#ifndef MOTIF_ONE_DOT_ONE char *homeDir = XmeGetHomeDirName(); -#endif Boolean stackPushed; /* @@ -2040,11 +1971,7 @@ FILE *FopenConfigFile (void) if ((wmGD.configFile[0] == '~') && (wmGD.configFile[1] == '/')) /* handle "~/..." */ { -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(cfileName); -#else strcpy (cfileName, homeDir); -#endif if (LANG != NULL) { strncat(cfileName, "/", MAXWMPATH-strlen(cfileName)); @@ -2063,11 +1990,7 @@ FILE *FopenConfigFile (void) /* * Just try $HOME/.mwmrc */ -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(cfileName); -#else strcpy (cfileName, homeDir); -#endif strncat(cfileName, &(wmGD.configFile[1]), MAXWMPATH-strlen(cfileName)); if ((fileP = fopen (cfileName, "r")) != NULL) @@ -2123,11 +2046,7 @@ FILE *FopenConfigFile (void) #define HOME_MWMRC "/.mwmrc" #define SLASH_MWMRC "/system.mwmrc" -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(cfileName); -#else strcpy (cfileName, homeDir); -#endif if (MwmBehavior) { @@ -2176,11 +2095,7 @@ FILE *FopenConfigFile (void) /* * Just try $HOME/.mwmrc */ -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(cfileName); -#else - strcpy (cfileName, homeDir); -#endif + strcpy (cfileName, homeDir); if (MwmBehavior) { /* @@ -6342,62 +6257,16 @@ void ProcessMotifBindings (void) { char fileName[MAXWMPATH+1]; char *bindings = NULL; -#ifndef MOTIF_ONE_DOT_ONE char *homeDir = XmeGetHomeDirName(); -#else - FILE *fileP; -#endif /* * Look in the user's home directory for .motifbind */ -#ifdef MOTIF_ONE_DOT_ONE - GetHomeDirName(fileName); -#else strcpy (fileName, homeDir); -#endif strncat(fileName, "/", MAXWMPATH-strlen(fileName)); strncat(fileName, MOTIF_BINDINGS_FILE, MAXWMPATH-strlen(fileName)); -#ifdef MOTIF_ONE_DOT_ONE - if ((fileP = fopen (fileName, "r")) != NULL) - { - unsigned char buffer[MBBSIZ]; - int count; - Boolean first = True; - int mode = PropModeReplace; - Window propWindow; - - /* - * Get the atom for the property. - */ - wmGD.xa_MOTIF_BINDINGS = - XInternAtom (DISPLAY, _XA_MOTIF_BINDINGS, False); - - /* - * The property goes on the root window of screen zero - */ - propWindow = RootWindow(DISPLAY, 0); - - /* - * Copy file contents to property on root window of screen 0. - */ - while ( (count=fread((char *) &buffer[0], 1, MBBSIZ, fileP)) > 0) - { - XChangeProperty (DISPLAY, propWindow, wmGD.xa_MOTIF_BINDINGS, - XA_STRING, 8, mode, - &buffer[0], count); - - if (first) - { - first = False; - mode = PropModeAppend; - } - } - } - -#else XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0), XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False)); XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0), @@ -6413,7 +6282,6 @@ void ProcessMotifBindings (void) _XmVirtKeysLoadFallbackBindings (DISPLAY, &bindings); } XtFree (bindings); -#endif } /* END OF FUNCTION ProcessMotifBindings */ diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index 422218d5f..4db52965b 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -48,9 +48,7 @@ #include #include -#ifndef MOTIF_ONE_DOT_ONE #include /* for XmGetXmScreen and screen.moveOpaque */ -#endif /* * include extern functions @@ -4704,10 +4702,8 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName) wmScreenResources, XtNumber (wmScreenResources), NULL, 0); -#ifndef MOTIF_ONE_DOT_ONE pSD->moveOpaque = (((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW))) -> screen.moveOpaque); -#endif } diff --git a/cde/programs/dtwm/WmWinInfo.c b/cde/programs/dtwm/WmWinInfo.c index 167873393..46168164a 100644 --- a/cde/programs/dtwm/WmWinInfo.c +++ b/cde/programs/dtwm/WmWinInfo.c @@ -2129,12 +2129,10 @@ WmICCCMToXmString (XTextProperty *wmNameProp) switch (status) { case XConverterNotFound: -#ifndef MOTIF_ONE_DOT_ONE sprintf(msg, GETMESSAGE (70,5, "Window manager cannot convert property %.100s as clientTitle/iconTitle: XmbTextPropertyToTextList"), XGetAtomName (DISPLAY,wmNameProp->encoding)); Warning(msg); -#endif /* MOTIF_ONE_DOT_ONE */ break; case XNoMemory: