[notification-daemon] Fix grab some more
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [notification-daemon] Fix grab some more
- Date: Fri, 8 Oct 2010 21:58:33 +0000 (UTC)
commit 6f02390f646e2f66d49ef4284fab75ad476e19a4
Author: William Jon McCann <jmccann redhat com>
Date: Thu Oct 7 19:01:11 2010 -0400
Fix grab some more
src/nd-queue.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/nd-queue.c b/src/nd-queue.c
index d102ebc..81b3bf1 100644
--- a/src/nd-queue.c
+++ b/src/nd-queue.c
@@ -389,12 +389,20 @@ on_dock_button_press (GtkWidget *widget,
GdkEventButton *event,
NdQueue *queue)
{
- if (event->type == GDK_BUTTON_PRESS) {
+ GtkWidget *event_widget;
+
+ if (event->type != GDK_BUTTON_PRESS) {
+ return FALSE;
+ }
+
+ event_widget = gtk_get_event_widget ((GdkEvent *)event);
+ if (event_widget == widget) {
release_grab (widget, event);
- return TRUE;
+ } else {
+ return FALSE;
}
- return FALSE;
+ return TRUE;
}
static void
@@ -967,6 +975,11 @@ update_dock (NdQueue *queue)
child = gtk_vbox_new (FALSE, 6);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (queue->priv->dock_scrolled_window),
child);
+ gtk_container_set_focus_hadjustment (GTK_CONTAINER (child),
+ gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (queue->priv->dock_scrolled_window)));
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (child),
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (queue->priv->dock_scrolled_window)));
+
list = g_hash_table_get_values (queue->priv->notifications);
list = g_list_sort (list, (GCompareFunc)collate_notifications);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]