Hello,
I read the article in C't, which teased me very much. So I tested the examples with Linux and KDevelop.
When I start the examples, they have the complete control of the mouse movements, even if another program has the focus. This is extremely obstructive when I try to debug the examples, because I cannot use the mouse to control the debugger. What can I do?
And still another question:
I spent some time with the quake examples until I found out that the problem with the textures is a known bug. Can I find a list of all known bugs anywhere on this website? I didn't find it in the Bug Tracker.
Thanks in advance
Thomas
Linux: Problem with Mouse Focus
The problem with the mouse focus can be eliminated by simple adding a
device->isWindowActive() in the run loop. For example
Unfortunately, CIrrDeviceLinux::isWindowActive() is not implemented yet, it always returns true. That's because I am not very experienced in linux, and my first target is Windows. But if you know a simple way to determine if the renderingwindow is active, just post it.
And you are right, a list of known bugs (+ known temporarily solution for this) would be a very good idea. I'll add this to the homepage.
device->isWindowActive() in the run loop. For example
Code: Select all
while(device->run())
if (device->isWindowActive())
{
//draw
}
And you are right, a list of known bugs (+ known temporarily solution for this) would be a very good idea. I'll add this to the homepage.
-
- Posts: 11
- Joined: Sat Nov 22, 2003 11:03 pm
Hi Niko,
here is a possible solution:
If I use this function in the run()-Loop and the irrlicht-Window looses focus, this has two effects:
I can use the mouse in the focus-window (that's what I wanted) and
the irrlicht-Window stops refreshing which leeds to strange color effects when you move another window over it (does'nt matter).
Still one question: Is it possible to get fixes from other linux users before you release the next version of irrlicht? I am especially interestet in the fix for the linux problem with quake textures
Regards
Thomas
here is a possible solution:
Code: Select all
//! returns if window is active. if not, nothing need to be drawn
bool CIrrDeviceLinux::isWindowActive()
{
Window focus_return;
int revert_to_return;
XGetInputFocus(display, &focus_return, &revert_to_return);
return (focus_return==window);
}
I can use the mouse in the focus-window (that's what I wanted) and
the irrlicht-Window stops refreshing which leeds to strange color effects when you move another window over it (does'nt matter).
Still one question: Is it possible to get fixes from other linux users before you release the next version of irrlicht? I am especially interestet in the fix for the linux problem with quake textures
Regards
Thomas