From 42ef8578eb7b386631e74a2b1465dde345e753a0 Mon Sep 17 00:00:00 2001 From: liuyi92 Date: Mon, 8 Oct 2018 14:12:06 +0800 Subject: [PATCH] do not apply xrandr config in ukwm --- src/backends/meta-monitor-config-migration.c | 4 ++-- src/backends/meta-monitor-config-store.c | 4 ++-- src/backends/x11/meta-monitor-manager-xrandr.c | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/backends/meta-monitor-config-migration.c b/src/backends/meta-monitor-config-migration.c index d619dc4..89842cf 100644 --- a/src/backends/meta-monitor-config-migration.c +++ b/src/backends/meta-monitor-config-migration.c @@ -1160,7 +1160,7 @@ meta_migrate_old_user_monitors_config (MetaMonitorConfigStore *config_store, g_autoptr (GFile) user_file = NULL; user_file_path = g_build_filename (g_get_user_config_dir (), - "monitors.xml", + "ukwm-monitors.xml", NULL); user_file = g_file_new_for_path (user_file_path); backup_path = g_build_filename (g_get_user_config_dir (), @@ -1173,7 +1173,7 @@ meta_migrate_old_user_monitors_config (MetaMonitorConfigStore *config_store, NULL, NULL, NULL, error)) { - g_warning ("Failed to make a backup of monitors.xml: %s", + g_warning ("Failed to make a backup of ukwm-monitors.xml: %s", (*error)->message); g_clear_error (error); } diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c index afbd38d..60c2dae 100644 --- a/src/backends/meta-monitor-config-store.c +++ b/src/backends/meta-monitor-config-store.c @@ -221,7 +221,7 @@ handle_start_element (GMarkupParseContext *context, g_set_error_literal (error, META_MONITOR_CONFIG_STORE_ERROR, META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION, - "monitors.xml has the old format"); + "ukwm-monitors.xml has the old format"); return; } @@ -1489,7 +1489,7 @@ meta_monitor_config_store_constructed (GObject *object) GError *error = NULL; user_file_path = g_build_filename (g_get_user_config_dir (), - "monitors.xml", + "ukwm-monitors.xml", NULL); config_store->user_file = g_file_new_for_path (user_file_path); diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c index 248d17b..37eea44 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -1502,6 +1502,8 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana MetaMonitorsConfigMethod method, GError **error) { +/* Since xrandr applied by desktop,ukwm should not apply xrandr config + GPtrArray *crtc_infos; GPtrArray *output_infos; @@ -1517,7 +1519,7 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana return FALSE; if (method != META_MONITORS_CONFIG_METHOD_VERIFY) - { + {*/ /* * If the assignment has not changed, we won't get any notification about * any new configuration from the X server; but we still need to update @@ -1526,7 +1528,7 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana * must check that our new assignment actually changes anything, otherwise * just update the logical state. */ - if (is_assignments_changed (manager, +/* if (is_assignments_changed (manager, (MetaCrtcInfo **) crtc_infos->pdata, crtc_infos->len, (MetaOutputInfo **) output_infos->pdata, @@ -1546,7 +1548,7 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana } g_ptr_array_free (crtc_infos, TRUE); - g_ptr_array_free (output_infos, TRUE); + g_ptr_array_free (output_infos, TRUE);*/ return TRUE; }