diff options
author | Frédéric Péters <fpeters@0d.be> | 2010-02-24 15:37:20 +0100 |
---|---|---|
committer | Frédéric Péters <fpeters@0d.be> | 2010-02-24 15:37:20 +0100 |
commit | 2785a27ae33ff67b1caee3cad8833cad4bb96e39 (patch) | |
tree | ba202f8c4e760564cdd06a8ab0bdc4d502b9b828 | |
parent | 1f1894dea328594e2b136a391532675ec70198d7 (diff) | |
download | gnome-settings-daemon-2785a27ae33ff67b1caee3cad8833cad4bb96e39.tar.gz |
Revert "RANDR - Use gnome_rr_output_is_laptop() instead of our own function"
This reverts commit a1fc969510ae6f91884976e2b899210977e38b14.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | plugins/xrandr/gsd-xrandr-manager.c | 30 |
2 files changed, 20 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 23959e68..1954d7cc 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ GLIB_REQUIRED_VERSION=2.17.3 GTK_REQUIRED_VERSION=2.16.0 GCONF_REQUIRED_VERSION=2.6.1 GIO_REQUIRED_VERSION=2.17.3 -GNOME_DESKTOP_REQUIRED_VERSION=2.29.92 +GNOME_DESKTOP_REQUIRED_VERSION=2.26.3 LIBNOTIFY_REQUIRED_VERSION=0.4.3 EXTRA_COMPILE_WARNINGS(yes) diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c index e78eb6b1..01d7e331 100644 --- a/plugins/xrandr/gsd-xrandr-manager.c +++ b/plugins/xrandr/gsd-xrandr-manager.c @@ -481,12 +481,20 @@ gsd_xrandr_manager_2_apply_configuration (GsdXrandrManager *manager, #include "gsd-xrandr-manager-glue.h" static gboolean -is_laptop (GnomeRRScreen *screen, GnomeOutputInfo *output) +is_laptop (GnomeOutputInfo *output) { - GnomeRROutput *rr_output; + const char *output_name = output->name; - rr_output = gnome_rr_screen_get_output_by_name (screen, output->name); - return gnome_rr_output_is_laptop (rr_output); + if (output->connected && output_name && + (strstr (output_name, "lvds") || + strstr (output_name, "LVDS") || + strstr (output_name, "Lvds") || + strstr (output_name, "LCD"))) + { + return TRUE; + } + + return FALSE; } static gboolean @@ -685,7 +693,7 @@ make_laptop_setup (GnomeRRScreen *screen) for (i = 0; result->outputs[i] != NULL; ++i) { GnomeOutputInfo *info = result->outputs[i]; - if (is_laptop (screen, info)) { + if (is_laptop (info)) { if (!turn_on (screen, info, 0, 0)) { gnome_rr_config_free (result); result = NULL; @@ -729,14 +737,14 @@ make_xinerama_setup (GnomeRRScreen *screen) for (i = 0; result->outputs[i] != NULL; ++i) { GnomeOutputInfo *info = result->outputs[i]; - if (is_laptop (screen, info)) + if (is_laptop (info)) x = turn_on_and_get_rightmost_offset (screen, info, x); } for (i = 0; result->outputs[i] != NULL; ++i) { GnomeOutputInfo *info = result->outputs[i]; - if (info->connected && !is_laptop (screen, info)) + if (info->connected && !is_laptop (info)) x = turn_on_and_get_rightmost_offset (screen, info, x); } @@ -758,7 +766,7 @@ make_other_setup (GnomeRRScreen *screen) for (i = 0; result->outputs[i] != NULL; ++i) { GnomeOutputInfo *info = result->outputs[i]; - if (is_laptop (screen, info)) { + if (is_laptop (info)) { info->on = FALSE; } else { @@ -1008,7 +1016,7 @@ handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp) } static GnomeOutputInfo * -get_laptop_output_info (GnomeRRScreen *screen, GnomeRRConfig *config) +get_laptop_output_info (GnomeRRConfig *config) { int i; @@ -1016,7 +1024,7 @@ get_laptop_output_info (GnomeRRScreen *screen, GnomeRRConfig *config) GnomeOutputInfo *info; info = config->outputs[i]; - if (is_laptop (screen, info)) + if (is_laptop (info)) return info; } @@ -1088,7 +1096,7 @@ handle_rotate_windows (GsdXrandrManager *mgr, guint32 timestamp) current = gnome_rr_config_new_current (screen); - rotatable_output_info = get_laptop_output_info (screen, current); + rotatable_output_info = get_laptop_output_info (current); if (rotatable_output_info == NULL) { g_debug ("No laptop outputs found to rotate; XF86RotateWindows key will do nothing"); goto out; |