diff --git a/src/WindowMaker.h b/src/WindowMaker.h index ee6dbf90..039a67ba 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -87,16 +87,6 @@ typedef struct WObjDescriptor { void *parent; /* parent object (WWindow or WMenu) */ } WObjDescriptor; - -/* shutdown modes */ -typedef enum { - WSExitMode, - WSLogoutMode, - WSKillMode, - WSRestartPreparationMode -} WShutdownMode; - - /* internal buttons */ #define WBUT_CLOSE 0 #define WBUT_BROKENCLOSE 1 diff --git a/src/event.c b/src/event.c index 2ac11f3b..ace2a3cf 100644 --- a/src/event.c +++ b/src/event.c @@ -69,6 +69,7 @@ #include "rootmenu.h" #include "colormap.h" #include "screen.h" +#include "shutdown.h" /******** Global Variables **********/ extern XContext wWinContext; diff --git a/src/funcs.h b/src/funcs.h index 24c6c94b..a7df6cbe 100644 --- a/src/funcs.h +++ b/src/funcs.h @@ -30,8 +30,6 @@ typedef void (WCallBack)(void *cdata); typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata); -void Shutdown(WShutdownMode mode); -void RestoreDesktop(WScreen *scr); void DispatchEvent(XEvent *event); void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action); void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard); diff --git a/src/main.c b/src/main.c index 51808b0a..f63b1a6e 100644 --- a/src/main.c +++ b/src/main.c @@ -50,6 +50,7 @@ #include "keybind.h" #include "xmodifier.h" #include "session.h" +#include "shutdown.h" #include "dialog.h" #include diff --git a/src/rootmenu.c b/src/rootmenu.c index 2fcd0ae9..0b263cd9 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -50,6 +50,7 @@ #include "defaults.h" #include "framewin.h" #include "session.h" +#include "shutdown.h" #include "xmodifier.h" #include diff --git a/src/shutdown.c b/src/shutdown.c index d86bd0d7..67c39abd 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -37,6 +37,7 @@ #include "winspector.h" #include "wmspec.h" #include "colormap.h" +#include "shutdown.h" extern Atom _XA_WM_DELETE_WINDOW; extern Time LastTimestamp; diff --git a/src/shutdown.h b/src/shutdown.h new file mode 100644 index 00000000..a88398fe --- /dev/null +++ b/src/shutdown.h @@ -0,0 +1,31 @@ +/* shutdown.c - Shutdown functions + * + * Window Maker window manager + * + * Copyright (c) 2013 Window Maker Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* shutdown modes */ +typedef enum { + WSExitMode, + WSLogoutMode, + WSKillMode, + WSRestartPreparationMode +} WShutdownMode; + +void Shutdown(WShutdownMode mode); +void RestoreDesktop(WScreen *scr);