New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No focus on Tiled app window #1256

Closed
todorone opened this Issue Apr 19, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@todorone

todorone commented Apr 19, 2016

With new convenient multi tabs feature in Tiled there is small issue - after you open another .tmx file through external file manager Tiled app window doesn't get focus so you have to manually activate it.

OS: Windows 7

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Apr 19, 2016

Owner

I think Windows does this intentionally. Instead, the application will be highlighted on the taskbar, right? Still, it's probably worth looking into actually raising the window.

Owner

bjorn commented Apr 19, 2016

I think Windows does this intentionally. Instead, the application will be highlighted on the taskbar, right? Still, it's probably worth looking into actually raising the window.

@bjorn bjorn added the windows label Apr 19, 2016

@todorone

This comment has been minimized.

Show comment
Hide comment
@todorone

todorone Apr 19, 2016

Yeah, now Tiled just highlight itself on taskbar. But tradinitional and expected behaviour on Windows is to gain focus when we open corresponding file. It's not such a major issue but if it can be fixed easily it'd be cool...

todorone commented Apr 19, 2016

Yeah, now Tiled just highlight itself on taskbar. But tradinitional and expected behaviour on Windows is to gain focus when we open corresponding file. It's not such a major issue but if it can be fixed easily it'd be cool...

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 6, 2016

Owner

Hmm, I'm not sure if there's an easy fix for this.

The code already does:

actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
actWin->raise();
actWin->activateWindow();

And the docs for activateWindow say:

On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.

Yet, I see other applications raising themselves to the front in this scenario...

Owner

bjorn commented May 6, 2016

Hmm, I'm not sure if there's an easy fix for this.

The code already does:

actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
actWin->raise();
actWin->activateWindow();

And the docs for activateWindow say:

On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.

Yet, I see other applications raising themselves to the front in this scenario...

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 6, 2016

Owner

Alright, there will be an option in Qt 5.7 to get the window to raise regardless: https://bugreports.qt.io/browse/QTBUG-14062

Owner

bjorn commented May 6, 2016

Alright, there will be an option in Qt 5.7 to get the window to raise regardless: https://bugreports.qt.io/browse/QTBUG-14062

@bjorn bjorn added the qt issue label Jun 13, 2016

@bjorn bjorn added the usability label Oct 25, 2016

@bjorn bjorn closed this in 72b7d7f May 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment