Because idle detection on xwayland is not possible, just assume
that the user is not idle. This also somehow fixes notifications
not disapearing when clicking on them.
As far as I know, it's not possible to differentiate keyboard and
mouse focus, so they behave the same. This commit also fixes
a bug where a NULL pointer was dereferenced.
When the user doesn't have a seat, or their compositor doesn't support the idle
protocol, we'll assume that they are not idle.
Also, rename wl_output to something that doesn't exist yet.
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.
The notification spec has no concept of disallowing closing notifications,
so to make the ignore_dbusclose 'compliant' we choose to lie to the clients
that the notification is actually closed, but keep it open.
To do this, we send a NotificationClosed signal back (via signal_notification_closed
which also call notification_invalidate_action)
g_list_nth_data was used to query the notification list, but in the code
it was erroneously assumed that a GList object was returned rather than
a notification.
One of the many pitfalls of generic pointers...
Fixes#727
The timeline of this issue is as follows:
In 7a094bc a call to XClearWindow/XFlush was added as part of RGBA
support.
Afterwards, I noticed that there is some noticeable flicker while
redrawing for large notifications, so I foolishly removed both of these
calls without considering the full effects.
As a result when redrawing notifications 'stack up' with each-other.
After a testing it seems that the XFlush call that was causing
the flicker is not necessary and XClearWindow works without it.
Fixes#728
This reverts commit 7a094bc702149104cd4049281a7dd9ed0ab76c89.
This commit caused a flicker effect every time the window was redrawn,
reverting it for now.