notify-osd cannot detect panel with gtk 2.17.4

Bug #401809 reported by Chow Loong Jin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Fix Released
Medium
Mirco Müller

Bug Description

With a multihead configuration, left (primary) monitor being 1280x1024, and right monitor being 1280x800, aligned at their bases, notifications do not appear. This is because notify-osd places the notifications in the top right corner, which is not displayed by the secondary monitor, since it's aligned at the bases. The panel is at the top of the left monitor.

The reason for this is that notify-osd cannot detect the panel when libgtk 2.17.4 is installed, as shown by the following debug message:
(notify-osd:30917): Gdk-CRITICAL **: gdk_region_destroy: assertion `region != NULL' failed
** (notify-osd:30917): DEBUG: [2009-07-21T00:06:08-00:00, notify-send, id:0, icon:] bla

** (notify-osd:30917): DEBUG: selecting monitor 0 at (0,0) - 1280x1024
** (notify-osd:30917): DEBUG: no panel detetected; using workarea fallback
** (notify-osd:30917): DEBUG: top corner at: 2295, 23

The offending snippet of code is this (in _window_look_for_top_panel_attributes, in src/defaults.c):
        /* discard dialog windows like panel properties or the applet directory... */
       if (gdk_window_get_type_hint (win)
           != GDK_WINDOW_TYPE_HINT_DOCK)
                goto failed;

For some reason, as of gtk 2.17.4, gdk_window_get_type_hint returns GDK_WINDOW_TYPE_HINT_NORMAL for all windows that don't belong to the calling application, and this broke notify-osd's method of looking for a panel.

The part of the code in GDK which causes GDK_WINDOW_TYPE_HINT_NORMAL to be returned is this (in gdk_window_get_type_hint(), in gdk/x11/gdkwindow-x11.c):
  if (GDK_WINDOW_DESTROYED (window) ||
       !WINDOW_IS_TOPLEVEL (window))
     return GDK_WINDOW_TYPE_HINT_NORMAL;

description: updated
Revision history for this message
Mirco Müller (macslow) wrote :

Just reviewed, tested and committed the branch "lp:~hyperair/notify-osd/wnck-for-dock" fixing this bug. Thanks Chow!

Changed in notify-osd:
assignee: nobody → Mirco Müller (macslow)
importance: Undecided → Medium
status: New → Fix Committed
Neil J. Patel (njpatel)
Changed in notify-osd:
status: Fix Committed → Fix Released
affects: notify-osd → notify-osd (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.