Questions tagged [wnck]

Window Navigator Construction Kit, a library for use in writing pagers, tasklists, and more generally applications that are dealing with window management.

30 questions
7
votes
3 answers

Why python Wnck window.activate(int(time.time()))

This to me is VERY strange. Could someone please explain why the activate() function should want a timestamp? Wouldn't 99.9% of the time be NOW or ASAP or "At your earliest convenience"? And furthermore, if you try w.activate(0) you get this…
Harvey
  • 2,062
  • 2
  • 21
  • 38
6
votes
1 answer

pygtk window with box that ignores all X(mouse)events (passes them through)

I'd like to do the following: Create a fullscreen, always on top pygtk window with a webkit widget displaying some html, but with a box that is completely transparent, so that the windows below are visible. (This seems to be possible: Is it possible…
Rumex
  • 165
  • 6
5
votes
2 answers

How to test if GTK+ dialog has been created?

I've used Wnck to check whether a window has been created like this: screen = Wnck.Screen.get_default() screen.force_update() # recommended per Wnck documentation window_list = screen.get_windows() for window in window_list: …
Zelphir Kaltstahl
  • 5,722
  • 10
  • 57
  • 86
4
votes
2 answers

python wnck not returning any data until after a pdb.set_trace()

On Ubuntu Linux / Gnome, I am trying to use python's wnck binding to get a list of all the open windows. My code looks like this: #! /usr/bin/python from pprint import pprint import wnck screen =…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
4
votes
1 answer

Get WNCK working with Python 3.5?

I have a project right now and I'm using WNCK to find the location of open windows, as well as focus them. I recently added features that require Python 3.5, but WNCK is only working with Python 2.7 or whatever I have installed. When running…
Nerdsie
  • 116
  • 1
  • 3
  • 11
3
votes
0 answers

wnck alternatives in Ubuntu 18.04 using Python

As Wnck support is removed for Ubuntu 18.04. So what is the alternative to Wnck get_windows() I'm working in PyBullet and I want to getting output of 3D object using pygetwindows and pyautogui in my Windows system. But in Ubuntu pygetwindows doesn't…
Erric
  • 123
  • 1
  • 10
3
votes
0 answers

How to get the WNCK window that a known GDK Window belongs to?

I'd like to know some process info of a window that WNCK could provide. But I do not know the WNCK window, instead, I have a GDK window at hand, which may be a sub part of the WNCK window. How could I get to the WNCK window from the GDK window?
Magicloud
  • 818
  • 1
  • 7
  • 17
3
votes
2 answers

How can I get a list of windows with Wnck, using PyGI?

I just started using PyGI (on Ubuntu Natty), although I have never used pygtk before. I have used wnck in a wxPython program though, and it was easy enough to get a list of currently opened windows. From PyGI, the window list is always…
crazedpsyc
  • 65
  • 1
  • 4
3
votes
3 answers

Set WM_CLASS (with wnck, xprop, or something else)

I'm trying to group multiple Chrome standalone windows under the same launcher in Ubuntu 14.04. It doesn't seem to be possible simply to specify multiple WM_CLASS variables in the .desktop file (see comments on this answer). The first solution I hit…
tsbertalan
  • 1,453
  • 1
  • 21
  • 30
3
votes
1 answer

Memory leak in libwnck

I tried to compile the first example of libwnck's introduction: #include int main (int argc, char **argv) { WnckScreen *screen; WnckWindow *active_window; GList *window_l; gdk_init (&argc, &argv); screen =…
qdii
  • 12,505
  • 10
  • 59
  • 116
2
votes
1 answer

How can I get a window's icon name in Xorg?

I am attempting to get a window's icon name with python, for use in a pyclutter-based taskbar. I have gotten the XID via wnck, but wnck seems to only be capable of giving me a gtk.gdk.Pixbuf, which is not useful for clutter. I am sure there is some…
crazedpsyc
  • 65
  • 1
  • 4
2
votes
1 answer

Detect when a window opens in wnck python

I am making a window tiling script using libwnck. I would like to detect when the user opens a new window in order to resize it. Here is the gist of my code so far: import gi gi.require_version("Wnck", "3.0") from gi.repository import Wnck screen…
Ahmed Khalf
  • 136
  • 1
  • 9
2
votes
1 answer

Detecting active windows in python with KDE

I'm writing a small python script that tracks how I'm dividing my time between programs. It needs to detect the currently active window (ideally, the application controlling that window, but I can make do with just the window title), as well as idle…
Widjet
  • 270
  • 3
  • 11
2
votes
1 answer

Determining active window / application with wnck (python) fails

in my python-script i have to determine the actual active window / application to react on remote-events (lirc) application dependent. So i tried to relaize it like described here. But the test-code import wnck, time run = True while run: try: …
thz
  • 111
  • 8
2
votes
1 answer

Adding default parameter that is object to a function that is inside a class

I am trying to make a applet for mate-panel in linux . I have to modules Window.py and Applet.py. I get this error: Traceback (most recent call last): File "./Applet.py", line 37, in WindowButtonsAppletFactory WindowButtonsApplet(applet) File…
user6778973
1
2