mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Remove unused functions
These functions are not used: - wDefaultsDestroyDomain - PropWriteGNUstepWMAttr - wSessionSendSaveYourSelf - wXDNDClearAwareness - clearWaitingAckState - wSessionSaveClients
This commit is contained in:
committed by
Carlos R. Mafra
parent
ba786015b7
commit
517cd6a8be
@@ -799,14 +799,6 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
|
|||||||
menuDomain->dictionary = menu;
|
menuDomain->dictionary = menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wDefaultsDestroyDomain(WDDomain * domain)
|
|
||||||
{
|
|
||||||
if (domain->dictionary)
|
|
||||||
WMReleasePropList(domain->dictionary);
|
|
||||||
wfree(domain->path);
|
|
||||||
wfree(domain);
|
|
||||||
}
|
|
||||||
|
|
||||||
WDDomain *wDefaultsInitDomain(char *domain, Bool requireDictionary)
|
WDDomain *wDefaultsInitDomain(char *domain, Bool requireDictionary)
|
||||||
{
|
{
|
||||||
WDDomain *db;
|
WDDomain *db;
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ WDDomain* wDefaultsInitDomain(char *domain, Bool requireDictionary);
|
|||||||
|
|
||||||
void wDefaultsMergeGlobalMenus(WDDomain *menuDomain);
|
void wDefaultsMergeGlobalMenus(WDDomain *menuDomain);
|
||||||
|
|
||||||
void wDefaultsDestroyDomain(WDDomain *domain);
|
|
||||||
|
|
||||||
void wReadDefaults(WScreen *scr, WMPropList *new_dict);
|
void wReadDefaults(WScreen *scr, WMPropList *new_dict);
|
||||||
|
|
||||||
void wDefaultUpdateIcons(WScreen *scr);
|
void wDefaultUpdateIcons(WScreen *scr);
|
||||||
|
|||||||
@@ -244,24 +244,6 @@ Window PropGetClientLeader(Window window)
|
|||||||
return leader;
|
return leader;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropWriteGNUstepWMAttr(Window window, GNUstepWMAttributes * attr)
|
|
||||||
{
|
|
||||||
unsigned long data[9];
|
|
||||||
|
|
||||||
data[0] = attr->flags;
|
|
||||||
data[1] = attr->window_style;
|
|
||||||
data[2] = attr->window_level;
|
|
||||||
data[3] = 0; /* reserved */
|
|
||||||
/* The X protocol says XIDs are 32bit */
|
|
||||||
data[4] = attr->miniaturize_pixmap;
|
|
||||||
data[5] = attr->close_pixmap;
|
|
||||||
data[6] = attr->miniaturize_mask;
|
|
||||||
data[7] = attr->close_mask;
|
|
||||||
data[8] = attr->extra_flags;
|
|
||||||
XChangeProperty(dpy, window, _XA_GNUSTEP_WM_ATTR, _XA_GNUSTEP_WM_ATTR,
|
|
||||||
32, PropModeReplace, (unsigned char *)data, 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
int PropGetWindowState(Window window)
|
int PropGetWindowState(Window window)
|
||||||
{
|
{
|
||||||
long *data;
|
long *data;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ int PropGetNormalHints(Window window, XSizeHints *size_hints, int *pre_iccm);
|
|||||||
void PropGetProtocols(Window window, WProtocols *prots);
|
void PropGetProtocols(Window window, WProtocols *prots);
|
||||||
int PropGetWMClass(Window window, char **wm_class, char **wm_instance);
|
int PropGetWMClass(Window window, char **wm_class, char **wm_instance);
|
||||||
int PropGetGNUstepWMAttr(Window window, GNUstepWMAttributes **attr);
|
int PropGetGNUstepWMAttr(Window window, GNUstepWMAttributes **attr);
|
||||||
void PropWriteGNUstepWMAttr(Window window, GNUstepWMAttributes *attr);
|
|
||||||
|
|
||||||
void PropSetWMakerProtocols(Window root);
|
void PropSetWMakerProtocols(Window root);
|
||||||
void PropCleanUp(Window root);
|
void PropCleanUp(Window root);
|
||||||
|
|||||||
@@ -554,77 +554,3 @@ void wSessionRestoreLastWorkspace(WScreen * scr)
|
|||||||
wWorkspaceChange(scr, w);
|
wWorkspaceChange(scr, w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clearWaitingAckState(WScreen * scr)
|
|
||||||
{
|
|
||||||
WWindow *wwin;
|
|
||||||
WApplication *wapp;
|
|
||||||
|
|
||||||
for (wwin = scr->focused_window; wwin != NULL; wwin = wwin->prev) {
|
|
||||||
wwin->flags.waiting_save_ack = 0;
|
|
||||||
if (wwin->main_window != None) {
|
|
||||||
wapp = wApplicationOf(wwin->main_window);
|
|
||||||
if (wapp)
|
|
||||||
wapp->main_window_desc->flags.waiting_save_ack = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wSessionSaveClients(WScreen * scr)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* With XSMP, this job is done by smproxy
|
|
||||||
*/
|
|
||||||
void wSessionSendSaveYourself(WScreen * scr)
|
|
||||||
{
|
|
||||||
WWindow *wwin;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
/* freeze client interaction with clients */
|
|
||||||
XGrabKeyboard(dpy, scr->root_win, False, GrabModeAsync, GrabModeAsync, CurrentTime);
|
|
||||||
XGrabPointer(dpy, scr->root_win, False, ButtonPressMask | ButtonReleaseMask,
|
|
||||||
GrabModeAsync, GrabModeAsync, scr->root_win, None, CurrentTime);
|
|
||||||
|
|
||||||
clearWaitingAckState(scr);
|
|
||||||
|
|
||||||
count = 0;
|
|
||||||
|
|
||||||
/* first send SAVE_YOURSELF for everybody */
|
|
||||||
for (wwin = scr->focused_window; wwin != NULL; wwin = wwin->prev) {
|
|
||||||
WWindow *mainWin;
|
|
||||||
|
|
||||||
mainWin = wWindowFor(wwin->main_window);
|
|
||||||
|
|
||||||
if (mainWin) {
|
|
||||||
/* if the client is a multi-window client, only send message
|
|
||||||
* to the main window */
|
|
||||||
wwin = mainWin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* make sure the SAVE_YOURSELF flag is up-to-date */
|
|
||||||
PropGetProtocols(wwin->client_win, &wwin->protocols);
|
|
||||||
|
|
||||||
if (wwin->protocols.SAVE_YOURSELF) {
|
|
||||||
if (!wwin->flags.waiting_save_ack) {
|
|
||||||
wClientSendProtocol(wwin, _XA_WM_SAVE_YOURSELF, LastTimestamp);
|
|
||||||
|
|
||||||
wwin->flags.waiting_save_ack = 1;
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
wwin->flags.waiting_save_ack = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* then wait for acknowledge */
|
|
||||||
while (count > 0) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
|
||||||
XUngrabKeyboard(dpy, CurrentTime);
|
|
||||||
XFlush(dpy);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -43,19 +43,9 @@ typedef struct {
|
|||||||
char user_changed_height;
|
char user_changed_height;
|
||||||
} WSessionData;
|
} WSessionData;
|
||||||
|
|
||||||
|
|
||||||
void wSessionSaveState(WScreen *scr);
|
void wSessionSaveState(WScreen *scr);
|
||||||
|
|
||||||
void wSessionSaveClients(WScreen *scr);
|
|
||||||
|
|
||||||
void wSessionSendSaveYourself(WScreen *scr);
|
|
||||||
|
|
||||||
void wSessionClearState(WScreen *scr);
|
void wSessionClearState(WScreen *scr);
|
||||||
|
|
||||||
void wSessionRestoreState(WScreen *scr);
|
void wSessionRestoreState(WScreen *scr);
|
||||||
|
|
||||||
void wSessionRestoreLastWorkspace(WScreen *scr);
|
void wSessionRestoreLastWorkspace(WScreen *scr);
|
||||||
|
|
||||||
Bool wSessionGetStateFor(WWindow *wwin, WSessionData *state);
|
Bool wSessionGetStateFor(WWindow *wwin, WSessionData *state);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -76,9 +76,6 @@ void Shutdown(WShutdownMode mode)
|
|||||||
if (scr->helper_pid)
|
if (scr->helper_pid)
|
||||||
kill(scr->helper_pid, SIGKILL);
|
kill(scr->helper_pid, SIGKILL);
|
||||||
|
|
||||||
/* if the session is not being managed, save restart info */
|
|
||||||
wSessionSaveClients(scr);
|
|
||||||
|
|
||||||
wScreenSaveState(scr);
|
wScreenSaveState(scr);
|
||||||
|
|
||||||
if (mode == WSKillMode)
|
if (mode == WSKillMode)
|
||||||
|
|||||||
@@ -84,11 +84,6 @@ void wXDNDMakeAwareness(Window window)
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void wXDNDClearAwareness(Window window)
|
|
||||||
{
|
|
||||||
XDeleteProperty(dpy, window, _XA_XdndAware);
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool wXDNDProcessSelection(XEvent * event)
|
Bool wXDNDProcessSelection(XEvent * event)
|
||||||
{
|
{
|
||||||
WScreen *scr = wScreenForWindow(event->xselection.requestor);
|
WScreen *scr = wScreenForWindow(event->xselection.requestor);
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
|
|
||||||
#ifndef _XDND_H_
|
#ifndef _XDND_H_
|
||||||
#define _XDND_H_
|
#define _XDND_H_
|
||||||
|
|
||||||
|
|
||||||
void wXDNDInitializeAtoms();
|
void wXDNDInitializeAtoms();
|
||||||
Bool wXDNDProcessSelection(XEvent *event);
|
Bool wXDNDProcessSelection(XEvent *event);
|
||||||
Bool wXDNDProcessClientMessage(XClientMessageEvent *event);
|
Bool wXDNDProcessClientMessage(XClientMessageEvent *event);
|
||||||
void wXDNDMakeAwareness(Window window);
|
void wXDNDMakeAwareness(Window window);
|
||||||
void wXDNDClearAwareness(Window window);
|
|
||||||
|
|
||||||
/* header was ripped from xdnd's example on its page */
|
/* header was ripped from xdnd's example on its page */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user