I've discovered a sad side-effect of the way moveToFront() and activate() are implemented :
moveToFront() activates the window, and activate() does it too, whereas the name of the former lead to think it's the correct way of bringing a window to the front without activating it
So i've come to wonder if there should'nt be a method to do just this ? Moving the window to the top of the Z-order without any input handling alteration ?
[Bug] Inconsistency in moveToFront and activate
Moderators: CEGUI MVP, CEGUI Team
Re: Inconsistency in moveToFront and activate
I looked at the trunk code (v0.7.5+) and these two actions are pretty coupled at the moment: activate() merely releases input-capture from the currently active window and then calls moveToFront(), and moveToFront() handles both the movement and the activation. Their separation would be useful in situations where say an alert window appears on top of all other windows, without taking input-focus from the current window, and then hides itself automatically; there are of course other scenarios where this behavior is warranted.
The bottom line is that the current behavior is not intuitive at all: a function should /only/ perform the action its name implies. I think that fixing these functions in and of themselves would be trivial, but there may be other code incorrectly assuming and relying on the non-intuitive behavior (eg activating calls moveToFront and vice-verse). Hopefully CE or Kulik will be able to resolve this, but if you need this fixed right away feel free to fix this in CEGUI and submit a patch yourself
p.s. For future reference, please make sure to include to version of CEGUI you are using since different versions can have different behaviors.
The bottom line is that the current behavior is not intuitive at all: a function should /only/ perform the action its name implies. I think that fixing these functions in and of themselves would be trivial, but there may be other code incorrectly assuming and relying on the non-intuitive behavior (eg activating calls moveToFront and vice-verse). Hopefully CE or Kulik will be able to resolve this, but if you need this fixed right away feel free to fix this in CEGUI and submit a patch yourself

p.s. For future reference, please make sure to include to version of CEGUI you are using since different versions can have different behaviors.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Inconsistency in moveToFront and activate
If someone wants to submit this to mantis that would be great[1].
Btw, there was a time in the far distant past when the active window was always whichever window was at the top of the z-order, which is where this originates from
CE.
[1] I am going to do such chores myself much less, and just prod people in the right direction instead - in this way hopefully people will get a bit more hands-on.
Btw, there was a time in the far distant past when the active window was always whichever window was at the top of the z-order, which is where this originates from

CE.
[1] I am going to do such chores myself much less, and just prod people in the right direction instead - in this way hopefully people will get a bit more hands-on.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Inconsistency in moveToFront and activate
This appears to have never been fixed. Having this issue on a project currently. Bumping for the sake of visibility, but I'll report it on Mantis myself.
Edit:
http://cegui.org.uk/mantis/view.php?id=1001
Edit:
http://cegui.org.uk/mantis/view.php?id=1001
Re: Inconsistency in moveToFront and activate
Thanks for your bug report.
To speed up merging of such bugs you can fork CEGUI and commit your changes and generate a merge request for us as described here:
https://confluence.atlassian.com/displa ... l+requests
You can still do this if you want.
To speed up merging of such bugs you can fork CEGUI and commit your changes and generate a merge request for us as described here:
https://confluence.atlassian.com/displa ... l+requests
You can still do this if you want.
CrazyEddie: "I don't like GUIs"
Re: [Bug] Inconsistency in moveToFront and activate
I commented in the code section and to the request itself, please read the comments.
CrazyEddie: "I don't like GUIs"
Re: [Bug] Inconsistency in moveToFront and activate
Thanks, will do when I have the chance.
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 11 guests