Matthias Kruk [Mon, 3 May 2021 00:25:10 +0000 (09:25 +0900)]
mwm: Implement monitor detection
Monitors connected to the X Server have to be detected in order to
provide meaningful window manager functionality.
This commit implements dynamic detection of monitors and adds events
that a callback can be connected to, so that it will be executed when
a monitor has been added.
Matthias Kruk [Sun, 2 May 2021 11:39:05 +0000 (20:39 +0900)]
array: Make array_get() return an error if an element wasn't set
The array_get() function returns success when an entry is retrieved that
was never set. This makes it hard to distinguish uninitialized entries.
This commit changes array_get() to return an error if the caller is
attempting to retrieve an uninitialized entry.
Matthias Kruk [Sun, 2 May 2021 00:56:27 +0000 (09:56 +0900)]
main: Instantiate and run mwm
The main() function currently does nothing but parse teh commandline.
This commit changes the main() function so that it creates an mwm
instance and subsequently initializes and executes it.
Matthias Kruk [Sun, 2 May 2021 00:51:26 +0000 (09:51 +0900)]
monitor: Add data type for monitor management
To keep track of connected monitors, a data type is necessary.
This commit adds the monitor datatype that is used to keep track
of the size and position of a monitor.