After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 604918 - spam from the osd window code
spam from the osd window code
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2009-12-18 15:09 UTC by Matthias Clasen
Modified: 2010-03-10 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (604 bytes, patch)
2009-12-18 15:09 UTC, Matthias Clasen
accepted-commit_now Details | Review
what's in git master (681 bytes, patch)
2010-01-19 10:18 UTC, Richard Hughes
committed Details | Review

Description Matthias Clasen 2009-12-18 15:09:36 UTC
Created attachment 150002 [details] [review]
patch

I've observed this when starting up gnome-power-manager, which ships a copy of the gsd osd window code:

(gnome-power-manager:15416): Gdk-CRITICAL **: gdk_window_invalidate_rect_full: assertion `GDK_IS_WINDOW (window)' failed


I'll attach a patch that fixes this by only doing work if the window is actually on screen. The patch was done against the g-p-m copy, but will apply just the same to g-s-d.
Comment 1 Richard Hughes 2009-12-18 15:11:28 UTC
Adding me as cc, as I'll need to patch g-p-m too.
Comment 2 Bastien Nocera 2009-12-22 14:56:55 UTC
I actually think the bug is in the gnome-power-manager code, otherwise we'd see this problem in gnome-settings-daemon as well.

You can blame me.
Comment 3 Matthias Clasen 2009-12-22 14:59:32 UTC
it is probably more visible with g-p-m because it creates the osd at startup, apparently, instead of as-needed.
Comment 4 Bastien Nocera 2009-12-22 15:00:12 UTC
Something like that should fix it:

diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c
index 23c137e..f24d50d 100644
--- a/src/gpm-backlight.c
+++ b/src/gpm-backlight.c
@@ -182,6 +182,7 @@ gpm_backlight_dialog_init (GpmBacklight *backlight)
 
        if (backlight->priv->popup == NULL) {
                backlight->priv->popup= gsd_media_keys_window_new ();
+               gtk_widget_realize (backlight->priv->popup);
                gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (backlight->priv->popup),
                                                         "gpm-brightness-lcd",
                                                         TRUE);
Comment 5 Jens Granseuer 2010-01-16 10:33:26 UTC
What about this? Still needed? Obsolete?
Comment 6 Bastien Nocera 2010-01-18 11:53:16 UTC
(In reply to comment #5)
> What about this? Still needed? Obsolete?

Richard will test the above patch against gnome-power-manager and reassign there if it fixes it.
Comment 7 Richard Hughes 2010-01-19 10:18:36 UTC
Created attachment 151748 [details] [review]
what's in git master

I've committed the following patch to gnome-power-manager which seems to fix the problem. Comments welcomed.
Comment 8 Bastien Nocera 2010-01-19 10:26:12 UTC
Fine by me.
Comment 9 Bastien Nocera 2010-03-10 11:17:28 UTC
Reopening, needs doing in g-s-d as well.
Comment 10 Bastien Nocera 2010-03-10 11:25:00 UTC
Committed to master.