From patchwork Thu Oct 4 21:27:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentine Barshak X-Patchwork-Id: 189336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 42F622C03ED for ; Fri, 5 Oct 2012 07:26:36 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EC2C210BAAF; Thu, 4 Oct 2012 21:26:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Dwbagc71Iou; Thu, 4 Oct 2012 21:26:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5035310BABA; Thu, 4 Oct 2012 21:26:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 32AEB8F74B for ; Thu, 4 Oct 2012 21:26:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C7B8E8BB3A for ; Thu, 4 Oct 2012 21:26:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vFcgpIvbEkSb for ; Thu, 4 Oct 2012 21:26:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 721A28BAAC for ; Thu, 4 Oct 2012 21:26:28 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id i5so1018031lah.16 for ; Thu, 04 Oct 2012 14:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=JgmFYnsYWoBia73EjTrF2Tj47lqLzd0Sx3VvUrghQJQ=; b=RiPLnRq5QDoTf0X4rZvmfy3RLmVPyvuzRK86wwQygH6c8orI2/VRXVp2G3I8zuoypu 6+4L85/Pz1Xl8zBdwtyyce1qLZoa+nM9hhKKoTBsIO4J+gSrHLJTM7qwG6VOjr3fKy9U NBbocegr6bZ8zCRzVAUKHOXHDMoYEfRhw+qzGLW3Gc1DwP7nMa9KrgMy8MaPflvcu5ro swCKs38CXvZ4vonrSC8WrhCJJs7vcBh23M2UQtRBIiTRdKynOMS6okxxVqYrd+3+ETMD MbehXdKXPhT5wUf24cfH9IADAdteWGcWlH0KBrtVVVh3xi1frjHNypZu8ZlebzHxDt1j yVag== Received: by 10.152.48.102 with SMTP id k6mr5215368lan.12.1349385986251; Thu, 04 Oct 2012 14:26:26 -0700 (PDT) Received: from black.localnet ([93.100.122.208]) by mx.google.com with ESMTPS id gk11sm940396lab.3.2012.10.04.14.26.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Oct 2012 14:26:25 -0700 (PDT) From: Valentine Barshak To: buildroot@busybox.net Date: Fri, 5 Oct 2012 01:27:19 +0400 Message-Id: <1349386039-817-1-git-send-email-gvaxon@gmail.com> X-Mailer: git-send-email 1.7.11.4 Subject: [Buildroot] [PATCH] libglib2: Fix midori save file dialog not being rendered X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This fixes the following issue, when midori save file dialog is not rendered: Neither the dialog nor the main window is redrawn unless the save file dialog is closed. The buttons can be blindly clicked though. This is a known issue, which has been fixed in glib 2.32.2. Backported from the commit ffb000e37be998df55d446c85edbc440fad06a17 From: Dan Winship gmain: block child sources when blocking the parent When blocking a source that has child sources, we need to consider the children blocked as well. Otherwise they will still trigger repeatedly in an inner loop started from the parent source's callback. https://bugzilla.gnome.org/show_bug.cgi?id=669260 Signed-off-by: Valentine Barshak --- ...ck-child-sources-when-blocking-the-parent.patch | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 package/libglib2/libglib2-gmain-block-child-sources-when-blocking-the-parent.patch diff --git a/package/libglib2/libglib2-gmain-block-child-sources-when-blocking-the-parent.patch b/package/libglib2/libglib2-gmain-block-child-sources-when-blocking-the-parent.patch new file mode 100644 index 0000000..58671fd --- /dev/null +++ b/package/libglib2/libglib2-gmain-block-child-sources-when-blocking-the-parent.patch @@ -0,0 +1,100 @@ +This should fix midori save file dialog not being displayed. +Backported from the following changes: + +From ffb000e37be998df55d446c85edbc440fad06a17 Mon Sep 17 00:00:00 2001 +From: Dan Winship +Date: Wed, 11 Apr 2012 15:21:17 -0400 +Subject: [PATCH] gmain: block child sources when blocking the parent + +When blocking a source that has child sources, we need to consider the +children blocked as well. Otherwise they will still trigger repeatedly +in an inner loop started from the parent source's callback. + +https://bugzilla.gnome.org/show_bug.cgi?id=669260 +diff -pruN glib-2.30.2.orig/glib/gmain.c glib-2.30.2/glib/gmain.c +--- glib-2.30.2.orig/glib/gmain.c 2011-11-11 21:56:52.000000000 +0400 ++++ glib-2.30.2/glib/gmain.c 2012-09-22 03:41:07.686442208 +0400 +@@ -185,7 +185,8 @@ typedef struct _GSourceCallback GSourceC + typedef enum + { + G_SOURCE_READY = 1 << G_HOOK_FLAG_USER_SHIFT, +- G_SOURCE_CAN_RECURSE = 1 << (G_HOOK_FLAG_USER_SHIFT + 1) ++ G_SOURCE_CAN_RECURSE = 1 << (G_HOOK_FLAG_USER_SHIFT + 1), ++ G_SOURCE_BLOCKED = 1 << (G_HOOK_FLAG_USER_SHIFT + 2) + } GSourceFlags; + + #ifdef G_THREADS_ENABLED +@@ -323,8 +324,7 @@ struct _GSourcePrivate + #endif + + #define SOURCE_DESTROYED(source) (((source)->flags & G_HOOK_FLAG_ACTIVE) == 0) +-#define SOURCE_BLOCKED(source) (((source)->flags & G_HOOK_FLAG_IN_CALL) != 0 && \ +- ((source)->flags & G_SOURCE_CAN_RECURSE) == 0) ++#define SOURCE_BLOCKED(source) (((source)->flags & G_SOURCE_BLOCKED) != 0) + + #define SOURCE_UNREF(source, context) \ + G_STMT_START { \ +@@ -2352,12 +2352,24 @@ block_source (GSource *source) + + g_return_if_fail (!SOURCE_BLOCKED (source)); + ++ source->flags |= G_SOURCE_BLOCKED; ++ + tmp_list = source->poll_fds; + while (tmp_list) + { + g_main_context_remove_poll_unlocked (source->context, tmp_list->data); + tmp_list = tmp_list->next; + } ++ ++ if (source->priv && source->priv->child_sources) ++ { ++ tmp_list = source->priv->child_sources; ++ while (tmp_list) ++ { ++ block_source (tmp_list->data); ++ tmp_list = tmp_list->next; ++ } ++ } + } + + /* HOLDS: source->context's lock */ +@@ -2366,15 +2378,27 @@ unblock_source (GSource *source) + { + GSList *tmp_list; + +- g_return_if_fail (!SOURCE_BLOCKED (source)); /* Source already unblocked */ ++ g_return_if_fail (SOURCE_BLOCKED (source)); /* Source already unblocked */ + g_return_if_fail (!SOURCE_DESTROYED (source)); + ++ source->flags &= ~G_SOURCE_BLOCKED; ++ + tmp_list = source->poll_fds; + while (tmp_list) + { + g_main_context_add_poll_unlocked (source->context, source->priority, tmp_list->data); + tmp_list = tmp_list->next; + } ++ ++ if (source->priv && source->priv->child_sources) ++ { ++ tmp_list = source->priv->child_sources; ++ while (tmp_list) ++ { ++ unblock_source (tmp_list->data); ++ tmp_list = tmp_list->next; ++ } ++ } + } + + /* HOLDS: context's lock */ +@@ -2453,8 +2477,7 @@ g_main_dispatch (GMainContext *context) + if (!was_in_call) + source->flags &= ~G_HOOK_FLAG_IN_CALL; + +- if ((source->flags & G_SOURCE_CAN_RECURSE) == 0 && +- !SOURCE_DESTROYED (source)) ++ if (SOURCE_BLOCKED (source) && !SOURCE_DESTROYED (source)) + unblock_source (source); + + /* Note: this depends on the fact that we can't switch