1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtwm: Remove define MOTIF_ONE_DOT_ONE, backwards compatibility for motif 1.1, CDE as a whole requires 2.1

This commit is contained in:
Peter Howkins 2018-06-20 01:11:17 +01:00
parent 9a551dd8a6
commit d5273f121b
12 changed files with 1 additions and 213 deletions

View file

@ -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).

View file

@ -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)

View file

@ -91,9 +91,7 @@ int smAckState = SM_UNITIALIZED;
extern FunctionTableEntry functionTable[];
extern int F_NOP_INDEX;
#ifndef MOTIF_ONE_DOT_ONE
#include <Xm/MenuShellP.h>
#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;
}

View file

@ -74,10 +74,6 @@
* Value definitions and macros:
*/
#ifdef MOTIF_ONE_DOT_ONE
#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET"
#endif
extern int WmIdentity;
/*

View file

@ -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
}
}

View file

@ -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

View file

@ -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);

View file

@ -39,18 +39,12 @@
#define MWM_NEED_IIMAGE
#include "WmIBitmap.h"
#ifdef MOTIF_ONE_DOT_ONE
#include <stdio.h>
#include <pwd.h>
#define MATCH_CHAR 'P' /* Default match character - defined in Xmos.p */
#else
#include <Xm/XmosP.h>
/* Copied from XmosI.h */
extern String _XmOSInitPath(
String file_name,
String env_pathname,
Boolean *user_path) ;
#endif
#include <Xm/IconFile.h>
#include <Dt/GetDispRes.h>
@ -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 */

View file

@ -43,9 +43,7 @@
#include <stdlib.h>
#endif
#ifndef MOTIF_ONE_DOT_ONE
#include <Xm/XmosP.h>
#endif
/*
* include extern functions

View file

@ -70,12 +70,7 @@
#include <stdlib.h>
#endif
#ifdef MOTIF_ONE_DOT_ONE
#include <stdio.h>
#include <pwd.h>
#else
#include <Xm/XmP.h> /* for XmeGetHomeDirName */
#endif
#include <signal.h>
/* maximum string lengths */
@ -108,9 +103,6 @@
#include "WmImage.h"
#include "WmXSMP.h"
#ifdef MOTIF_ONE_DOT_ONE
extern char *getenv ();
#endif
# include <errno.h>
# 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 */

View file

@ -48,9 +48,7 @@
#include <Xm/XmP.h>
#include <Xm/RowColumn.h>
#ifndef MOTIF_ONE_DOT_ONE
#include <Xm/ScreenP.h> /* 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
}

View file

@ -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: