#include <Dt/MacrosP.h>
#include <Dt/DtStrDefs.h>
+#include "DtSvcInternal.h" /* _DtGetMask */
+#include <Xm/XmPrivate.h> /* _XmFocusInGadget, _XmFocusOutGadget, _XmSocorro */
+
#define DELAY_DEFAULT 100
static void Initialize(
{
DtButtonGadget bg = (DtButtonGadget) w ;
XmManagerWidget mw = (XmManagerWidget) XtParent(w) ;
- XGCValues values;
XtReleaseGC ((Widget) mw, bg->button.gc_normal);
XtReleaseGC ((Widget) mw, bg->button.gc_background);
Region region )
{
DtButtonGadget bg = (DtButtonGadget) w;
-XmManagerWidget mw = (XmManagerWidget) XtParent(w);
Dimension s_t = bg -> gadget.shadow_thickness;
Dimension h_t = bg -> gadget.highlight_thickness;
Position x;
{
DtButtonGadget current = (DtButtonGadget) current_w;
- DtButtonGadget request = (DtButtonGadget) request_w;
DtButtonGadget new_g = (DtButtonGadget) new_w;
XmManagerWidget mw = (XmManagerWidget) XtParent(new_w);
Boolean returnFlag = FALSE;
- Cursor cursor;
G_EventMask (new_g) = (XmARM_EVENT | XmACTIVATE_EVENT |
XmMULTI_ARM_EVENT | XmMULTI_ACTIVATE_EVENT |
{
DtButtonGadget bg = (DtButtonGadget) w ;
DtButtonCallbackStruct call_value;
- Dimension bw = G_BorderWidth(bg);
if (!B_Armed (bg))
return;
else
return (False);
}
+ return (False);
}
/************************************************************************
#include <Dt/WsmP.h>
#include <Dt/WsmM.h>
#include <Dt/MacrosP.h>
+#include <Dt/SharedProcs.h>
#include <Xm/Form.h>
#include <Xm/ToggleBG.h>
#include "UI.h"
#include "WmGlobal.h"
+#include "WmHelp.h"
#include "WmResNames.h"
+#include "WmResParse.h"
#include "WmFunction.h"
if (save_name != NULL)
drop_action->action_name = save_name;
- control_data->operation = NULL;
+ control_data->operation = 0;
return;
}
if (save_name != NULL)
drop_action->action_name = save_name;
- control_data->operation = NULL;
+ control_data->operation = 0;
}
}
/* element values. */
control_data.element_values = element_values;
- RemoveEntry (&control_data, CONTROL);
+ RemoveEntry ((RecordData *)&control_data, CONTROL);
bad_control = True;
break;
control_data->move_action = NULL;
control_data->copy_action = NULL;
control_data->link_action = NULL;
- control_data->operation = NULL;
+ control_data->operation = 0;
AddControlActionList (control_data);
#include <Dt/UserMsg.h>
#include "WmParse.h"
+#include "WmPanelP.h"
#include "DataBaseLoad.h"
#include "Parse.h"
#include "UI.h"
*
************************************************************************/
-static panel_count = 0;
-static panel_data_count = 0;
+static int panel_count = 0;
+static int panel_data_count = 0;
static RecordData * panel_data = NULL;
-static box_count = 0;
-static box_data_count = 0;
+static int box_count = 0;
+static int box_data_count = 0;
static RecordData * box_data = NULL;
-static subpanel_count = 0;
-static subpanel_data_count = 0;
+static int subpanel_count = 0;
+static int subpanel_data_count = 0;
static RecordData * subpanel_data = NULL;
-static switch_count = 0;
-static switch_data_count = 0;
+static int switch_count = 0;
+static int switch_data_count = 0;
static RecordData * switch_data = NULL;
-static control_count = 0;
-static control_data_count = 0;
+static int control_count = 0;
+static int control_data_count = 0;
static RecordData * control_data = NULL;
panel.animation_data[count].name = strdup(fields[0].fieldValue);
- for (i = 1; fields[i].fieldName != NULL; i++)
+ for (i = 1; fields[i].fieldName != NULLQUARK; i++)
{
if (fields[i].fieldName == animation_quark)
field_count++;
Boolean rejection)
{
- if (control_element_value_found) return;
+ if (control_element_value_found) {
+ return (True);
+ }
control_element_values = (ElementValue *) XtMalloc (sizeof(ElementValue) *
CONTROL_KEYWORD_COUNT);
/* to the keywords for this record type and when found, enter */
/* it into the element values array for the component. */
- for (i = 0; fields[i].fieldName != NULL; i++)
+ for (i = 0; fields[i].fieldName != NULLQUARK; i++)
{
XrmQuark field1 = fields[i].fieldName;
char * field2 = fields[i].fieldValue;
control->move_action = NULL;
control->copy_action = NULL;
control->link_action = NULL;
- control->operation = NULL;
+ control->operation = 0;
AddControlActionList (control);
extern void _WriteControlElementValues(ElementValue *);
extern void WriteControlComponentFile(ControlData *);
extern void WriteSubpanelComponentFile(SubpanelData *);
+extern void RemoveEntry (RecordData * record_data, int record_type);
extern void RemoveControlComponentFile(ControlData *);
extern void RemoveSubpanelComponentFile(SubpanelData *);
extern void SessionAddFileData (char *, char *, int, char *, int, Boolean);
--- /dev/null
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
+/*
+ * File: shellutils.h $XConsortium: shellutils.h /main/3 1995/10/26 16:13:31 rswiston $
+ *
+ * (c) Copyright 1993, 1994 Hewlett-Packard Company
+ * (c) Copyright 1993, 1994 International Business Machines Corp.
+ * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
+ * (c) Copyright 1993, 1994 Novell, Inc.
+ */
+
+#ifndef __SHELLUTILS_H_
+#define __SHELLUTILS_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+ char const *const *shellscan(char const *str, int *argc = (int *)0,
+ unsigned opts = 0);
+}
+#else
+ extern char **shellscan();
+#endif
+
+#define SHX_NOGLOB 0x0001
+#define SHX_NOTILDE 0x0002
+#define SHX_NOVARS 0x0004
+#define SHX_NOQUOTES 0x0008
+#define SHX_NOSPACE 0x0010
+#define SHX_NOMETA 0x0020
+#define SHX_NOCMD 0x0040
+#define SHX_COMPLETE 0x0080
+
+#define SHX_NOGRAVE 0x0040 /* Obsolete, use NOCMD */
+
+#endif /* __SHELLUTILS_H_ */
--- /dev/null
+/* Additional import */
+extern Pixmap _DtGetMask(Screen *screen, char *image_name);
void ** parse_return)
{
- _DtWmParseToLower((unsigned char *)parse_source);
+ _DtWmParseToLower(parse_source);
if (strcmp (parse_source, "true") == 0)
*parse_return = (void *) True;
void ** parse_return)
{
- _DtWmParseToLower ((unsigned char *) parse_source);
+ _DtWmParseToLower (parse_source);
if (strcmp (parse_source, resolution_types[HIGH]) == 0)
*parse_return = (void *) HIGH;
void ** parse_return)
{
- _DtWmParseToLower ((unsigned char *) parse_source);
+ _DtWmParseToLower (parse_source);
if (strcmp (parse_source, "double_click") == 0)
*parse_return = (void *) DOUBLE_CLICK;
void ** parse_return)
{
- _DtWmParseToLower ((unsigned char *) parse_source);
+ _DtWmParseToLower (parse_source);
if (strcmp (parse_source, control_types[CONTROL_BLANK]) == 0)
*parse_return = (void *) CONTROL_BLANK;
void ** parse_return)
{
- _DtWmParseToLower ((unsigned char *) parse_source);
+ _DtWmParseToLower (parse_source);
if (strcmp (parse_source, monitor_types[MONITOR_NONE]) == 0)
*parse_return = (void *) MONITOR_NONE;
{
Boolean status;
- _DtWmParseToLower ((unsigned char *) parse_source);
+ _DtWmParseToLower (parse_source);
if (strcmp (parse_source, "first") == 0)
parse_source = "0";
#include "DataBaseLoad.h"
#include "WmGlobal.h"
+#include "UI.h"
#define POPUP_CHILDREN 7
{
action_item[action_index] =
XmCreatePushButtonGadget (w, "action_button", args, 0);
-
- *action_count++;
+
+ (*action_count)++;
XtManageChild (action_item[action_index]);
XtAddCallback (action_item[action_index], XmNactivateCallback,
*
************************************************************************/
-void
+int
main (int argc,
char **argv)
{
Widget icon;
- unsigned char operations = NULL;
+ unsigned char operations = 0;
char *format, * next_seg;
Arg al2[4];
operations = XmDROP_COPY;
}
- if (operations != NULL)
+ if (operations != 0)
{
XtSetArg (al2[0], DtNdropAnimateCallback, dropCB);
XtSetArg (al2[1], DtNtextIsBuffer, True);
DeleteControlActionList (control_data);
- RemoveEntry (control_data, CONTROL);
+ RemoveEntry ((RecordData *)control_data, CONTROL);
}
XtDestroyWidget (subpanel_data->shell);
XtFree ((char *) subpanel_data->control_data);
- RemoveEntry (subpanel_data, SUBPANEL);
+ RemoveEntry ((RecordData *)subpanel_data, SUBPANEL);
XtFree ((char *) subpanel_data);
control_data->subpanel_data = NULL;
extern void ToggleDefaultControl (ControlData *, SubpanelData *, ControlData *);
extern String GetIconName (String, unsigned int);
+extern void AddSubpanel (ControlData * control_data);
+extern void DeleteSubpanelControl(SubpanelData *subpanel, ControlData *control_data);
+extern void DeleteSubpanel(ControlData *control_data);
+extern void UpdateSwitchGeometry (BoxData * box_data);
+extern void FrontPanelCreate (Widget toplevel);
#endif /* _ui_h */
unsigned int w, h, bw, depth;
Window root;
unsigned long oldFlags;
- static unsigned char *none_string = NULL;
- static unsigned char *no_backdrop_string = NULL;
+ static String none_string = NULL;
+ static String no_backdrop_string = NULL;
Boolean bNone = False;
#ifndef NO_MULTIBYTE
unsigned int chlen;
}
if (!no_backdrop_string &&
- (no_backdrop_string = (unsigned char *)
- XtNewString (DTWM_REQP_BACKDROP_NONE)))
+ (no_backdrop_string = XtNewString (DTWM_REQP_BACKDROP_NONE)))
{
ToLower(no_backdrop_string);
xa_NO_BACKDROP = XmInternAtom (DISPLAY, no_backdrop_string, False);
/* for compatiblity with DT 2.01 */
- none_string = (unsigned char *) XtNewString ("none");
+ none_string = XtNewString ("none");
}
if (!no_backdrop_string)
{
pchL = (unsigned char *) strdup ((char *)pch);
if (*pchL)
- ToLower(pchL);
+ ToLower((char *)pchL);
if (!(strcmp ((char *)pchL, (char *)no_backdrop_string)) ||
!(strcmp ((char *)pchL, (char *)none_string)))
/*
* No backdrop (root window shows through)
*/
- pWS->backdrop.window = NULL;
+ pWS->backdrop.window = None;
pWS->backdrop.nameAtom = xa_NO_BACKDROP;
bNone = True;
}
if (!bitmapFile || !strlen(bitmapFile) ||
!strcmp(bitmapFile, DTWM_REQP_BACKDROP_NONE))
{
- pixmap = NULL;
+ pixmap = None;
}
if (bitmapFile)
{
/* not in Xm pixmap cache */
}
- pWS->backdrop.imagePixmap = NULL;
+ pWS->backdrop.imagePixmap = None;
}
/* free pWS->backdrop.image */
{
int x,y;
unsigned int width,height;
-#ifdef WSM
+#if defined(WSM) && defined(DT_LEFT_JUSTIFIED_TITLE)
Dimension textWidth;
Dimension offset;
XmFontList fontList;
unsigned int mask;
/* count the number of masks in the lock sequence */
- for (num_masks=0; wmGD.pLockMaskSequence[num_masks] != NULL; num_masks++);
+ for (num_masks=0; wmGD.pLockMaskSequence[num_masks]; num_masks++);
/* insure we have enough space for our returned masks */
if ((pRetMasks == NULL) || (len_ret_masks < num_masks+2))
{
XtFree ((char *)wmFuncArgs);
}
- else if ((functionTable[iFuncIndex].parseProc ==
- ParseWmFuncActionArg))
+ else if (functionTable[iFuncIndex].parseProc ==
+ ParseWmFuncActionArg)
{
WmActionArg *pAP = (WmActionArg *) wmFuncArgs;
extern void WorkspaceModifyCB (Widget, Atom, int, XtPointer);
extern void SessionRestoreData (void);
extern void UnManageWindow (ClientData *pCD);
+extern void WorkspaceAdjustPanelPosition (Position x,
+ Position y,
+ Dimension width,
+ Dimension height);
static void PushRecallSetData ();
static void EmbeddedClientSetData ();
{
if (strcmp (client_name, embedded_client_list[i].pchResName) == 0)
{
- embedded_client_list[i].wControl == control_data->icon;
+ embedded_client_list[i].wControl = control_data->icon;
break;
}
}
embedded_client->pchResName = XtNewString (client_name);
embedded_client->wControl = control_data->icon;
- embedded_client->winParent = NULL;
+ embedded_client->winParent = None;
embedded_client->pCD = NULL;
}
{
if (strcmp (client_name, push_recall_list[i].pchResName) == 0)
{
- push_recall_list[i].wControl == control_data->icon;
+ push_recall_list[i].wControl = control_data->icon;
break;
}
}
#include <Dt/DtStrDefs.h>
#include "WmPanelP.h"
#include "WmSignal.h"
+#include "WmManage.h"
#endif /* PANELIST */
/*
Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
{
- int status;
int pid;
- int w;
#ifndef WSM
+ int status;
+ int w;
void (*intStat) ();
void (*quitStat) ();
#endif /* WSM */
{
XImage *pImage;
- if (pImage = (XImage *) XtMalloc (sizeof (XImage)))
+ if ((pImage = (XImage *) XtMalloc (sizeof (XImage))))
{
pImage->width = width;
pImage->height = height;
do
{
ptr = DtStrchr (pTemp->workspaces, '*');
- if (ptr != NULL) *ptr = NULL;
+ if (ptr != NULL) *ptr = '\0';
atom_names =
(char **) XtRealloc ((char *)atom_names,
WmPanelistObject pPanelist;
char *theHelpVolume = WM_DT_HELP_VOLUME;
char *theHelpTopic = WM_DT_HELP_TOPIC;
- char volume[MAXWMPATH + 1];
- char topic[MAXWMPATH + 1];
+ unsigned char volume[MAXWMPATH + 1];
+ unsigned char topic[MAXWMPATH + 1];
int argCount = 0;
pPanelist = (WmPanelistObject) pSD->wPanelist;
- if (theWidget = O_Panel(pPanelist))
+ if ((theWidget = O_Panel(pPanelist)))
{
if (args )
{
/*
* parse args for volume and topic
*/
- WmDtGetHelpArgs((unsigned char*)args, &volume, &topic, &argCount);
+ WmDtGetHelpArgs(args, volume, topic, &argCount);
if (argCount == 1)
{
WmDtDisplayTopic(pSD->screenTopLevelW1,
theHelpVolume,
- topic,
+ (char *)topic,
DtHELP_TYPE_TOPIC, theWidget, True,
NULL, 0, NULL, False, NULL);
}
else
{
WmDtDisplayTopic(pSD->screenTopLevelW1,
- volume,
- topic,
+ (char *)volume,
+ (char *)topic,
DtHELP_TYPE_TOPIC, theWidget, False,
NULL, 0, NULL, False, NULL);
}
int iStatus;
String sTmp, sMessage, sTitle;
- iStatus = WmDtReturnSelectedWidget(wmGD.topLevelW, NULL,
+ iStatus = WmDtReturnSelectedWidget(wmGD.topLevelW, None,
&selectedWidget);
switch (iStatus)
}
xrm_name [0] = XrmStringToQuark ("wsHelp");
xrm_name [1] = XrmStringToQuark ("onScreen");
- xrm_name [2] = NULL;
+ xrm_name [2] = NULLQUARK;
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
xrm_name [0] = XrmStringToQuark ("cachedHelp");
xrm_name [1] = XrmStringToQuark ("cachedCount");
- xrm_name [2] = NULL;
+ xrm_name [2] = NULLQUARK;
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
{
sprintf (dialogName, "oWsHelp%d", cCount);
xrm_name [0] = XrmStringToQuark (dialogName);
- xrm_name [1] = NULL;
- xrm_name [2] = NULL;
+ xrm_name [1] = NULLQUARK;
+ xrm_name [2] = NULLQUARK;
displayTopicInfo.xPos = 0;
displayTopicInfo.xPos = 0;
res_class = DT_WM_RESOURCE_CLASS;
}
- sprintf (screenName, "%d\0", pSD->screen);
+ sprintf (screenName, "%d", pSD->screen);
sprintf (buffer, "%s*%s*%s: \\n ", res_class, screenName,
WmNhelpResources);
if (pCDforHelp)
{
thisCnt = 0;
- sprintf(workspaces,"");
+ sprintf(workspaces, "%s", "");
for (wsCnt = 0; wsCnt < pSD->numWorkspaces;
wsCnt++)
{
int n;
XFontStruct *font;
Dimension height;
- Window wGroup;
+ Window wGroup = None;
int x, y;
ClientData *pCDforHelp;
}
else
{
- if (wGroup != 0)
+ if (wGroup != None)
{
HideHelpDialog (pSD, True);
}
default_session = tt_default_session();
status = tt_ptr_error(default_session);
if (status != TT_OK) {
- GETMESSAGE(2, 4, "Could not get default ToolTalk session:\n%s\n");
+ errfmt = GETMESSAGE(2, 4, "Could not get default ToolTalk session:\n%s\n");
ToolTalkError(toplevel, errfmt, status);
return;
}
ToolTalkError(toplevel, errfmt, status);
return;
}
+
tt_free( default_session );
status = tt_pattern_class_add(notice_pattern, TT_NOTICE);
if (status != TT_OK) {
WmScreenData *pSD,
Atom aWs,
int iType);
+extern void dtSendMarqueeSelectionNotification(
+ WmScreenData *pSD,
+ int type,
+ Position x,
+ Position y,
+ Dimension width,
+ Dimension height);
/******** End Public Function Declarations ********/
extern WmWorkspaceData *pIconBoxInitialWS;
pIconBoxInitialWS = pWS;
- ManageWindow (pWS->pSD, NULL, MANAGEW_ICON_BOX);
+ ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX);
} /* END OF FUNCTION AddIconBoxForWorkspace */
#endif /* WSM */
pIBD->wsID = pWS->id;
#endif /* WSM */
- ToLower ((unsigned char *) pWS->pSD->iconBoxSBDisplayPolicy);
+ ToLower (pWS->pSD->iconBoxSBDisplayPolicy);
if (!((!strcmp(pWS->pSD->iconBoxSBDisplayPolicy , "all")) ||
(!strcmp(pWS->pSD->iconBoxSBDisplayPolicy , szvertical)) ||
#endif /* PANELIST */
{
Boolean rval = False;
- int wsIndex = GetCurrentWorkspaceIndex (pWS->pSD);
#ifdef PANELIST
if (pWS->pIconBox &&
{
IconBoxData *pibd;
- int wsIndex = GetCurrentWorkspaceIndex (pWS->pSD);
if (pWS->pIconBox)
{
static void
BuildLockMaskSequence(void)
{
- int i, j, k;
+ int j, k;
unsigned int mask;
unsigned int thisbit;
Boolean bit_on;
Display *dpy = wmGD.display;
int pkcLockingMods[NUM_LOCKING_MODS];
- int kcq, kc;
+ int kc;
for (i=0; i<NUM_LOCKING_MODS; i++)
{
Pixmap iconBitmap;
Arg al[5];
int ac;
- Widget wFpShell;
WmPanelistObject pPanelist;
wmGD.dtSD->wPanelist =
int wsnum;
WmWorkspaceData *pwsI;
int buf_size;
- int i;
- static int dupnum = 0;
int iwsx;
#endif /* WSM */
pSD->workspaceList = NULL;
pSD->numWorkspaces = 0;
pSD->numWsDataAllocated = 0;
- pSD->lastBackdropWin = NULL;
+ pSD->lastBackdropWin = None;
pSD->pDtSessionItems = NULL;
pSD->totalSessionItems = 0;
pSD->remainingSessionItems = 0;
buf_size = strlen(buffer) + 1;
if ((wmGD.screenNames[sNum] =
- (unsigned char *)XtRealloc (wmGD.screenNames[sNum], buf_size)) == NULL)
+ (unsigned char *)XtRealloc ((char *)wmGD.screenNames[sNum], buf_size)) == NULL)
{
Warning (((char *)GETMESSAGE(40, 7, "Cannot create enough memory for the screen names")));
ExitWM (WM_ERROR_EXIT_VALUE);
len = strlen (pchD);
pchEnd = pch + strlen(pch);
- while (!bFound && (pch != NULL) && (*pch != NULL))
+ while (!bFound && (pch != NULL) && (*pch != 0))
{
if (strncmp (pch, pchD, len) == 0)
{
*/
pch2 = pch + len;
if ((pch2 <= pchEnd) &&
- ((*pch2 == NULL) ||
+ ((*pch2 == 0) ||
(((mblen (pch2, MB_CUR_MAX) == 1) &&
(*pch2 == ':')))))
{
{
/* find next path component */
pch = strchr (pch, (int) ':');
- if ((pch != NULL) && (*pch != NULL))
+ if ((pch != NULL) && (*pch != 0))
{
/* skip path separator */
chlen = mblen (pch, MB_CUR_MAX);
/*
* Initialize messages
*/
- wmGD.okLabel=XmStringCreateLocalized(_DtOkString);
- wmGD.cancelLabel=XmStringCreateLocalized(_DtCancelString);
- wmGD.helpLabel=XmStringCreateLocalized(_DtHelpString);
+ wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString);
+ wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString);
+ wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString);
#endif /* WSM */
/*
#include "WmCEvent.h"
#include "WmEvent.h"
#include "WmInitWs.h"
+#include "WmError.h"
#ifdef WSM
#include "WmIPC.h"
#include "WmBackdrop.h"
*/
for (i = 0; i < pCD->numInhabited; i++)
{
- if (pwsi = GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID))
+ if ((pwsi = GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID)))
{
if ((pCD->pSD->useIconBox &&
if (pWsc->iconPlace != NO_ICON_PLACE)
{
- if (pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID))
+ if ((pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID)))
{
pWsTmp->IPData.placeList[pWsc->iconPlace].pCD
= NULL;
*/
for (i = 0; i< pCD->numInhabited; i++)
{
- if (pWsTmp = GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID))
+ if ((pWsTmp = GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID)))
{
DeleteIconFromBox (pWsTmp->pIconBox, pCD);
}
XMapWindow (DISPLAY, pCD->clientFrameWin);
XtManageChild (dialogboxW);
- if ((wmGD.keyboardFocusPolicy == KEYBOARD_FOCUS_EXPLICIT))
+ if (wmGD.keyboardFocusPolicy == KEYBOARD_FOCUS_EXPLICIT)
{
Do_Focus_Key (pCD, GetTimestamp() , ALWAYS_SET_FOCUS);
}
ClientListEntry *pCLE;
WmFpEmbeddedClientData *pECD;
Boolean bReset;
- long manageFlags = 0L;
- Window *pWins, *pW;
/*
* Search through all the windows we're managing right now to
long manageFlags)
{
- int wsIndex;
- int i;
XWindowChanges windowChanges;
unsigned int mask;
WmFpPushRecallClientData *pPRCD;
)
{
- int wsIndex;
- int i;
XWindowChanges windowChanges;
unsigned int mask;
- WmFpPushRecallClientData *pPRCD;
ClientData *pCD;
/*
}
else if (parent == root)
{
- if (wmStateProp = GetWMState (win))
+ if ((wmStateProp = GetWMState (win)))
{
/*
* Already has a WM_STATE.
/* copy all but end-of-line and newlines to line buffer */
{
if (chlen == -1)
- *(parseP)++;
+ parseP++;
else
{
while (chlen--)
*
*************************************<->***********************************/
-void _DtWmParseToLower (unsigned char *string)
+void _DtWmParseToLower (char *string)
{
- unsigned char *pch = string;
+ char *pch = string;
#ifdef MULTIBYTE
int chlen;
- while ((chlen = mblen ((char *)pch, MB_CUR_MAX)) > 0)
+ while ((chlen = mblen (pch, MB_CUR_MAX)) > 0)
{
if ((chlen == 1) && (isupper (*pch)))
{
if (!pchNext)
{
/* it's the rest of the string */
- chSave = NULL;
+ chSave = '\0';
bEatBreak = False;
pchNext = pch + strlen ((char *) pch);
}
extern int _DtWmParseLineNumber(
DtWmpParseBuf *pWmPB) ;
extern void _DtWmParseToLower (
- unsigned char *string);
+ char *string);
extern unsigned int _DtWmParsePeekAhead(
unsigned char *currentChar,
unsigned int currentLev) ;
#ifdef WSM
#include <Dt/WsmP.h>
#include <X11/Xatom.h>
+#include <Xm/AtomMgr.h>
#endif /* WSM */
/*
String sTitle;
char **ppchList;
int iNumStrings;
- int count, iwin;
+ int count;
int i, ix;
Status status;
XTextProperty tp;
/* number of backdrop windows */
ix = (i * WIP_NUMBER_SIZE);
- if ((pWS->backdrop.window == None))
+ if (pWS->backdrop.window == None)
{
strcpy (&pch[ix], "0");
}
char *pch;
char *pchName;
int len;
- Atom aProperty;
/*
* Construct our property name
extern void ProcessWmColormapWindows (ClientData *pCD);
extern Colormap FindColormap (ClientData *pCD, Window window);
extern MenuItem * GetMwmMenuItems (ClientData *pCD);
+extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients);
#ifdef WSM
extern void GetInitialPropertyList (ClientData *pCD);
extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll);
XIconSize sizeList;
int scr;
- Atom atoms[XtNumber(atom_names)];
+ Atom atoms[XtNumber(atom_names) + 1];
/*
* Make atoms that are required by the ICCC and mwm. The atom for
#endif /* PANELIST */
#include "WmResource.h"
+#include "Dt/shellutils.h" /* shellscan */
+
#include <Xm/VirtKeysP.h>
+#include <Xm/XmPrivate.h> /* _XmVirtKeysLoadFileBindings,
+ * _XmVirtKeysLoadFallbackBindings */
+
#include <X11/cursorfont.h>
#include <X11/keysym.h>
{"mod3", Mod3Mask},
{"mod4", Mod4Mask},
{"mod5", Mod5Mask},
- {NULL, (unsigned int)NULL},
+ {NULL, 0},
};
#define ALT_INDEX 3
static unsigned int StrToOct(unsigned char *str);
void ScanAlphanumeric (unsigned char **linePP);
void ScanWhitespace(unsigned char **linePP);
-void ToLower (unsigned char *string);
+void ToLower (char *string);
void
PWarning (char *message);
static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
{"btn5up", ButtonRelease, ParseImmed, Button5, FALSE},
{"btn5click", ButtonRelease, ParseImmed, Button5, TRUE},
{"btn5click2", ButtonPress, ParseImmed, Button5, TRUE},
- { NULL, (unsigned int)NULL, (Boolean(*)())NULL, (unsigned int)NULL, (Boolean)NULL}
+ { NULL, 0, (Boolean(*)())NULL, 0, FALSE}
};
static EventTableEntry keyEvents[] = {
{"key", KeyPress, ParseKeySym, 0, FALSE},
- { NULL, (unsigned int)NULL, (Boolean(*)())NULL, (unsigned int)NULL, (Boolean)NULL}
+ { NULL, 0, (Boolean(*)())NULL, 0, FALSE}
};
#ifdef PANELIST
char **pWorkSpaceList, char *clientMachine)
{
- int count, item;
+ int count;
int relCount;
int argNum;
SessionGeom *sessionGeom;
return(False);
}
- memset ((char *)pSD->pDtSessionItems, NULL,
+ memset ((char *)pSD->pDtSessionItems, 0,
numItems * sizeof (DtSessionItem));
return(True);
unsigned int n;
MenuSpec *menuSpec;
#ifdef PANELIST
- static Boolean conversionInProgress = False;
- Arg args[10];
- int argnum;
if (!bNested)
{
continue;
}
- ToLower (string);
+ ToLower ((char *)string);
if (!strcmp ((char *)string, MENU_SPEC))
{
ParseMenuSet (pSD, lineP);
if (string != NULL)
{
- ToLower (string);
+ ToLower ((char *)string);
low = 0;
high = WMFUNCTIONTABLESIZE - 1;
*/
#ifndef NO_MULTIBYTE
- if ((wmFunction == F_Exec))
+ if (wmFunction == F_Exec)
{
lastlen = 0;
p = *pArgs;
len = min (lineP - startP, MAX_GROUP_STRLEN);
(void) strncpy ((char *)grpStr, (char *)startP, len);
grpStr[len] = '\0';
- ToLower (grpStr);
+ ToLower ((char *)grpStr);
if (!strcmp ("icon", (char *)grpStr))
{
len = min(lineP - startP, MAX_CONTEXT_STRLEN);
(void) strncpy ((char *)ctxStr, (char *)startP, len);
ctxStr[len] = '\0';
- ToLower (ctxStr);
+ ToLower ((char *)ctxStr);
if (!strcmp ("root", (char *)ctxStr))
{
if (name != NULL)
{
- ToLower (name);
+ ToLower ((char *)name);
for (i=0; modifierStrings[i].name != NULL; i++)
{
if (!strcmp (modifierStrings[i].name, (char *)name))
if (modString != NULL)
{
- ToLower ((unsigned char *)modString);
+ ToLower (modString);
for (i=NONE; i<=EXCLUDE; i++)
{
if (!strcmp (CCIEntryModifierNames[i], modString))
len = min (lineP - startP, MAX_EVENTTYPE_STRLEN);
(void) strncpy ((char *)eventTypeStr, (char *)startP, len);
eventTypeStr[len] = '\0';
- ToLower (eventTypeStr);
+ ToLower ((char *)eventTypeStr);
for (len = 0; table[len].event != NULL; len++)
if (!strcmp (table[len].event, (char *)eventTypeStr))
*
*************************************<->***********************************/
-void ToLower (unsigned char *string)
+void ToLower (char *string)
{
- unsigned char *pch = string;
+ char *pch = string;
#ifndef NO_MULTIBYTE
int chlen;
- while (*pch && ((chlen = mblen ((char *)pch, MB_CUR_MAX)) > 0))
+ while (*pch && ((chlen = mblen (pch, MB_CUR_MAX)) > 0))
{
if ((chlen == 1) && (isupper (*pch)))
{
XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
XInternAtom (DISPLAY, "_MOTIF_DEFAULT_BINDINGS", False));
- /* FIXME: unexported openmotif procedures */
- extern Boolean _XmVirtKeysLoadFileBindings(Display *dsp, String *binding);
- extern void _XmVirtKeysLoadFallbackBindings(Display *dsp, String *binding);
if (_XmVirtKeysLoadFileBindings (fileName, &bindings) == True) {
XChangeProperty (DISPLAY, RootWindow(DISPLAY, 0),
XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False),
static void ConfigStackPop (void)
{
- Boolean error = False;
ConfigFileStackEntry *pPrev;
char pchCmd[MAXWMPATH+1];
pAP->actionName = XtNewString ((char *) string);
/* Get action arguments, if any */
- if (pAP->aap = (DtActionArg *)
- XtMalloc (WM_ACTION_ARG_INCREMENT * sizeof (DtActionArg)))
+ if ((pAP->aap = (DtActionArg *)
+ XtMalloc (WM_ACTION_ARG_INCREMENT * sizeof (DtActionArg))))
{
iArgSz = WM_ACTION_ARG_INCREMENT;
pAP->numArgs = 0;
while ((string = GetString (linePP)) != NULL)
{
- if (pAP->aap[pAP->numArgs].u.file.name = (char *)
- XtMalloc(1 + strlen((char *)string)))
+ if ((pAP->aap[pAP->numArgs].u.file.name = (char *)
+ XtMalloc(1 + strlen((char *)string))))
{
pAP->aap[pAP->numArgs].argClass = DtACTION_FILE;
{
static Pixel pixValue;
unsigned int colorSetId = (unsigned int) pResWS->backdrop.colorSet;
- WmScreenData *pSD;
if (wmGD.statusColorServer == CSERVE_NORMAL)
{
{
static Pixel pixValue;
unsigned int colorSetId = (unsigned int) pResWS->backdrop.colorSet;
- WmScreenData *pSD;
if (wmGD.statusColorServer == CSERVE_NORMAL)
{
XrmDatabase db;
XrmValue value;
int thisScreen = pSD->screen;
- XmPixelSet *tpixset, *ppixset;
+ XmPixelSet *tpixset;
XmPixelSet *spixset;
char *res_class;
WmNbackdrop, WmCBackdrop, wmBackdropResources,
XtNumber (wmBackdropResources), NULL, 0);
- ProcessBackdropResources (pWS, NULL);
+ ProcessBackdropResources (pWS, 0);
#endif /* WSM */
} /* END OF FUNCTION ProcessWorkspaceResources */
#include "WmGlobal.h" /* This should be the first include */
#include <signal.h>
+#include <unistd.h>
/*
void SetupWmSignalHandlers (int dummy)
{
+#ifndef WSM
void (*signalHandler) ();
+#endif
#ifdef WSM
struct sigaction sa;
#include "WmFeedback.h"
#include "WmFunction.h"
#include "WmIDecor.h"
+#include "WmIPC.h"
#include "WmIPlace.h"
#include "WmIconBox.h"
#include "WmKeyFocus.h"
Window grab_win, junk_win;
Boolean grabbed;
int big_inc;
- int junk, junkX, junkY;
+ int junk;
if (!pSD->bMarqueeSelectionInitialized)
{
#include "WmImage.h"
#include "WmManage.h"
#include "WmMenu.h"
+#include "WmOL.h"
#include "WmProperty.h"
#include "WmResource.h"
#ifdef WSM
pCD->sizeWsList = pCD->pSD->numWorkspaces;
for (i = 0; i < pCD->pSD->numWorkspaces; i++)
{
- pCD->pWsList[i].wsID = NULL;
+ pCD->pWsList[i].wsID = 0L;
pCD->pWsList[i].iconPlace = NO_ICON_PLACE;
pCD->pWsList[i].iconX = 0;
pCD->pWsList[i].iconY = 0;
for (iws = 0; iws< pCD->numInhabited; iws++)
{
pWsc = &(pCD->pWsList[iws]);
- if (pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID))
+ if ((pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID)))
{
tmpIconX = (pCD->clientFlags & SM_ICON_X) ?
pWsc->iconX : pXWMHints->icon_x;
for (iws = 0; iws< pCD->numInhabited; iws++)
{
pWsc = &(pCD->pWsList[iws]);
- if (pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID))
+ if ((pWsTmp=GetWorkspaceData(pCD->pSD, pWsc->wsID)))
{
if (!(pCD->clientFlags & SM_ICON_X))
pWsc->iconX = pXWMHints->icon_x;
*/
#include "WmWinList.h"
#include "WmCEvent.h"
+#include "WmEvent.h"
#include "WmFunction.h"
#include "WmKeyFocus.h"
#include "WmMenu.h"
{
/* cannot get memory space */
size = 0;
- return;
+ return None;
}
size = count + 5;
}
ClientData *pcdLeader)
{
- ClientData *pcdNext, *pcdSub;
+ ClientData *pcdSub;
Window *nextWindow, wSave, wTemp, wTop;
int count = CountTransientChildren (pcdLeader);
register int i, j;
pCD->numInhabited = 0; /* no valid ones yet */
for (i = 0; i < pCD->pSD->numWorkspaces; i++)
{
- pCD->pWsList[i].wsID = NULL;
+ pCD->pWsList[i].wsID = None;
pCD->pWsList[i].iconPlace = NO_ICON_PLACE;
pCD->pWsList[i].iconX = 0;
pCD->pWsList[i].iconY = 0;
- pCD->pWsList[i].iconFrameWin = NULL;
+ pCD->pWsList[i].iconFrameWin = None;
pCD->pWsList[i].pIconBox = NULL;
}
pCD->putInAll = bAll = False;
strcpy ((char *)pchLocal, (char *)pchIn);
pch = pchLocal;
- while (pchName = GetSmartString (&pch))
+ while ((pchName = GetSmartString (&pch)))
{
int iwsx;
XmString xms;
* Put the client into requested workspaces that
* exist.
*/
- if (pWS = GetWorkspaceData (pCD->pSD,
- pCD->pWorkspaceHints[i]))
+ if ((pWS = GetWorkspaceData (pCD->pSD,
+ pCD->pWorkspaceHints[i])))
{
PutClientIntoWorkspace (pWS, pCD);
}
clientY -= (pCD_Panel->frameInfo.upperBorderWidth +
pCD_Panel->frameInfo.titleBarHeight);
}
- sprintf (tmpBuffer, "+%d+%d\0", clientX, clientY);
+ sprintf (tmpBuffer, "+%d+%d", clientX, clientY);
}
else
{
clientY -= pCD_Panel->frameInfo.lowerBorderWidth;
}
- sprintf (tmpBuffer, "+%d-%d\0", clientX, clientY);
+ sprintf (tmpBuffer, "+%d-%d", clientX, clientY);
}
}
else
clientY -= (pCD_Panel->frameInfo.upperBorderWidth +
pCD_Panel->frameInfo.titleBarHeight);
}
- sprintf (tmpBuffer, "-%d+%d\0", clientX, clientY);
+ sprintf (tmpBuffer, "-%d+%d", clientX, clientY);
}
else
{
{
clientY -= pCD_Panel->frameInfo.lowerBorderWidth;
}
- sprintf (tmpBuffer, "-%d-%d\0", clientX, clientY);
+ sprintf (tmpBuffer, "-%d-%d", clientX, clientY);
}
}
clientY = pWS->pIconBox->pCD_iconBox->clientY;
}
- sprintf (buffer, "%dx%d+%d+%d\0", clientWidth, clientHeight,
+ sprintf (buffer, "%dx%d+%d+%d", clientWidth, clientHeight,
clientX, clientY);
pWS->iconBoxGeometry = strdup( buffer);
ClientData *pCD) ;
extern void SetClientWsIndex(
ClientData *pCD) ;
+void ProcessDtWmHints (ClientData *pCD) ;
extern Boolean ProcessWorkspaceHints(
ClientData *pCD) ;
extern void ProcessWorkspaceHintList(