>From c552dd1102d3c4dbc5af3991cc0d5f83a11af3d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Mon, 2 Apr 2012 17:26:11 +0200
Subject: [PATCH] WindowMaker: Removed functions not used

These functions are not used:

- wDefaultsDestroyDomain
- PropWriteGNUstepWMAttr
- wSessionSendSaveYourSelf
- wXDNDClearAwareness
- clearWaitingAckState
- wSessionSaveClients
---
 src/defaults.c   |    8 ------
 src/defaults.h   |    2 -
 src/properties.c |   18 -------------
 src/properties.h |    1 -
 src/session.c    |   74 ------------------------------------------------------
 src/session.h    |    9 ------
 src/shutdown.c   |    3 --
 src/xdnd.c       |    5 ---
 src/xdnd.h       |    3 --
 9 files changed, 0 insertions(+), 123 deletions(-)

diff --git a/src/defaults.c b/src/defaults.c
index 5b5269b..8e8b3f2 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -797,14 +797,6 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
        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 *db;
diff --git a/src/defaults.h b/src/defaults.h
index fdf09cd..79859bc 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -37,8 +37,6 @@ WDDomain* wDefaultsInitDomain(char *domain, Bool 
requireDictionary);
 
 void wDefaultsMergeGlobalMenus(WDDomain *menuDomain);
 
-void wDefaultsDestroyDomain(WDDomain *domain);
-
 void wReadDefaults(WScreen *scr, WMPropList *new_dict);
 
 void wDefaultUpdateIcons(WScreen *scr);
diff --git a/src/properties.c b/src/properties.c
index 46bc3ca..0442077 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -244,24 +244,6 @@ Window PropGetClientLeader(Window window)
        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)
 {
        long *data;
diff --git a/src/properties.h b/src/properties.h
index dcd735a..10c73d2 100644
--- a/src/properties.h
+++ b/src/properties.h
@@ -33,7 +33,6 @@ int PropGetNormalHints(Window window, XSizeHints *size_hints, 
int *pre_iccm);
 void PropGetProtocols(Window window, WProtocols *prots);
 int PropGetWMClass(Window window, char **wm_class, char **wm_instance);
 int PropGetGNUstepWMAttr(Window window, GNUstepWMAttributes **attr);
-void PropWriteGNUstepWMAttr(Window window, GNUstepWMAttributes *attr);
 
 void PropSetWMakerProtocols(Window root);
 void PropCleanUp(Window root);
diff --git a/src/session.c b/src/session.c
index 811aee3..a2795a3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -554,77 +554,3 @@ void wSessionRestoreLastWorkspace(WScreen * scr)
                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);
-}
diff --git a/src/session.h b/src/session.h
index 3c083c7..196698b 100644
--- a/src/session.h
+++ b/src/session.h
@@ -43,19 +43,9 @@ typedef struct {
     char user_changed_height;
 } WSessionData;
 
-
 void wSessionSaveState(WScreen *scr);
-
-void wSessionSaveClients(WScreen *scr);
-
-void wSessionSendSaveYourself(WScreen *scr);
-
 void wSessionClearState(WScreen *scr);
-
 void wSessionRestoreState(WScreen *scr);
-
 void wSessionRestoreLastWorkspace(WScreen *scr);
-
 Bool wSessionGetStateFor(WWindow *wwin, WSessionData *state);
-
 #endif
diff --git a/src/shutdown.c b/src/shutdown.c
index f0b137d..0cf9ab7 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -76,9 +76,6 @@ void Shutdown(WShutdownMode mode)
                                if (scr->helper_pid)
                                        kill(scr->helper_pid, SIGKILL);
 
-                               /* if the session is not being managed, save 
restart info */
-                                       wSessionSaveClients(scr);
-
                                wScreenSaveState(scr);
 
                                if (mode == WSKillMode)
diff --git a/src/xdnd.c b/src/xdnd.c
index 86c3553..5230da5 100644
--- a/src/xdnd.c
+++ b/src/xdnd.c
@@ -84,11 +84,6 @@ void wXDNDMakeAwareness(Window window)
      */
 }
 
-void wXDNDClearAwareness(Window window)
-{
-       XDeleteProperty(dpy, window, _XA_XdndAware);
-}
-
 Bool wXDNDProcessSelection(XEvent * event)
 {
        WScreen *scr = wScreenForWindow(event->xselection.requestor);
diff --git a/src/xdnd.h b/src/xdnd.h
index 23295f1..1ee0e43 100644
--- a/src/xdnd.h
+++ b/src/xdnd.h
@@ -1,13 +1,10 @@
-
 #ifndef _XDND_H_
 #define _XDND_H_
 
-
 void wXDNDInitializeAtoms();
 Bool wXDNDProcessSelection(XEvent *event);
 Bool wXDNDProcessClientMessage(XClientMessageEvent *event);
 void wXDNDMakeAwareness(Window window);
-void wXDNDClearAwareness(Window window);
 
 /* header was ripped from xdnd's example on its page */
 
-- 
1.7.9.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to