gdk_display_get_primary_monitor never returns NULL
Steps to reproduce
- Make sure no output is marked as primary (e.g. via
xrandr --noprimary
) - Call
if (gdk_display_get_primary_monitor (gdk_display_get_default ()) == NULL)
g_warning ("no primary display configured");
else
g_warning ("yay, found a primary display.");
- Note that despite not having a primary output configured in xrandr, the call does not return NULL.
Current behavior
Despite the documentation saying otherwise, gdk_display_get_primary_monitor never returns NULL, even if no primary monitors are defined.
Expected outcome
If no primary monitor is defined, NULL should be returned (so panel/dock-like applications know what to do).
Version information
3.24.1-1ubuntu2
Additional information
None needed (I think everything is fairly clear).