← Back to team overview

desktop-packages team mailing list archive

[Bug 914665] [NEW] window hash table not created until screen_get is called

 

Public bug reported:

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.

** Affects: libwnck (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libwnck in Ubuntu.
https://bugs.launchpad.net/bugs/914665

Title:
  window hash table not created until screen_get is called

Status in “libwnck” package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libwnck/+bug/914665/+subscriptions


Follow ups

References