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:
parent
9a551dd8a6
commit
d5273f121b
12 changed files with 1 additions and 213 deletions
|
@ -80,9 +80,6 @@ header file include flags, and macros (e.g. ABS).
|
||||||
MOTIF_DEFAULT_ICON
|
MOTIF_DEFAULT_ICON
|
||||||
Enables the default window icon with four buttons.
|
Enables the default window icon with four buttons.
|
||||||
|
|
||||||
MOTIF_ONE_DOT_ONE
|
|
||||||
Enables compatibility with Motif 1.1 libraries.
|
|
||||||
|
|
||||||
NO
|
NO
|
||||||
Vestigal/experimental code for position help dialog (WmHelp.c).
|
Vestigal/experimental code for position help dialog (WmHelp.c).
|
||||||
|
|
||||||
|
|
|
@ -911,7 +911,6 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent)
|
||||||
(buttonEvent->time == baseWinTime)))
|
(buttonEvent->time == baseWinTime)))
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
/*
|
/*
|
||||||
* Motif 1.2, ignore replayed events UNPOST_AND_REPLAY events
|
* Motif 1.2, ignore replayed events UNPOST_AND_REPLAY events
|
||||||
* generated from the menu system (time stamps are exactly
|
* generated from the menu system (time stamps are exactly
|
||||||
|
@ -926,9 +925,6 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent)
|
||||||
{
|
{
|
||||||
ProcessClickBPress (buttonEvent, pCD, context, subContext);
|
ProcessClickBPress (buttonEvent, pCD, context, subContext);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ProcessClickBPress (buttonEvent, pCD, context, subContext);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CheckForButtonAction (buttonEvent, context, subContext, pCD)
|
if (CheckForButtonAction (buttonEvent, context, subContext, pCD)
|
||||||
&& pCD)
|
&& pCD)
|
||||||
|
|
|
@ -91,9 +91,7 @@ int smAckState = SM_UNITIALIZED;
|
||||||
extern FunctionTableEntry functionTable[];
|
extern FunctionTableEntry functionTable[];
|
||||||
extern int F_NOP_INDEX;
|
extern int F_NOP_INDEX;
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
#include <Xm/MenuShellP.h>
|
#include <Xm/MenuShellP.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -702,14 +700,9 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
|
||||||
{
|
{
|
||||||
PopGadgetOut (pCD, FRAME_SYSTEM);
|
PopGadgetOut (pCD, FRAME_SYSTEM);
|
||||||
}
|
}
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
TraversalOn (pCD->systemMenuSpec);
|
|
||||||
doXtDispatchEvent = False;
|
|
||||||
#else
|
|
||||||
_XmGetMenuState(XtParent(pCD->systemMenuSpec->menuWidget))
|
_XmGetMenuState(XtParent(pCD->systemMenuSpec->menuWidget))
|
||||||
->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time;
|
->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time;
|
||||||
doXtDispatchEvent = True;
|
doXtDispatchEvent = True;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if ((!wmGD.clickData.pCD) &&
|
else if ((!wmGD.clickData.pCD) &&
|
||||||
(((XButtonEvent *)event)->button == wmGD.clickData.button) &&
|
(((XButtonEvent *)event)->button == wmGD.clickData.button) &&
|
||||||
|
@ -741,15 +734,10 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
|
||||||
|
|
||||||
if (timeDiff < wmGD.doubleClickTime)
|
if (timeDiff < wmGD.doubleClickTime)
|
||||||
{
|
{
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
TraversalOn (wmGD.menuActive);
|
|
||||||
doXtDispatchEvent = False;
|
|
||||||
#else
|
|
||||||
_XmGetMenuState (XtParent(wmGD.menuActive->menuWidget))
|
_XmGetMenuState (XtParent(wmGD.menuActive->menuWidget))
|
||||||
->MS_LastManagedMenuTime =
|
->MS_LastManagedMenuTime =
|
||||||
((XButtonEvent *)event)->time;
|
((XButtonEvent *)event)->time;
|
||||||
doXtDispatchEvent = True;
|
doXtDispatchEvent = True;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
wmGD.clickData.clickPending = False;
|
wmGD.clickData.clickPending = False;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,10 +74,6 @@
|
||||||
* Value definitions and macros:
|
* Value definitions and macros:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int WmIdentity;
|
extern int WmIdentity;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1242,7 +1242,6 @@ void ShowActiveIcon (ClientData *pcd)
|
||||||
if ((!ACTIVE_PSD->useIconBox) ||
|
if ((!ACTIVE_PSD->useIconBox) ||
|
||||||
(P_ICON_BOX(pcd) == NULL))
|
(P_ICON_BOX(pcd) == NULL))
|
||||||
{
|
{
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
if (ICON_DECORATION(pcd) & ICON_IMAGE_PART)
|
if (ICON_DECORATION(pcd) & ICON_IMAGE_PART)
|
||||||
{
|
{
|
||||||
Dimension dheight, dwidth;
|
Dimension dheight, dwidth;
|
||||||
|
@ -1281,9 +1280,6 @@ void ShowActiveIcon (ClientData *pcd)
|
||||||
(unsigned int) ICON_WIDTH(pcd),
|
(unsigned int) ICON_WIDTH(pcd),
|
||||||
(unsigned int) ICON_HEIGHT(pcd), False);
|
(unsigned int) ICON_HEIGHT(pcd), False);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1314,11 +1310,7 @@ void ShowActiveIcon (ClientData *pcd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* simulate exposure of window */
|
/* simulate exposure of window */
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
IconExposureProc(pcd, False);
|
IconExposureProc(pcd, False);
|
||||||
#else
|
|
||||||
IconExposureProc(pcd, True);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1387,7 +1379,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
|
||||||
if ((!ACTIVE_PSD->useIconBox) ||
|
if ((!ACTIVE_PSD->useIconBox) ||
|
||||||
(P_ICON_BOX(pcd) == NULL))
|
(P_ICON_BOX(pcd) == NULL))
|
||||||
{
|
{
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
XmeClearBorder (DISPLAY, ICON_FRAME_WIN(pcd),
|
XmeClearBorder (DISPLAY, ICON_FRAME_WIN(pcd),
|
||||||
0, 0,
|
0, 0,
|
||||||
ICON_WIDTH(pcd), ICON_IMAGE_HEIGHT(pcd), 4);
|
ICON_WIDTH(pcd), ICON_IMAGE_HEIGHT(pcd), 4);
|
||||||
|
@ -1397,9 +1388,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
|
||||||
0, ICON_IMAGE_HEIGHT(pcd),
|
0, ICON_IMAGE_HEIGHT(pcd),
|
||||||
(unsigned int) ICON_WIDTH(pcd),
|
(unsigned int) ICON_WIDTH(pcd),
|
||||||
(unsigned int) ICON_HEIGHT(pcd), False);
|
(unsigned int) ICON_HEIGHT(pcd), False);
|
||||||
#else
|
|
||||||
XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1417,11 +1405,7 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
|
||||||
|
|
||||||
|
|
||||||
/* simulate exposure of window */
|
/* simulate exposure of window */
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
IconExposureProc(pcd, False);
|
IconExposureProc(pcd, False);
|
||||||
#else
|
|
||||||
IconExposureProc(pcd, True);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,10 +470,8 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
|
||||||
pIBD->frameWidget,
|
pIBD->frameWidget,
|
||||||
(ArgList)setArgs, i);
|
(ArgList)setArgs, i);
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
XtAddCallback(pIBD->scrolledWidget, XmNtraverseObscuredCallback,
|
XtAddCallback(pIBD->scrolledWidget, XmNtraverseObscuredCallback,
|
||||||
(XtCallbackProc) IconScrollVisibleCallback, (caddr_t)NULL);
|
(XtCallbackProc) IconScrollVisibleCallback, (caddr_t)NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
XtAddEventHandler(pIBD->scrolledWidget,
|
XtAddEventHandler(pIBD->scrolledWidget,
|
||||||
StructureNotifyMask,
|
StructureNotifyMask,
|
||||||
|
@ -3101,8 +3099,6 @@ void ShowClientIconState (ClientData *pCD, int newState)
|
||||||
} /* END FUNCTION ShowClientIconState */
|
} /* END FUNCTION ShowClientIconState */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
/*************************************<->*************************************
|
/*************************************<->*************************************
|
||||||
*
|
*
|
||||||
* IconScrollVisibleCallback
|
* IconScrollVisibleCallback
|
||||||
|
@ -3128,9 +3124,7 @@ void IconScrollVisibleCallback (Widget w, caddr_t client_data, XmAnyCallbackStru
|
||||||
*/
|
*/
|
||||||
} /* END OF FUNCTION IconScrollVisibleCallback */
|
} /* END OF FUNCTION IconScrollVisibleCallback */
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************<->*************************************
|
/*************************************<->*************************************
|
||||||
*
|
*
|
||||||
* IconActivateCallback
|
* IconActivateCallback
|
||||||
|
|
|
@ -52,10 +52,8 @@ extern void HandleIconBoxButtonMotion (Widget icon, caddr_t client_data,
|
||||||
XEvent *pev);
|
XEvent *pev);
|
||||||
extern void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy,
|
extern void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy,
|
||||||
XKeyEvent *keyEvent);
|
XKeyEvent *keyEvent);
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
extern void IconScrollVisibleCallback (Widget w, caddr_t client_data,
|
extern void IconScrollVisibleCallback (Widget w, caddr_t client_data,
|
||||||
XmAnyCallbackStruct *call_data);
|
XmAnyCallbackStruct *call_data);
|
||||||
#endif
|
|
||||||
extern void IconActivateCallback (Widget w, caddr_t client_data,
|
extern void IconActivateCallback (Widget w, caddr_t client_data,
|
||||||
XmAnyCallbackStruct *call_data);
|
XmAnyCallbackStruct *call_data);
|
||||||
extern void IconBoxPopUp (WmWorkspaceData *pWS, Boolean up);
|
extern void IconBoxPopUp (WmWorkspaceData *pWS, Boolean up);
|
||||||
|
|
|
@ -39,18 +39,12 @@
|
||||||
#define MWM_NEED_IIMAGE
|
#define MWM_NEED_IIMAGE
|
||||||
#include "WmIBitmap.h"
|
#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>
|
#include <Xm/XmosP.h>
|
||||||
/* Copied from XmosI.h */
|
/* Copied from XmosI.h */
|
||||||
extern String _XmOSInitPath(
|
extern String _XmOSInitPath(
|
||||||
String file_name,
|
String file_name,
|
||||||
String env_pathname,
|
String env_pathname,
|
||||||
Boolean *user_path) ;
|
Boolean *user_path) ;
|
||||||
#endif
|
|
||||||
#include <Xm/IconFile.h>
|
#include <Xm/IconFile.h>
|
||||||
#include <Dt/GetDispRes.h>
|
#include <Dt/GetDispRes.h>
|
||||||
|
|
||||||
|
@ -68,11 +62,6 @@ extern String _XmOSInitPath(
|
||||||
#include "WmMenu.h"
|
#include "WmMenu.h"
|
||||||
#include "WmError.h"
|
#include "WmError.h"
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
extern char *getenv ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/******************************<->*************************************
|
/******************************<->*************************************
|
||||||
*
|
*
|
||||||
* MakeClientIconPixmap (pCD, iconBitmap, iconMask)
|
* MakeClientIconPixmap (pCD, iconBitmap, iconMask)
|
||||||
|
@ -982,9 +971,7 @@ char *BitmapPathName (string)
|
||||||
static char fileName[MAXWMPATH+1];
|
static char fileName[MAXWMPATH+1];
|
||||||
char *retname;
|
char *retname;
|
||||||
SubstitutionRec subs[1];
|
SubstitutionRec subs[1];
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
char *homeDir = XmeGetHomeDirName();
|
char *homeDir = XmeGetHomeDirName();
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!string || !*string)
|
if (!string || !*string)
|
||||||
{
|
{
|
||||||
|
@ -1004,11 +991,7 @@ char *BitmapPathName (string)
|
||||||
* Handle "~/.."
|
* Handle "~/.."
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(fileName);
|
|
||||||
#else
|
|
||||||
strcpy (fileName, homeDir);
|
strcpy (fileName, homeDir);
|
||||||
#endif
|
|
||||||
strncat (fileName, &(string[1]), MAXWMPATH - strlen (fileName));
|
strncat (fileName, &(string[1]), MAXWMPATH - strlen (fileName));
|
||||||
return (fileName);
|
return (fileName);
|
||||||
}
|
}
|
||||||
|
@ -1026,11 +1009,7 @@ char *BitmapPathName (string)
|
||||||
if ((wmGD.bitmapDirectory[0] == '~') &&
|
if ((wmGD.bitmapDirectory[0] == '~') &&
|
||||||
(wmGD.bitmapDirectory[1] == '/'))
|
(wmGD.bitmapDirectory[1] == '/'))
|
||||||
{
|
{
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(fileName);
|
|
||||||
#else
|
|
||||||
strcpy (fileName, homeDir);
|
strcpy (fileName, homeDir);
|
||||||
#endif
|
|
||||||
strncat (fileName, &wmGD.bitmapDirectory[1],
|
strncat (fileName, &wmGD.bitmapDirectory[1],
|
||||||
MAXWMPATH - strlen (fileName));
|
MAXWMPATH - strlen (fileName));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1051,9 +1030,6 @@ char *BitmapPathName (string)
|
||||||
|
|
||||||
/* Fall back on a path search */
|
/* Fall back on a path search */
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
return (NULL);
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
char *search_path;
|
char *search_path;
|
||||||
Boolean user_path;
|
Boolean user_path;
|
||||||
|
@ -1073,7 +1049,6 @@ char *BitmapPathName (string)
|
||||||
XtFree(retname);
|
XtFree(retname);
|
||||||
return (fileName);
|
return (fileName);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
} /* END OF FUNCTION BitmapPathName */
|
} /* END OF FUNCTION BitmapPathName */
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
#include <Xm/XmosP.h>
|
#include <Xm/XmosP.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* include extern functions
|
* include extern functions
|
||||||
|
|
|
@ -70,12 +70,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#else
|
|
||||||
#include <Xm/XmP.h> /* for XmeGetHomeDirName */
|
#include <Xm/XmP.h> /* for XmeGetHomeDirName */
|
||||||
#endif
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
/* maximum string lengths */
|
/* maximum string lengths */
|
||||||
|
@ -108,9 +103,6 @@
|
||||||
#include "WmImage.h"
|
#include "WmImage.h"
|
||||||
#include "WmXSMP.h"
|
#include "WmXSMP.h"
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
extern char *getenv ();
|
|
||||||
#endif
|
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
# ifdef X_NOT_STDC_ENV
|
# ifdef X_NOT_STDC_ENV
|
||||||
extern int errno;
|
extern int errno;
|
||||||
|
@ -198,9 +190,6 @@ typedef struct _CCIFuncArg {
|
||||||
} CCIFuncArg;
|
} CCIFuncArg;
|
||||||
#endif /* defined(MWM_QATS_PROTOCOL) */
|
#endif /* defined(MWM_QATS_PROTOCOL) */
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
void GetHomeDirName(String fileName);
|
|
||||||
#endif
|
|
||||||
static String GetNetworkFileName (char *pchFile);
|
static String GetNetworkFileName (char *pchFile);
|
||||||
#if (defined(MWM_QATS_PROTOCOL))
|
#if (defined(MWM_QATS_PROTOCOL))
|
||||||
static MenuItem *MakeSeparatorTemplate (int);
|
static MenuItem *MakeSeparatorTemplate (int);
|
||||||
|
@ -1627,62 +1616,6 @@ unsigned int PeekAhead(unsigned char *currentChar,
|
||||||
} /* END OF FUNCTION PeekAhead */
|
} /* 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)
|
* SyncModifierStrings (fileName)
|
||||||
|
@ -1986,9 +1919,7 @@ FILE *FopenConfigFile (void)
|
||||||
char *LANG, *LANGp;
|
char *LANG, *LANGp;
|
||||||
FILE *fileP;
|
FILE *fileP;
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
char *homeDir = XmeGetHomeDirName();
|
char *homeDir = XmeGetHomeDirName();
|
||||||
#endif
|
|
||||||
Boolean stackPushed;
|
Boolean stackPushed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2040,11 +1971,7 @@ FILE *FopenConfigFile (void)
|
||||||
if ((wmGD.configFile[0] == '~') && (wmGD.configFile[1] == '/'))
|
if ((wmGD.configFile[0] == '~') && (wmGD.configFile[1] == '/'))
|
||||||
/* handle "~/..." */
|
/* handle "~/..." */
|
||||||
{
|
{
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(cfileName);
|
|
||||||
#else
|
|
||||||
strcpy (cfileName, homeDir);
|
strcpy (cfileName, homeDir);
|
||||||
#endif
|
|
||||||
if (LANG != NULL)
|
if (LANG != NULL)
|
||||||
{
|
{
|
||||||
strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
|
strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
|
||||||
|
@ -2063,11 +1990,7 @@ FILE *FopenConfigFile (void)
|
||||||
/*
|
/*
|
||||||
* Just try $HOME/.mwmrc
|
* Just try $HOME/.mwmrc
|
||||||
*/
|
*/
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(cfileName);
|
|
||||||
#else
|
|
||||||
strcpy (cfileName, homeDir);
|
strcpy (cfileName, homeDir);
|
||||||
#endif
|
|
||||||
strncat(cfileName, &(wmGD.configFile[1]),
|
strncat(cfileName, &(wmGD.configFile[1]),
|
||||||
MAXWMPATH-strlen(cfileName));
|
MAXWMPATH-strlen(cfileName));
|
||||||
if ((fileP = fopen (cfileName, "r")) != NULL)
|
if ((fileP = fopen (cfileName, "r")) != NULL)
|
||||||
|
@ -2123,11 +2046,7 @@ FILE *FopenConfigFile (void)
|
||||||
#define HOME_MWMRC "/.mwmrc"
|
#define HOME_MWMRC "/.mwmrc"
|
||||||
#define SLASH_MWMRC "/system.mwmrc"
|
#define SLASH_MWMRC "/system.mwmrc"
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(cfileName);
|
|
||||||
#else
|
|
||||||
strcpy (cfileName, homeDir);
|
strcpy (cfileName, homeDir);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (MwmBehavior)
|
if (MwmBehavior)
|
||||||
{
|
{
|
||||||
|
@ -2176,11 +2095,7 @@ FILE *FopenConfigFile (void)
|
||||||
/*
|
/*
|
||||||
* Just try $HOME/.mwmrc
|
* Just try $HOME/.mwmrc
|
||||||
*/
|
*/
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(cfileName);
|
|
||||||
#else
|
|
||||||
strcpy (cfileName, homeDir);
|
strcpy (cfileName, homeDir);
|
||||||
#endif
|
|
||||||
if (MwmBehavior)
|
if (MwmBehavior)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -6342,62 +6257,16 @@ void ProcessMotifBindings (void)
|
||||||
{
|
{
|
||||||
char fileName[MAXWMPATH+1];
|
char fileName[MAXWMPATH+1];
|
||||||
char *bindings = NULL;
|
char *bindings = NULL;
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
char *homeDir = XmeGetHomeDirName();
|
char *homeDir = XmeGetHomeDirName();
|
||||||
#else
|
|
||||||
FILE *fileP;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look in the user's home directory for .motifbind
|
* Look in the user's home directory for .motifbind
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef MOTIF_ONE_DOT_ONE
|
|
||||||
GetHomeDirName(fileName);
|
|
||||||
#else
|
|
||||||
strcpy (fileName, homeDir);
|
strcpy (fileName, homeDir);
|
||||||
#endif
|
|
||||||
strncat(fileName, "/", MAXWMPATH-strlen(fileName));
|
strncat(fileName, "/", MAXWMPATH-strlen(fileName));
|
||||||
strncat(fileName, MOTIF_BINDINGS_FILE, 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),
|
XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
|
||||||
XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False));
|
XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False));
|
||||||
XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
|
XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
|
||||||
|
@ -6413,7 +6282,6 @@ void ProcessMotifBindings (void)
|
||||||
_XmVirtKeysLoadFallbackBindings (DISPLAY, &bindings);
|
_XmVirtKeysLoadFallbackBindings (DISPLAY, &bindings);
|
||||||
}
|
}
|
||||||
XtFree (bindings);
|
XtFree (bindings);
|
||||||
#endif
|
|
||||||
} /* END OF FUNCTION ProcessMotifBindings */
|
} /* END OF FUNCTION ProcessMotifBindings */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,9 +48,7 @@
|
||||||
|
|
||||||
#include <Xm/XmP.h>
|
#include <Xm/XmP.h>
|
||||||
#include <Xm/RowColumn.h>
|
#include <Xm/RowColumn.h>
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
#include <Xm/ScreenP.h> /* for XmGetXmScreen and screen.moveOpaque */
|
#include <Xm/ScreenP.h> /* for XmGetXmScreen and screen.moveOpaque */
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* include extern functions
|
* include extern functions
|
||||||
|
@ -4704,10 +4702,8 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
|
||||||
wmScreenResources,
|
wmScreenResources,
|
||||||
XtNumber (wmScreenResources), NULL, 0);
|
XtNumber (wmScreenResources), NULL, 0);
|
||||||
|
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
pSD->moveOpaque = (((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW)))
|
pSD->moveOpaque = (((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW)))
|
||||||
-> screen.moveOpaque);
|
-> screen.moveOpaque);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2129,12 +2129,10 @@ WmICCCMToXmString (XTextProperty *wmNameProp)
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case XConverterNotFound:
|
case XConverterNotFound:
|
||||||
#ifndef MOTIF_ONE_DOT_ONE
|
|
||||||
sprintf(msg, GETMESSAGE (70,5,
|
sprintf(msg, GETMESSAGE (70,5,
|
||||||
"Window manager cannot convert property %.100s as clientTitle/iconTitle: XmbTextPropertyToTextList"),
|
"Window manager cannot convert property %.100s as clientTitle/iconTitle: XmbTextPropertyToTextList"),
|
||||||
XGetAtomName (DISPLAY,wmNameProp->encoding));
|
XGetAtomName (DISPLAY,wmNameProp->encoding));
|
||||||
Warning(msg);
|
Warning(msg);
|
||||||
#endif /* MOTIF_ONE_DOT_ONE */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XNoMemory:
|
case XNoMemory:
|
||||||
|
|
Loading…
Reference in a new issue