diff --git a/add-randr-12.patch b/add-randr-12.patch index 8d0ff07..0260fa9 100644 --- a/add-randr-12.patch +++ b/add-randr-12.patch @@ -1,7 +1,6 @@ -diff --git a/configure.in b/configure.in -index f18ad7b..5b0202b 100644 ---- a/configure.in -+++ b/configure.in +diff -up gnome-desktop-2.22.2/configure.in.add-randr-12 gnome-desktop-2.22.2/configure.in +--- gnome-desktop-2.22.2/configure.in.add-randr-12 2008-05-26 12:25:40.000000000 -0400 ++++ gnome-desktop-2.22.2/configure.in 2008-05-28 09:28:15.000000000 -0400 @@ -51,10 +51,10 @@ AC_SUBST(GNOME_MICRO) AC_SUBST(GNOME_DISTRIBUTOR) AC_SUBST(GNOME_DATE) @@ -17,44 +16,9 @@ index f18ad7b..5b0202b 100644 # As a special favour for vuntz, support --disable-deprecations -diff --git a/libgnome-desktop/ChangeLog b/libgnome-desktop/ChangeLog -index a6a4486..bc95a61 100644 ---- a/libgnome-desktop/ChangeLog -+++ b/libgnome-desktop/ChangeLog -@@ -1,3 +1,10 @@ -+2008-04-17 James Westby -+ -+ * monitor-db.c (configuration_new_current): Invert the logic in -+ the detection of clone mode so that it works for a single screen -+ as well. Without this change single screens are always reported as -+ clone, which makes no sense. -+ - 2008-03-29 Matthias Clasen - - * gnome-bg.c (get_current_slide): Handle start times in -diff --git a/libgnome-desktop/Makefile.am b/libgnome-desktop/Makefile.am -index 08e1395..68bf653 100644 ---- a/libgnome-desktop/Makefile.am -+++ b/libgnome-desktop/Makefile.am -@@ -20,7 +20,12 @@ libgnome_desktop_2_la_SOURCES = \ - gnome-desktop-item.c \ - gnome-ditem-edit.c \ - gnome-hint.c \ -- gnome-bg.c -+ gnome-bg.c \ -+ display-name.c \ -+ randrwrap.c \ -+ monitor-db.c \ -+ edid-parse.c \ -+ edid.h - - libgnome_desktop_2_la_LIBADD = \ - $(XLIB_LIBS) \ -diff --git a/libgnome-desktop/display-name.c b/libgnome-desktop/display-name.c -new file mode 100644 -index 0000000..5c46920 ---- /dev/null -+++ b/libgnome-desktop/display-name.c +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/display-name.c +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/display-name.c 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,252 @@ +/* + * Copyright 2007 Red Hat, Inc. @@ -308,11 +272,183 @@ index 0000000..5c46920 + else + return g_strdup_printf ("%s\n", vendor); +} -diff --git a/libgnome-desktop/edid-parse.c b/libgnome-desktop/edid-parse.c -new file mode 100644 -index 0000000..2611a24 ---- /dev/null -+++ b/libgnome-desktop/edid-parse.c +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/edid.h +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/edid.h 2008-05-28 09:28:15.000000000 -0400 +@@ -0,0 +1,170 @@ ++typedef unsigned char uchar; ++typedef struct MonitorInfo MonitorInfo; ++typedef struct Timing Timing; ++typedef struct DetailedTiming DetailedTiming; ++ ++typedef enum ++{ ++ UNDEFINED, ++ DVI, ++ HDMI_A, ++ HDMI_B, ++ MDDI, ++ DISPLAY_PORT ++} Interface; ++ ++typedef enum ++{ ++ UNDEFINED_COLOR, ++ MONOCHROME, ++ RGB, ++ OTHER_COLOR ++} ColorType; ++ ++typedef enum ++{ ++ NO_STEREO, ++ FIELD_RIGHT, ++ FIELD_LEFT, ++ TWO_WAY_RIGHT_ON_EVEN, ++ TWO_WAY_LEFT_ON_EVEN, ++ FOUR_WAY_INTERLEAVED, ++ SIDE_BY_SIDE ++} StereoType; ++ ++struct Timing ++{ ++ int width; ++ int height; ++ int frequency; ++}; ++ ++struct DisplayDescriptor ++{ ++}; ++ ++struct DetailedTiming ++{ ++ int pixel_clock; ++ int h_addr; ++ int h_blank; ++ int h_sync; ++ int h_front_porch; ++ int v_addr; ++ int v_blank; ++ int v_sync; ++ int v_front_porch; ++ int width_mm; ++ int height_mm; ++ int right_border; ++ int top_border; ++ int interlaced; ++ StereoType stereo; ++ ++ int digital_sync; ++ union ++ { ++ struct ++ { ++ int bipolar; ++ int serrations; ++ int sync_on_green; ++ } analog; ++ ++ struct ++ { ++ int composite; ++ int serrations; ++ int negative_vsync; ++ int negative_hsync; ++ } digital; ++ }; ++}; ++ ++struct MonitorInfo ++{ ++ int checksum; ++ char manufacturer_code[4]; ++ int product_code; ++ unsigned int serial_number; ++ ++ int production_week; /* -1 if not specified */ ++ int production_year; /* -1 if not specified */ ++ int model_year; /* -1 if not specified */ ++ ++ int major_version; ++ int minor_version; ++ ++ int is_digital; ++ ++ union ++ { ++ struct ++ { ++ int bits_per_primary; ++ Interface interface; ++ int rgb444; ++ int ycrcb444; ++ int ycrcb422; ++ } digital; ++ ++ struct ++ { ++ double video_signal_level; ++ double sync_signal_level; ++ double total_signal_level; ++ ++ int blank_to_black; ++ ++ int separate_hv_sync; ++ int composite_sync_on_h; ++ int composite_sync_on_green; ++ int serration_on_vsync; ++ ColorType color_type; ++ } analog; ++ }; ++ ++ int width_mm; /* -1 if not specified */ ++ int height_mm; /* -1 if not specified */ ++ double aspect_ratio; /* -1.0 if not specififed */ ++ ++ double gamma; /* -1.0 if not specified */ ++ ++ int standby; ++ int suspend; ++ int active_off; ++ ++ int srgb_is_standard; ++ int preferred_timing_includes_native; ++ int continuous_frequency; ++ ++ double red_x; ++ double red_y; ++ double green_x; ++ double green_y; ++ double blue_x; ++ double blue_y; ++ double white_x; ++ double white_y; ++ ++ Timing established[24]; /* Terminated by 0x0x0 */ ++ Timing standard[8]; ++ ++ int n_detailed_timings; ++ DetailedTiming detailed_timings[4]; /* If monitor has a preferred ++ * mode, it is the first one ++ * (whether it has, is ++ * determined by the ++ * preferred_timing_includes ++ * bit. ++ */ ++ ++ /* Optional product description */ ++ char dsc_serial_number[14]; ++ char dsc_product_name[14]; ++ char dsc_string[14]; /* Unspecified ASCII data */ ++}; ++ ++MonitorInfo *decode_edid (const uchar *data); ++char * make_display_name (const char *output_name, ++ const MonitorInfo *info); +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/edid-parse.c +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/edid-parse.c 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,551 @@ +/* + * Copyright 2007 Red Hat, Inc. @@ -865,186 +1001,9 @@ index 0000000..2611a24 + + return info; +} -diff --git a/libgnome-desktop/edid.h b/libgnome-desktop/edid.h -new file mode 100644 -index 0000000..4f0573a ---- /dev/null -+++ b/libgnome-desktop/edid.h -@@ -0,0 +1,170 @@ -+typedef unsigned char uchar; -+typedef struct MonitorInfo MonitorInfo; -+typedef struct Timing Timing; -+typedef struct DetailedTiming DetailedTiming; -+ -+typedef enum -+{ -+ UNDEFINED, -+ DVI, -+ HDMI_A, -+ HDMI_B, -+ MDDI, -+ DISPLAY_PORT -+} Interface; -+ -+typedef enum -+{ -+ UNDEFINED_COLOR, -+ MONOCHROME, -+ RGB, -+ OTHER_COLOR -+} ColorType; -+ -+typedef enum -+{ -+ NO_STEREO, -+ FIELD_RIGHT, -+ FIELD_LEFT, -+ TWO_WAY_RIGHT_ON_EVEN, -+ TWO_WAY_LEFT_ON_EVEN, -+ FOUR_WAY_INTERLEAVED, -+ SIDE_BY_SIDE -+} StereoType; -+ -+struct Timing -+{ -+ int width; -+ int height; -+ int frequency; -+}; -+ -+struct DisplayDescriptor -+{ -+}; -+ -+struct DetailedTiming -+{ -+ int pixel_clock; -+ int h_addr; -+ int h_blank; -+ int h_sync; -+ int h_front_porch; -+ int v_addr; -+ int v_blank; -+ int v_sync; -+ int v_front_porch; -+ int width_mm; -+ int height_mm; -+ int right_border; -+ int top_border; -+ int interlaced; -+ StereoType stereo; -+ -+ int digital_sync; -+ union -+ { -+ struct -+ { -+ int bipolar; -+ int serrations; -+ int sync_on_green; -+ } analog; -+ -+ struct -+ { -+ int composite; -+ int serrations; -+ int negative_vsync; -+ int negative_hsync; -+ } digital; -+ }; -+}; -+ -+struct MonitorInfo -+{ -+ int checksum; -+ char manufacturer_code[4]; -+ int product_code; -+ unsigned int serial_number; -+ -+ int production_week; /* -1 if not specified */ -+ int production_year; /* -1 if not specified */ -+ int model_year; /* -1 if not specified */ -+ -+ int major_version; -+ int minor_version; -+ -+ int is_digital; -+ -+ union -+ { -+ struct -+ { -+ int bits_per_primary; -+ Interface interface; -+ int rgb444; -+ int ycrcb444; -+ int ycrcb422; -+ } digital; -+ -+ struct -+ { -+ double video_signal_level; -+ double sync_signal_level; -+ double total_signal_level; -+ -+ int blank_to_black; -+ -+ int separate_hv_sync; -+ int composite_sync_on_h; -+ int composite_sync_on_green; -+ int serration_on_vsync; -+ ColorType color_type; -+ } analog; -+ }; -+ -+ int width_mm; /* -1 if not specified */ -+ int height_mm; /* -1 if not specified */ -+ double aspect_ratio; /* -1.0 if not specififed */ -+ -+ double gamma; /* -1.0 if not specified */ -+ -+ int standby; -+ int suspend; -+ int active_off; -+ -+ int srgb_is_standard; -+ int preferred_timing_includes_native; -+ int continuous_frequency; -+ -+ double red_x; -+ double red_y; -+ double green_x; -+ double green_y; -+ double blue_x; -+ double blue_y; -+ double white_x; -+ double white_y; -+ -+ Timing established[24]; /* Terminated by 0x0x0 */ -+ Timing standard[8]; -+ -+ int n_detailed_timings; -+ DetailedTiming detailed_timings[4]; /* If monitor has a preferred -+ * mode, it is the first one -+ * (whether it has, is -+ * determined by the -+ * preferred_timing_includes -+ * bit. -+ */ -+ -+ /* Optional product description */ -+ char dsc_serial_number[14]; -+ char dsc_product_name[14]; -+ char dsc_string[14]; /* Unspecified ASCII data */ -+}; -+ -+MonitorInfo *decode_edid (const uchar *data); -+char * make_display_name (const char *output_name, -+ const MonitorInfo *info); -diff --git a/libgnome-desktop/libgnomeui/Makefile.am b/libgnome-desktop/libgnomeui/Makefile.am -index 24c762b..0a143b3 100644 ---- a/libgnome-desktop/libgnomeui/Makefile.am -+++ b/libgnome-desktop/libgnomeui/Makefile.am +diff -up gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/Makefile.am +--- gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 2008-05-26 12:10:56.000000000 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/Makefile.am 2008-05-28 09:28:15.000000000 -0400 @@ -1,5 +1,7 @@ libgnomeui_desktopdir = $(includedir)/gnome-desktop-2.0/libgnomeui -libgnomeui_desktop_HEADERS = \ @@ -1057,11 +1016,9 @@ index 24c762b..0a143b3 100644 + gnome-bg.h \ + randrwrap.h \ + monitor-db.h -diff --git a/libgnome-desktop/libgnomeui/monitor-db.h b/libgnome-desktop/libgnomeui/monitor-db.h -new file mode 100644 -index 0000000..05c7749 ---- /dev/null -+++ b/libgnome-desktop/libgnomeui/monitor-db.h +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/monitor-db.h +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/monitor-db.h 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,52 @@ +#ifndef MONITOR_DB_H +#define MONITOR_DB_H @@ -1115,11 +1072,9 @@ index 0000000..05c7749 + RWScreen *screen); + +#endif -diff --git a/libgnome-desktop/libgnomeui/randrwrap.h b/libgnome-desktop/libgnomeui/randrwrap.h -new file mode 100644 -index 0000000..f9ab2c9 ---- /dev/null -+++ b/libgnome-desktop/libgnomeui/randrwrap.h +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/randrwrap.h +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/libgnomeui/randrwrap.h 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,96 @@ +#ifndef RANDR_WRAP_H +#define RANDR_WRAP_H @@ -1217,11 +1172,26 @@ index 0000000..f9ab2c9 + RWRotation rotation); + +#endif -diff --git a/libgnome-desktop/monitor-db.c b/libgnome-desktop/monitor-db.c -new file mode 100644 -index 0000000..a9b064d ---- /dev/null -+++ b/libgnome-desktop/monitor-db.c +diff -up gnome-desktop-2.22.2/libgnome-desktop/Makefile.am.add-randr-12 gnome-desktop-2.22.2/libgnome-desktop/Makefile.am +--- gnome-desktop-2.22.2/libgnome-desktop/Makefile.am.add-randr-12 2008-05-26 12:10:57.000000000 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/Makefile.am 2008-05-28 09:28:15.000000000 -0400 +@@ -20,7 +20,12 @@ libgnome_desktop_2_la_SOURCES = \ + gnome-desktop-item.c \ + gnome-ditem-edit.c \ + gnome-hint.c \ +- gnome-bg.c ++ gnome-bg.c \ ++ display-name.c \ ++ randrwrap.c \ ++ monitor-db.c \ ++ edid-parse.c \ ++ edid.h + + libgnome_desktop_2_la_LIBADD = \ + $(XLIB_LIBS) \ +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/monitor-db.c +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/monitor-db.c 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,1292 @@ +#include +#include @@ -2515,11 +2485,9 @@ index 0000000..a9b064d + return NULL; + } +} -diff --git a/libgnome-desktop/randrwrap.c b/libgnome-desktop/randrwrap.c -new file mode 100644 -index 0000000..6b4cecb ---- /dev/null -+++ b/libgnome-desktop/randrwrap.c +diff -up /dev/null gnome-desktop-2.22.2/libgnome-desktop/randrwrap.c +--- /dev/null 2008-05-28 08:27:37.811005639 -0400 ++++ gnome-desktop-2.22.2/libgnome-desktop/randrwrap.c 2008-05-28 09:28:15.000000000 -0400 @@ -0,0 +1,1195 @@ +#include "libgnomeui/randrwrap.h" +#include