google-code-export / gambas

Automatically exported from code.google.com/p/gambas
1 stars 0 forks source link

Not able to use Desktop.ActiveWindow to change the active window #332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) I am not able to use Desktop.ActiveWindow to set the active window, although 
in the Gambas Documentation, it says that Desktop.ActiveWindow "Returns or sets 
the current active top-level window."  

I DO have the gb.desktop component loaded with the program.

2) 
Version: Gambas 3.3
Operating system: Linux 3.2.0-31-generic
Distribution: Xubuntu 12.04
Architecture: x86_64
GUI component: QT4
Desktop used: XFCE

3) I have attached a small program to examine this problem:  
DesktopActiveWindowBug

Thanks for your help,\

Jon

Original issue reported on code.google.com by jonericn...@gmail.com on 26 Sep 2012 at 7:50

Attachments:

GoogleCodeExporter commented 9 years ago
Indeed. I tried some fixes but nothing works, although I apparently follow the 
X11 specifications... :-/

Original comment by benoit.m...@gmail.com on 1 Oct 2012 at 12:00

GoogleCodeExporter commented 9 years ago
I found my mistake. Fixed in revision #5220.

Original comment by benoit.m...@gmail.com on 1 Oct 2012 at 12:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Oops, my fault... I have to make a 3.3.4 version now.

As a temporary workaround, here is the code that activates a window:

_Desktop.SendClientMessageToRootWindow("_NET_ACTIVE_WINDOW", [1, 0, Value, 0, 
0], Value)

Replace 'Value' with the window handle (beware, it is specified twice).

Original comment by benoit.m...@gmail.com on 12 Oct 2012 at 4:58