[gnome-settings-daemon] common: Remove unused GsdDeviceMapper API to explicitly assign outputs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] common: Remove unused GsdDeviceMapper API to explicitly assign outputs
- Date: Sun, 12 Feb 2017 18:29:44 +0000 (UTC)
commit 4db56864fab207c6c832ff949c454090e138432e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Feb 11 22:52:09 2017 +0100
common: Remove unused GsdDeviceMapper API to explicitly assign outputs
It exposes gnome-rr unnecessarily, while both wacom/xrandr rely on the
implicit mapping.
https://bugzilla.gnome.org/show_bug.cgi?id=773958
plugins/common/gsd-device-mapper.c | 81 ++----------------------------------
plugins/common/gsd-device-mapper.h | 22 ----------
2 files changed, 4 insertions(+), 99 deletions(-)
---
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
index 0ae4099..6ea1376 100644
--- a/plugins/common/gsd-device-mapper.c
+++ b/plugins/common/gsd-device-mapper.c
@@ -27,6 +27,10 @@
#include <libwacom/libwacom.h>
#endif
+#define GNOME_DESKTOP_USE_UNSTABLE_API
+#include <libgnome-desktop/gnome-rr.h>
+#undef GNOME_DESKTOP_USE_UNSTABLE_API
+
#include "gsd-device-manager.h"
#include "gsd-device-mapper.h"
#include "gsd-input-helper.h"
@@ -1016,80 +1020,3 @@ gsd_device_mapper_remove_input (GsdDeviceMapper *mapper,
g_hash_table_remove (mapper->input_devices, device);
}
-
-GnomeRROutput *
-gsd_device_mapper_get_device_output (GsdDeviceMapper *mapper,
- GsdDevice *device)
-{
- GsdOutputInfo *output;
- GsdInputInfo *input;
-
- g_return_val_if_fail (mapper != NULL, NULL);
- g_return_val_if_fail (device != NULL, NULL);
-
- input = g_hash_table_lookup (mapper->input_devices, device);
- output = input_info_get_output (input);
-
- if (!output)
- return NULL;
-
- return output->output;
-}
-
-gint
-gsd_device_mapper_get_device_monitor (GsdDeviceMapper *mapper,
- GsdDevice *device)
-{
- GsdOutputInfo *output;
- GsdInputInfo *input;
-
- g_return_val_if_fail (GSD_IS_DEVICE_MAPPER (mapper), -1);
- g_return_val_if_fail (GSD_IS_DEVICE (device), -1);
-
- input = g_hash_table_lookup (mapper->input_devices, device);
-
- if (!input)
- return -1;
-
- output = input_info_get_output (input);
-
- if (!output)
- return -1;
-
- return monitor_for_output (output->output);
-}
-
-void
-gsd_device_mapper_set_device_output (GsdDeviceMapper *mapper,
- GsdDevice *device,
- GnomeRROutput *output)
-{
- GsdInputInfo *input_info;
- GsdOutputInfo *output_info;
-
- g_return_if_fail (mapper != NULL);
- g_return_if_fail (GSD_IS_DEVICE (device));
-
- input_info = g_hash_table_lookup (mapper->input_devices, device);
- output_info = g_hash_table_lookup (mapper->output_devices, output);
-
- if (!input_info || !output_info)
- return;
-
- input_info_set_output (input_info, output_info, FALSE, TRUE);
- input_info_remap (input_info);
-}
-
-void
-gsd_device_mapper_set_device_monitor (GsdDeviceMapper *mapper,
- GsdDevice *device,
- gint monitor_num)
-{
- GnomeRROutput *output;
-
- g_return_if_fail (GSD_IS_DEVICE_MAPPER (mapper));
- g_return_if_fail (GSD_IS_DEVICE (device));
-
- output = monitor_to_output (mapper, monitor_num);
- gsd_device_mapper_set_device_output (mapper, device, output);
-}
diff --git a/plugins/common/gsd-device-mapper.h b/plugins/common/gsd-device-mapper.h
index a5d1e56..5324081 100644
--- a/plugins/common/gsd-device-mapper.h
+++ b/plugins/common/gsd-device-mapper.h
@@ -20,11 +20,6 @@
#ifndef __GSD_DEVICE_MAPPER_H__
#define __GSD_DEVICE_MAPPER_H__
-#define GNOME_DESKTOP_USE_UNSTABLE_API
-#include <libgnome-desktop/gnome-rr.h>
-#undef GNOME_DESKTOP_USE_UNSTABLE_API
-#include <gdk/gdk.h>
-
#include "gsd-device-manager.h"
G_BEGIN_DECLS
@@ -46,23 +41,6 @@ void gsd_device_mapper_add_input (GsdDeviceMapper *mapper,
GsdDevice *device);
void gsd_device_mapper_remove_input (GsdDeviceMapper *mapper,
GsdDevice *device);
-void gsd_device_mapper_add_output (GsdDeviceMapper *mapper,
- GnomeRROutput *output);
-void gsd_device_mapper_remove_output (GsdDeviceMapper *mapper,
- GnomeRROutput *output);
-
-GnomeRROutput * gsd_device_mapper_get_device_output (GsdDeviceMapper *mapper,
- GsdDevice *device);
-
-void gsd_device_mapper_set_device_output (GsdDeviceMapper *mapper,
- GsdDevice *device,
- GnomeRROutput *output);
-
-gint gsd_device_mapper_get_device_monitor (GsdDeviceMapper *mapper,
- GsdDevice *device);
-void gsd_device_mapper_set_device_monitor (GsdDeviceMapper *mapper,
- GsdDevice *device,
- gint monitor_num);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]