display: Make the display handle its own prefs handlers

Two prefs were handled by display.c itself, and another in main.c.
Unscattter things a bit by moving the one in main.c to the others in
display.c.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1833>
This commit is contained in:
Jonas Ådahl
2021-02-25 15:58:56 +01:00
committed by Marge Bot
parent 9cd99ee7ac
commit f677e0cbfb
2 changed files with 9 additions and 32 deletions

View File

@ -2657,10 +2657,17 @@ prefs_changed_callback (MetaPreference pref,
{
MetaDisplay *display = data;
if (pref == META_PREF_CURSOR_THEME ||
pref == META_PREF_CURSOR_SIZE)
switch (pref)
{
case META_PREF_DRAGGABLE_BORDER_WIDTH:
meta_display_queue_retheme_all_windows (display);
break;
case META_PREF_CURSOR_THEME:
case META_PREF_CURSOR_SIZE:
meta_display_reload_cursor (display);
break;
default:
break;
}
}