Strange problem on Linux - SetActiveWindow ...

Linux specific forum
agb2008
User
User
Posts: 60
Joined: Fri Jan 15, 2016 2:22 pm

Strange problem on Linux - SetActiveWindow ...

Post by agb2008 »

I am trying to port my application from Windows to Linux and got very strange issue that I can't explain or found solution so far.
In my application I've got few small "utility" windows where user could quickly adjust setting or switch computation mode. To make sure
that windows would not be hidden by mistake before selection made I am using SetActiveWinow function in a main repeat loop to make sure
that my window is active and got focus - so user have to close it first before going back to main application window.
That's work as expected on Windows OS (32 and 64 bit) - but fails on Linux. And not only fails - I've got very strange side effect: if I click outside
my "utility" window, instead of brining focus back to this windows I've got all my XWindows system (Gnome based) totally hang. All other windows
that were opened before PureBasic, PB window - so that I can't even close or kill my test application... Never seen such effect on Linux.
Could anyone advice ? I am using PureBasic 64 bit on ROSA Fresh Linux 64 bit (OpenMandriva flavor of Linux) with GNOME Window manager.
And I have to state once again - it's working on Windows platform as expected...
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Strange problem on Linux - SetActiveWindow ...

Post by collectordave »

Hi
Posted some code on this thread. http://www.purebasic.fr/english/viewtop ... 1&start=15 can you try that code to see what happens?

I do not have linux at the moment so cannot try it.

If you need it I can write some very simple test code just for two windows.

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply