rpms/libwnck/devel libwnck-2.10.0-add-glow-effect.patch, 1.1, 1.2 libwnck.spec, 1.24, 1.25
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue May 10 14:49:04 UTC 2005
Author: rstrode
Update of /cvs/dist/rpms/libwnck/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8869
Modified Files:
libwnck-2.10.0-add-glow-effect.patch libwnck.spec
Log Message:
- fix some rendering issues with the last patch
libwnck-2.10.0-add-glow-effect.patch:
tasklist.c | 286 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 261 insertions(+), 25 deletions(-)
Index: libwnck-2.10.0-add-glow-effect.patch
===================================================================
RCS file: /cvs/dist/rpms/libwnck/devel/libwnck-2.10.0-add-glow-effect.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- libwnck-2.10.0-add-glow-effect.patch 10 May 2005 09:27:15 -0000 1.1
+++ libwnck-2.10.0-add-glow-effect.patch 10 May 2005 14:49:00 -0000 1.2
@@ -1,5 +1,5 @@
--- libwnck-2.10.0/libwnck/tasklist.c.add-glow-effect 2005-02-28 02:28:20.000000000 -0500
-+++ libwnck-2.10.0/libwnck/tasklist.c 2005-05-10 05:20:46.000000000 -0400
++++ libwnck-2.10.0/libwnck/tasklist.c 2005-05-10 10:42:12.000000000 -0400
@@ -22,6 +22,7 @@
*/
@@ -42,7 +42,7 @@
}
static void
-@@ -371,6 +385,137 @@ wnck_task_class_init (WnckTaskClass *kla
+@@ -371,6 +385,147 @@ wnck_task_class_init (WnckTaskClass *kla
" widget \"*.tasklist-button\" style \"tasklist-button-style\"\n"
"\n");
}
@@ -152,6 +152,12 @@
+}
+
+static void
++wnck_task_clear_glow_timeout_id (WnckTask *task)
++{
++ task->button_glow = 0;
++}
++
++static void
+wnck_task_queue_glow (WnckTask *task)
+{
+ if (task->button_glow == 0)
@@ -160,10 +166,14 @@
+
+ /* The animation doesn't speed up or slow down based on the
+ * timeout value, but instead will just appear smoother or
-+ * choppier.
++ * choppier. To adjust the speed change the parameter to
++ * sine in the timeout callback.
+ */
+ task->button_glow =
-+ g_timeout_add (50, (GSourceFunc) wnck_task_button_glow, task);
++ g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
++ 50,
++ (GSourceFunc) wnck_task_button_glow, task,
++ (GDestroyNotify) wnck_task_clear_glow_timeout_id);
+ }
+}
+
@@ -180,7 +190,7 @@
static void
wnck_task_finalize (GObject *object)
-@@ -464,6 +609,8 @@ wnck_task_finalize (GObject *object)
+@@ -464,6 +619,8 @@ wnck_task_finalize (GObject *object)
task->button_activate = 0;
}
@@ -189,7 +199,57 @@
G_OBJECT_CLASS (task_parent_class)->finalize (object);
}
-@@ -2067,6 +2214,8 @@ wnck_task_popup_menu (WnckTask *task,
+@@ -1117,6 +1274,12 @@ wnck_tasklist_size_allocate (GtkWidget
+ win_task = WNCK_TASK (l->data);
+
+ gtk_widget_set_child_visible (GTK_WIDGET (win_task->button), FALSE);
++
++ if (win_task->screenshot != NULL)
++ {
++ g_object_unref (win_task->screenshot);
++ win_task->screenshot = NULL;
++ }
+ l = l->next;
+ }
+ }
+@@ -1124,7 +1287,13 @@ wnck_tasklist_size_allocate (GtkWidget
+ {
+ visible_tasks = g_list_prepend (visible_tasks, class_group_task->windows->data);
+ gtk_widget_set_child_visible (GTK_WIDGET (class_group_task->button), FALSE);
+- }
++
++ if (class_group_task->screenshot != NULL)
++ {
++ g_object_unref (class_group_task->screenshot);
++ class_group_task->screenshot = NULL;
++ }
++ }
+
+ button_width = wnck_tasklist_layout (allocation,
+ tasklist->priv->max_button_width,
+@@ -1141,6 +1310,12 @@ wnck_tasklist_size_allocate (GtkWidget
+
+ visible_tasks = g_list_concat (visible_tasks, g_list_copy (class_group_task->windows));
+ gtk_widget_set_child_visible (GTK_WIDGET (class_group_task->button), FALSE);
++ if (class_group_task->screenshot != NULL)
++ {
++ g_object_unref (class_group_task->screenshot);
++ class_group_task->screenshot = NULL;
++ }
++
+ l = l->next;
+ }
+
+@@ -1562,7 +1737,7 @@ wnck_tasklist_update_lists (WnckTasklist
+
+ gtk_widget_set_parent (win_task->button, GTK_WIDGET (tasklist));
+ gtk_widget_show (win_task->button);
+-
++
+ /* Class group */
+
+ class_group = wnck_window_get_class_group (win);
+@@ -2067,6 +2242,8 @@ wnck_task_popup_menu (WnckTask *task,
text = wnck_task_get_text (win_task);
menu_item = gtk_image_menu_item_new_with_label (text);
@@ -198,7 +258,7 @@
g_free (text);
pixbuf = wnck_task_get_icon (win_task);
-@@ -2424,9 +2573,15 @@ wnck_task_update_visible_state (WnckTask
+@@ -2424,9 +2601,15 @@ wnck_task_update_visible_state (WnckTask
{
gtk_label_set_text (GTK_LABEL (task->label), text);
if (wnck_task_get_demands_attention (task))
@@ -216,7 +276,19 @@
gtk_tooltips_set_tip (task->tasklist->priv->tooltips, task->button, text, NULL);
g_free (text);
}
-@@ -2669,7 +2824,11 @@ wnck_task_create_widgets (WnckTask *task
+@@ -2622,6 +2805,11 @@ wnck_task_button_press_event (GtkWidget
+ return FALSE;
+ }
+
++static gboolean
++wnck_task_expose (GtkWidget *widget,
++ GdkEventExpose *event,
++ gpointer data);
++
+ static void
+ wnck_task_create_widgets (WnckTask *task)
+ {
+@@ -2669,7 +2857,11 @@ wnck_task_create_widgets (WnckTask *task
gtk_label_set_max_width_chars (GTK_LABEL (task->label), MAX_WIDTH_CHARS);
if (wnck_task_get_demands_attention (task))
@@ -229,54 +301,100 @@
gtk_widget_show (task->label);
gtk_box_pack_start (GTK_BOX (hbox), task->image, FALSE, FALSE, 4);
-@@ -2737,7 +2896,6 @@ draw_dot (GdkWindow *window, GdkGC *lgc,
+@@ -2728,6 +2920,11 @@ wnck_task_create_widgets (WnckTask *task
+ default:
+ g_assert_not_reached ();
+ }
++
++ g_signal_connect_object (task->button, "expose_event",
++ G_CALLBACK (wnck_task_expose),
++ G_OBJECT (task),
++ G_CONNECT_AFTER);
+ }
+
+ static void
+@@ -2737,30 +2934,74 @@ draw_dot (GdkWindow *window, GdkGC *lgc,
gdk_draw_point (window, lgc, x+1, y+1);
}
-
static gboolean
- wnck_task_class_group_expose (GtkWidget *widget,
- GdkEventExpose *event,
-@@ -2746,6 +2904,7 @@ wnck_task_class_group_expose (GtkWidget
+-wnck_task_class_group_expose (GtkWidget *widget,
+- GdkEventExpose *event,
+- gpointer data)
++wnck_task_expose (GtkWidget *widget,
++ GdkEventExpose *event,
++ gpointer data)
+ {
GtkStyle *style;
GdkGC *lgc, *dgc;
int x, y, i, j;
+ WnckTask *task;
- style = widget->style;
-
-@@ -2761,6 +2920,39 @@ wnck_task_class_group_expose (GtkWidget
- draw_dot (widget->window, lgc, dgc, x + j*3, y + i*3);
- }
- }
-+
+- style = widget->style;
+ task = WNCK_TASK (data);
-+
-+ if ((event->area.x <= widget->allocation.x) &&
-+ (event->area.y <= widget->allocation.y) &&
-+ (event->area.width >= widget->allocation.width) &&
-+ (event->area.height >= widget->allocation.height))
+
+- lgc = style->light_gc[GTK_STATE_NORMAL];
+- dgc = style->dark_gc[GTK_STATE_NORMAL];
++ switch (task->type)
+ {
-+
-+ if (task->screenshot != NULL)
++ case WNCK_TASK_CLASS_GROUP:
++ style = widget->style;
++ lgc = style->light_gc[GTK_STATE_NORMAL];
++ dgc = style->dark_gc[GTK_STATE_NORMAL];
++
++ x = widget->allocation.x + widget->allocation.width -
++ (GTK_CONTAINER (widget)->border_width + style->ythickness + 10);
++ y = widget->allocation.y + style->xthickness + 2;
++
++ for (i = 0; i < 3; i++) {
++ for (j = i; j < 3; j++) {
++ draw_dot (widget->window, lgc, dgc, x + j*3, y + i*3);
++ }
++ }
+
+- x = widget->allocation.x + widget->allocation.width -
+- (GTK_CONTAINER (widget)->border_width + style->ythickness + 10);
+- y = widget->allocation.y + style->xthickness + 2;
+-
+- for (i = 0; i < 3; i++) {
+- for (j = i; j < 3; j++) {
+- draw_dot (widget->window, lgc, dgc, x + j*3, y + i*3);
++ /* Fall through to get screenshot
++ */
++ case WNCK_TASK_WINDOW:
++ if ((event->area.x <= widget->allocation.x) &&
++ (event->area.y <= widget->allocation.y) &&
++ (event->area.width >= widget->allocation.width) &&
++ (event->area.height >= widget->allocation.height))
+ {
-+ g_object_unref (task->screenshot);
-+ task->screenshot = NULL;
++
++ if (task->screenshot != NULL)
++ {
++ g_object_unref (task->screenshot);
++ task->screenshot = NULL;
++ }
++
++ if (task->button_glow != 0)
++ {
++ task->screenshot = gdk_pixbuf_get_from_drawable (NULL,
++ widget->window,
++ NULL,
++ widget->allocation.x,
++ widget->allocation.y,
++ 0, 0,
++ widget->allocation.width,
++ widget->allocation.height);
++ }
+ }
+
-+ if (task->button_glow != 0)
-+ task->screenshot = gdk_pixbuf_get_from_drawable (NULL,
-+ widget->window,
-+ NULL,
-+ widget->allocation.x,
-+ widget->allocation.y,
-+ 0, 0,
-+ widget->allocation.width,
-+ widget->allocation.height);
++ case WNCK_TASK_STARTUP_SEQUENCE:
++ break;
+ }
+- }
+
-+ }
-+ else if ((task->button_glow == 0) &&
-+ (task->screenshot != NULL))
++ if ((task->button_glow == 0) &&
++ (task->screenshot != NULL))
+ {
+ g_object_unref (task->screenshot);
+ task->screenshot = NULL;
@@ -285,3 +403,15 @@
return FALSE;
}
+@@ -2894,11 +3135,6 @@ wnck_task_new_from_class_group (WnckTask
+
+ wnck_task_create_widgets (task);
+
+- g_signal_connect_object (task->button, "expose_event",
+- G_CALLBACK (wnck_task_class_group_expose),
+- G_OBJECT (task),
+- G_CONNECT_AFTER);
+-
+ return task;
+ }
+
Index: libwnck.spec
===================================================================
RCS file: /cvs/dist/rpms/libwnck/devel/libwnck.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- libwnck.spec 10 May 2005 09:27:15 -0000 1.24
+++ libwnck.spec 10 May 2005 14:49:00 -0000 1.25
@@ -6,7 +6,7 @@
Summary: Window Navigator Construction Kit
Name: libwnck
Version: 2.10.0
-Release: 2
+Release: 3
URL: ftp://ftp.gnome.org
Source0: %{name}-%{version}.tar.bz2
License: LGPL
@@ -89,6 +89,9 @@
%{_datadir}/gtk-doc/html/libwnck
%changelog
+* Tue May 10 2005 Ray Strode <rstrode at redhat.com> 2.10.0-3
+- fix some rendering issues with the last patch
+
* Tue May 10 2005 Ray Strode <rstrode at redhat.com> 2.10.0-2
- add noticable glowing effect to task bar to counteract
focus stealing prevention (bug #157285)
More information about the fedora-cvs-commits
mailing list