kms: Notify about privacy screen changes via predictions
When we change the privacy screen, we added a result listener to the KMS update object to notify the upper layer about the privacy screen state change. This was slightly awkward as one might have changed the state multiple times for a single update, thus it was necessary to remove any old result listeners to an update before adding a new one. Doing this will not be possible when updates are fully async and managed by the KMS impl device. To handle this, instead make the post-commit prediction notify about changes that happens in response to a successfully committed update. We already predicted the new privacy screen state, so the necessary change was to plumb the actual change into a callback which emits the signal if there actually was a privacy screen change. This will then be communicated via the same signal listener that already listens to the 'resources-changed' signal. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2340>
This commit is contained in:
@ -246,9 +246,6 @@ struct _MetaMonitorManagerClass
|
||||
unsigned short *green,
|
||||
unsigned short *blue);
|
||||
|
||||
gboolean (* set_privacy_screen_enabled) (MetaMonitorManager *manager,
|
||||
gboolean enabled);
|
||||
|
||||
void (* tiled_monitor_added) (MetaMonitorManager *manager,
|
||||
MetaMonitor *monitor);
|
||||
|
||||
|
Reference in New Issue
Block a user