Libwnck usage



Hi,

Pardon me if this is not the right mailing list.

I am trying to run a simple code to minimize an open window using the libwnck api. But I keep getting the following error:
(mywnck1:1839): Wnck-CRITICAL **: wnck_window_minimize: assertion `WNCK_IS_WINDOW (window)' failed

I have attached my program. Can anybody please help me with the code?

Thanks in advance.

--
regards,
Nischal E Rao
blogs.sun.com/nischal

Join RVCE OSUM at http://osum.sun.com/group/rvceosum

#define WNCK_I_KNOW_THIS_IS_UNSTABLE
#include <libwnck/libwnck.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
#include <glib/gi18n.h>

int main(int argc, char **argv){
WnckWindow *window;
WnckScreen *screen;
gdk_init(&argc, &argv);
sleep(3);
screen = wnck_screen_get_default ();
window = wnck_screen_get_active_window (screen);
wnck_window_minimize (window);
return 0;
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]