This commit adds an output struct which abstracts the X11 specific
functions and makes it possible to easily create a drop-in wayland
output.
It also fixes a bug in wayland where notifications won't disappear.
This is because wayland doesn't give access to user input when a
client is not in focus. This way it seems like the user is always
idle. The idle functionality is now disabled in Wayland until proper
support is added.
This adds the option `content_alignment`, which allows the user to set
the vertical alignment of the notification's content (i.e. icon and
text) to either top (`CONTENT_TOP`), center (`CONTENT_CENTER`, default),
or bottom (`CONTENT_BOT`). The default preserves current behaviour,
while the other options fulfill #486.
Draw should not be called when there are no notifications in the queue.
This for unknown reasons causes a crash the next time we attempt to get
the currently active window with a BadValue error from
XGetWindowProperty.
Fixes#630.
When changing the DPI via xrandr --dpi <DPI>, xrandr will send a
RRScreenChangeEvent and the DPI value should get adjusted.
Falsely, we thought randr_update() would catch up and query the right
monitor values. But nothing changes, because we query the
XRRMonitorInfo. The monitor info contains the real physical width and
height of the monitor's screen.
But xrandr --dpi only changes the - let's say - virtual screen size of
the virtual overall screen (and therefore changing the DPI to the
matching value).
Important commands to understand:
- Changes dpi of the virtual screen
xrandr --dpi
- Gives info about the "virtual" screen size (used by DisplayWidth)
xdpyinfo | grep -B1 resolution
- Gives info about the "physical" screen size (used by XRRMonitorInfo)
xrandr -q
I know, that I'm probably not right and might not understand the topic
in its full size yet[0]. But I'm 100% sure, that the terms "monitor",
"screen", "screens", "output" and "display" do not have a consistent
naming scheme.
[0] https://twitter.com/dechampsgu/status/857924498280124416Fixes#382
Changes all string parsers to have a the almost same interface while
also having a proper return value, which indicates success of the
parsing process.