rpms/control-center/F-9 add-randr12-capplet.patch, 1.17, 1.18 control-center.spec, 1.357, 1.358
Soren Sandmann Pedersen (ssp)
fedora-extras-commits at redhat.com
Fri Apr 25 20:00:50 UTC 2008
- Previous message (by thread): rpms/gnome-settings-daemon/devel .cvsignore, 1.9, 1.10 gnome-settings-daemon.spec, 1.23, 1.24 sources, 1.9, 1.10
- Next message (by thread): rpms/ganyremote/F-9 ganyremote.spec, NONE, 1.1 sources, 1.2, 1.3 ganyremote-fedora.spec, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ssp
Update of /cvs/pkgs/rpms/control-center/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18771
Modified Files:
add-randr12-capplet.patch control-center.spec
Log Message:
Integrate a number of NULL pointer fixes from other distributions
add-randr12-capplet.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.17 -r 1.18 add-randr12-capplet.patch
Index: add-randr12-capplet.patch
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/F-9/add-randr12-capplet.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- add-randr12-capplet.patch 7 Apr 2008 19:18:22 -0000 1.17
+++ add-randr12-capplet.patch 25 Apr 2008 20:00:11 -0000 1.18
@@ -1,2396 +1,860 @@
-diff -up /dev/null gnome-control-center-2.22.0/capplets/display/scrollarea.c
---- /dev/null 2008-03-16 00:14:46.954006998 -0400
-+++ gnome-control-center-2.22.0/capplets/display/scrollarea.c 2008-04-07 15:13:42.000000000 -0400
-@@ -0,0 +1,1902 @@
-+#include <gdk/gdkprivate.h> /* For GDK_PARENT_RELATIVE_BG */
-+#include "scrollarea.h"
-+#include "foo-marshal.h"
+diff --git a/capplets/display/Makefile.am b/capplets/display/Makefile.am
+index b75da5b..193fd65 100644
+--- a/capplets/display/Makefile.am
++++ b/capplets/display/Makefile.am
+@@ -1,9 +1,18 @@
+ # This is used in GNOMECC_CAPPLETS_CFLAGS
+ cappletname = display
+
++gladedir = $(pkgdatadir)/glade
++dist_glade_DATA = display-capplet.glade
+
-+G_DEFINE_TYPE (FooScrollArea, foo_scroll_area, GTK_TYPE_CONTAINER);
+ bin_PROGRAMS = gnome-display-properties
+
+-gnome_display_properties_SOURCES = main.c
++gnome_display_properties_SOURCES = \
++ xrandr-capplet.c \
++ scrollarea.c \
++ foo-marshal.c \
++ scrollarea.h \
++ foo-marshal.h
+
-+static GtkWidgetClass *parent_class;
+ gnome_display_properties_LDFLAGS = -export-dynamic
+ gnome_display_properties_LDADD = \
+ $(DISPLAY_CAPPLET_LIBS) \
+diff --git a/capplets/display/TODO b/capplets/display/TODO
+new file mode 100644
+index 0000000..a1164e1
+--- /dev/null
++++ b/capplets/display/TODO
+@@ -0,0 +1,815 @@
++Highlevel overview:
+
-+typedef struct BackingStore BackingStore;
++- GTK+ work.
+
-+typedef void (* ExposeFunc) (cairo_t *cr, GdkRegion *region, gpointer data);
++ Allow applications to be notified whenever monitors are added
++ or removed. Allow applications to get more detailed
++ information about the connected monitors.
+
-+#if 0
-+static void backing_store_draw (BackingStore *store,
-+ GdkDrawable *dest,
-+ GdkRegion *clip,
-+ int dest_x,
-+ int dest_y);
-+static void backing_store_scroll (BackingStore *store,
-+ int dx, int dy);
-+static void backing_store_invalidate_rect (BackingStore *store,
-+ GdkRectangle *rect);
-+static void backing_store_invalidate_region (BackingStore *store,
-+ GdkRegion *region);
-+static void backing_store_invalidate_all (BackingStore *store);
-+static BackingStore *backing_store_new (GdkWindow *window,
-+ int width, int height);
-+static void backing_store_resize (BackingStore *store,
-+ int width, int height);
-+static void backing_store_process_updates (BackingStore *store,
-+ ExposeFunc func,
-+ gpointer data);
-+static void backing_store_free (BackingStore *store);
-+#endif
++ The main complication is that XRRGetScreenResources() is very
++ slow. We could call it only when the X server sends an event,
++ but it's not desirable to have every application freeze for
++ half a second. And certainly not desirable to have the X
++ server block for n * 0.5 seconds.
+
-+typedef struct InputPath InputPath;
-+typedef struct InputRegion InputRegion;
-+typedef struct AutoScrollInfo AutoScrollInfo;
++ With the X server work below we should be fine just calling
++ XRRGetScreenResources on startup and in response to events.
+
-+struct InputPath
-+{
-+ gboolean is_stroke;
-+ cairo_fill_rule_t fill_rule;
-+ double line_width;
-+ cairo_path_t *path; /* In canvas coordinates */
++- X server work:
+
-+ FooScrollAreaEventFunc func;
-+ gpointer data;
++ X server needs to poll for whether a monitor is plugged
++ in. Whenever it detects a change, it should do an EDID query,
++ and cache the resulting information. That way XRRGetScreenResources()
++ can be the speed of a normal roundtrip. It's desirable that
++ normal client requests can still be processed during the EDID
++ querying, but only a nice-to-have.
+
-+ InputPath *next;
-+};
++ Drivers need to work reliably. There could be substantial work
++ here. For F9, possibly only the Intel driver can be made to
++ work.
+
-+/* InputRegions are mutually disjoint */
-+struct InputRegion
-+{
-+ GdkRegion *region; /* the boundary of this area in canvas coordinates */
-+ InputPath *paths;
-+};
++ Interrupts and events must be generated whenever something changes
++ about the outputs, if necessary by polling.
+
-+struct AutoScrollInfo
-+{
-+ int dx;
-+ int dy;
-+ int timeout_id;
-+ int begin_x;
-+ int begin_y;
-+ double res_x;
-+ double res_y;
-+ GTimer *timer;
-+};
++ Events must be emitted whenever something changes, including when
++ the reason for the change is a manual change.
+
-+struct FooScrollAreaPrivate
-+{
-+ GdkWindow *input_window;
-+
-+ int width;
-+ int height;
-+
-+ GtkAdjustment *hadj;
-+ GtkAdjustment *vadj;
-+ int x_offset;
-+ int y_offset;
-+
-+ int min_width;
-+ int min_height;
++ The maximum framebuffer must be dynamically changable.
+
-+ GPtrArray *input_regions;
-+
-+ AutoScrollInfo *auto_scroll_info;
-+
-+ /* During expose, this region is set to the region
-+ * being exposed. At other times, it is NULL
-+ *
-+ * It is used for clipping of input areas
-+ */
-+ GdkRegion *expose_region;
-+ InputRegion *current_input;
-+
-+ gboolean grabbed;
-+ FooScrollAreaEventFunc grab_func;
-+ gpointer grab_data;
++- Control panel work:
++ Capplet needs to be written. The main complications:
+
-+ GdkPixmap *pixmap;
-+ GdkRegion *update_region; /* In canvas coordinates */
-+};
++ - It needs to pay attention to events from the X server
++ and update itself, ie., add show new monitors if they become
++ available when the applet is shown.
+
-+enum
-+{
-+ VIEWPORT_CHANGED,
-+ PAINT,
-+ INPUT,
-+ LAST_SIGNAL,
-+};
++ - It needs to store information under a key computed
++ from a monitor identifier. The complication here is that
++ it's not completely clear how to do this in GConf.
+
-+static guint signals [LAST_SIGNAL] = { 0 };
++ - Would probably be worthwhile to drop libgnome/libgnomeui from
++ the craplets.
+
-+static void foo_scroll_area_size_request (GtkWidget *widget,
-+ GtkRequisition *requisition);
-+static gboolean foo_scroll_area_expose (GtkWidget *widget,
-+ GdkEventExpose *expose);
-+static void foo_scroll_area_size_allocate (GtkWidget *widget,
-+ GtkAllocation *allocation);
[...4988 lines suppressed...]
++
++static void
++backing_store_invalidate_region (BackingStore *store,
++ GdkRegion *region)
++{
++ gdk_region_union (store->update_region, region);
++}
++
++static void
++backing_store_invalidate_all (BackingStore *store)
++{
++ GdkRectangle rect = { 0, 0, store->width, store->height };
++ gdk_region_destroy (store->update_region);
++ store->update_region = gdk_region_rectangle (&rect);
++}
++
++static void
++backing_store_resize (BackingStore *store,
++ int width,
++ int height)
++{
++ GdkPixmap *pixmap = gdk_pixmap_new (store->pixmap, width, height, -1);
++
++ /* Unfortunately we don't know in which direction we were resized,
++ * so we just assume we were dragged from the south-east corner.
++ *
++ * Although, maybe we could get the root coordinates of the input-window?
++ * That might just work, actually. We need to make sure metacity uses
++ * static gravity for the window before this will be useful.
++ */
++ simple_draw_drawable (pixmap, store->pixmap, 0, 0, 0, 0, -1, -1);
++
++ g_object_unref (store->pixmap);
++
++ store->pixmap = pixmap;
++
++ /* FIXME: invalidate uncovered strip only */
++
++ backing_store_invalidate_all (store);
++}
++
++static void
++cclip_to_region (cairo_t *cr, GdkRegion *region)
++{
++ int n_rects;
++ GdkRectangle *rects;
++
++ gdk_region_get_rectangles (region, &rects, &n_rects);
++
++ cairo_new_path (cr);
++ while (n_rects--)
++ {
++ GdkRectangle *rect = &(rects[n_rects]);
++
++ cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height);
++ }
++ cairo_clip (cr);
++
++ g_free (rects);
++}
++
++static void
++backing_store_process_updates (BackingStore *store,
++ ExposeFunc func,
++ gpointer data)
++{
++ cairo_t *cr = gdk_cairo_create (store->pixmap);
++ GdkRegion *region = store->update_region;
++ store->update_region = gdk_region_new ();
++
++ cclip_to_region (cr, store->update_region);
++
++ func (cr, store->update_region, data);
++
++ gdk_region_destroy (region);
++ cairo_destroy (cr);
++}
++
++#endif
+diff --git a/capplets/display/scrollarea.h b/capplets/display/scrollarea.h
+new file mode 100644
+index 0000000..22abc6c
+--- /dev/null
++++ b/capplets/display/scrollarea.h
+@@ -0,0 +1,107 @@
++#include <cairo/cairo.h>
++#include <gtk/gtk.h>
++
++#define FOO_TYPE_SCROLL_AREA (foo_scroll_area_get_type ())
++#define FOO_SCROLL_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOO_TYPE_SCROLL_AREA, FooScrollArea))
++#define FOO_SCROLL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
++#define FOO_IS_SCROLL_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOO_TYPE_SCROLL_AREA))
++#define FOO_IS_SCROLL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOO_TYPE_SCROLL_AREA))
++#define FOO_SCROLL_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
++
++typedef struct FooScrollArea FooScrollArea;
++typedef struct FooScrollAreaClass FooScrollAreaClass;
++typedef struct FooScrollAreaPrivate FooScrollAreaPrivate;
++typedef struct FooScrollAreaEvent FooScrollAreaEvent;
++
++typedef enum
++{
++ FOO_BUTTON_PRESS,
++ FOO_BUTTON_RELEASE,
++ FOO_MOTION
++} FooScrollAreaEventType;
++
++struct FooScrollAreaEvent
++{
++ FooScrollAreaEventType type;
++ int x;
++ int y;
++};
++
++typedef void (* FooScrollAreaEventFunc) (FooScrollArea *area,
++ FooScrollAreaEvent *event,
++ gpointer data);
++
++struct FooScrollArea
++{
++ GtkContainer parent_instance;
++
++ FooScrollAreaPrivate *priv;
++};
++
++struct FooScrollAreaClass
++{
++ GtkContainerClass parent_class;
++
++ void (*set_scroll_adjustments) (FooScrollArea *scroll_area,
++ GtkAdjustment *hadjustment,
++ GtkAdjustment *vadjustment);
++
++ void (*viewport_changed) (FooScrollArea *scroll_area,
++ GdkRectangle *old_viewport,
++ GdkRectangle *new_viewport);
++
++ void (*paint) (FooScrollArea *scroll_area,
++ cairo_t *cr,
++ GdkRectangle *extents,
++ GdkRegion *region);
++};
++
++GType foo_scroll_area_get_type (void);
++
++FooScrollArea *foo_scroll_area_new (void);
++
++/* Set the requisition for the widget. */
++void foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
++ int min_width,
++ int min_height);
++
++/* Set how much of the canvas can be scrolled into view */
++void foo_scroll_area_set_size (FooScrollArea *scroll_area,
++ int width,
++ int height);
++void foo_scroll_area_set_size_fixed_y (FooScrollArea *scroll_area,
++ int width,
++ int height,
++ int old_y,
++ int new_y);
++void foo_scroll_area_set_viewport_pos (FooScrollArea *scroll_area,
++ int x,
++ int y);
++void foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
++ GdkRectangle *viewport);
++void foo_scroll_area_add_input_from_stroke (FooScrollArea *scroll_area,
++ cairo_t *cr,
++ FooScrollAreaEventFunc func,
++ gpointer data);
++void foo_scroll_area_add_input_from_fill (FooScrollArea *scroll_area,
++ cairo_t *cr,
++ FooScrollAreaEventFunc func,
++ gpointer data);
++void foo_scroll_area_invalidate_region (FooScrollArea *area,
++ GdkRegion *region);
++void foo_scroll_area_invalidate (FooScrollArea *scroll_area);
++void foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
++ int x,
++ int y,
++ int width,
++ int height);
++void foo_scroll_area_begin_grab (FooScrollArea *scroll_area,
++ FooScrollAreaEventFunc func,
++ gpointer input_data);
++void foo_scroll_area_end_grab (FooScrollArea *scroll_area);
++gboolean foo_scroll_area_is_grabbed (FooScrollArea *scroll_area);
++
++void foo_scroll_area_begin_auto_scroll (FooScrollArea *scroll_area);
++void foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
++ FooScrollAreaEvent *event);
++void foo_scroll_area_end_auto_scroll (FooScrollArea *scroll_area);
+diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
+new file mode 100644
+index 0000000..e56b9c5
+--- /dev/null
++++ b/capplets/display/xrandr-capplet.c
@@ -0,0 +1,1624 @@
+/* Monitor Settings. A preference panel for configuring monitors
+ *
Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/F-9/control-center.spec,v
retrieving revision 1.357
retrieving revision 1.358
diff -u -r1.357 -r1.358
--- control-center.spec 8 Apr 2008 13:42:36 -0000 1.357
+++ control-center.spec 25 Apr 2008 20:00:11 -0000 1.358
@@ -22,7 +22,7 @@
Summary: GNOME Control Center
Name: control-center
Version: 2.22.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 1
License: GPLv2+ and GFDL
Group: User Interface/Desktops
@@ -353,6 +353,9 @@
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Fri Apr 25 2008 Soren Sandmann <sandmann at redhat.com> - 2.22.1-3
+- Integrate a number of NULL pointer fixes from other distributions.
+
* Tue Apr 8 2008 Matthias Clasen <mclasen at redhat.com> - 2.22.1-2
- Remove a nonfunctional button from the a11y preferences
- Previous message (by thread): rpms/gnome-settings-daemon/devel .cvsignore, 1.9, 1.10 gnome-settings-daemon.spec, 1.23, 1.24 sources, 1.9, 1.10
- Next message (by thread): rpms/ganyremote/F-9 ganyremote.spec, NONE, 1.1 sources, 1.2, 1.3 ganyremote-fedora.spec, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list