window hash table not created until screen_get is called

Bug #914665 reported by Thomi Richards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libwnck (Ubuntu)
New
Low
Unassigned

Bug Description

I've found this bug using the wnck python bindings (python-wnck) package, but the actual problem is in the libwnck library.

I have python code where I have a list of X11 window IDs from an independant source. I want to get a Wnck window from these Ids. In poython, doing this:

window = wnck.window_get(my_xwindow_id)

does not work (window_get returns None) until i call "wnck.screen_get_default()". This is because the window_hash table does not get build until a screen is accessed.

libwnck./window.c lines 470-477 look like this:

WnckWindow*
wnck_window_get (gulong xwindow)
{
  if (window_hash == NULL)
    return NULL;
  else
    return g_hash_table_lookup (window_hash, &xwindow);
}

A possible fix would be to build the window_hash if it doesn't exist.

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Thank you for the bug report. Since there seems to be a work around, though hacky, and it's in an optional package, I set the important to low.

Changed in libwnck (Ubuntu):
importance: Undecided → Low
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.