aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c52
1 files changed, 39 insertions, 13 deletions
diff --git a/src/main.c b/src/main.c
index d9c6e78..ed3a901 100644
--- a/src/main.c
+++ b/src/main.c
@@ -174,7 +174,9 @@ int main(int argc, char *argv[]) {
/****************************************************************************
****************************************************************************/
-void DoExit(int code) {
+void
+DoExit(int code)
+{
Destroy();
if(configPath) {
@@ -192,7 +194,9 @@ void DoExit(int code) {
/****************************************************************************
****************************************************************************/
-void EventLoop() {
+void
+EventLoop()
+{
XEvent event;
while(!shouldExit) {
@@ -203,7 +207,9 @@ void EventLoop() {
/****************************************************************************
****************************************************************************/
-void OpenConnection() {
+void
+OpenConnection()
+{
display = JXOpenDisplay(displayString);
if(!display) {
@@ -231,7 +237,9 @@ void OpenConnection() {
/****************************************************************************
****************************************************************************/
-void StartupConnection() {
+void
+StartupConnection()
+{
XSetWindowAttributes attr;
int temp;
@@ -276,20 +284,26 @@ void StartupConnection() {
/****************************************************************************
****************************************************************************/
-void CloseConnection() {
+void
+CloseConnection()
+{
JXFlush(display);
JXCloseDisplay(display);
}
/****************************************************************************
****************************************************************************/
-void ShutdownConnection() {
+void
+ShutdownConnection()
+{
CloseConnection();
}
/****************************************************************************
****************************************************************************/
-void HandleExit() {
+void
+HandleExit()
+{
signal(SIGTERM, HandleExit);
signal(SIGINT, HandleExit);
signal(SIGHUP, HandleExit);
@@ -299,7 +313,9 @@ void HandleExit() {
/****************************************************************************
* This is called before the X connection is opened.
****************************************************************************/
-void Initialize() {
+void
+Initialize()
+{
InitializeBorders();
InitializeClients();
InitializeClock();
@@ -332,7 +348,9 @@ void Initialize() {
/****************************************************************************
* This is called after the X connection is opened.
****************************************************************************/
-void Startup() {
+void
+Startup()
+{
/* This order is important. */
@@ -393,7 +411,9 @@ void Startup() {
/****************************************************************************
* This is called before the X connection is closed.
****************************************************************************/
-void Shutdown() {
+void
+Shutdown()
+{
/* This order is important. */
@@ -434,7 +454,9 @@ void Shutdown() {
* This is called after the X connection is closed.
* Note that it is possible for this to be called more than once.
****************************************************************************/
-void Destroy() {
+void
+Destroy()
+{
DestroyBorders();
DestroyClients();
DestroyClock();
@@ -467,7 +489,9 @@ void Destroy() {
/****************************************************************************
* Send _JWM_RESTART to the root window.
****************************************************************************/
-void SendRestart() {
+void
+SendRestart()
+{
XEvent event;
@@ -488,7 +512,9 @@ void SendRestart() {
/****************************************************************************
* Send _JWM_EXIT to the root window.
****************************************************************************/
-void SendExit() {
+void
+SendExit()
+{
XEvent event;