marco 1.29.1
Window manager
Loading...
Searching...
No Matches
main.h File Reference
View source
#include <glib.h>
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Enumerations

enum  MetaExitCode { META_EXIT_SUCCESS , META_EXIT_ERROR }
 

Functions

void meta_exit (MetaExitCode code)
 
void meta_quit (MetaExitCode code)
 Stops Marco.
 
void meta_restart (void)
 Restarts Marco.
 

Enumeration Type Documentation

◆ MetaExitCode

Enumerator
META_EXIT_SUCCESS 
META_EXIT_ERROR 

Function Documentation

◆ meta_exit()

void meta_exit ( MetaExitCode  code)

Referenced by main(), and meta_fatal().

◆ meta_quit()

void meta_quit ( MetaExitCode  code)

Stops Marco.

This tells the event loop to stop processing; it is rather dangerous to use this rather than meta_restart() because this will leave the user with no window manager. We generally do this only if, for example, the session manager asks us to; we assume the session manager knows what it's talking about.

Parameters
codeThe success or failure code to return to the calling process.

References meta_exit_code, and meta_main_loop.

Referenced by meta_display_close(), meta_restart(), and on_sigterm().

◆ meta_restart()

void meta_restart ( void  )

Restarts Marco.

In practice, this tells the event loop to stop processing, having first set the meta_restart_after_quit flag which tells Marco to spawn an identical copy of itself before quitting. This happens on receipt of a _MARCO_RESTART_MESSAGE client event.

References META_EXIT_SUCCESS, meta_quit(), meta_restart_after_quit, and TRUE.

Referenced by event_callback().

Here is the call graph for this function: