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

Topbar menu invisible in fullscreen #1576

Closed
c64cosmin opened this Issue May 22, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@c64cosmin

c64cosmin commented May 22, 2017

Using the x64 windows10 snapshot, downloaded today.
When in fullscreen mode, the topbar menu is not displayed.
I can return back to normal windowed mode and the issue disappears.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 23, 2017

Owner

Hmm, can you show a screenshot? I've never seen this problem and would currently have no idea how to fix it. With "fullscreen mode", you mean when pressing F11 or also when simply maximizing the window?

Owner

bjorn commented May 23, 2017

Hmm, can you show a screenshot? I've never seen this problem and would currently have no idea how to fix it. With "fullscreen mode", you mean when pressing F11 or also when simply maximizing the window?

@c64cosmin

This comment has been minimized.

Show comment
Hide comment
@c64cosmin

c64cosmin May 23, 2017

Doing more investigation the issues appears when pressing F11, having OpenGL enabled and there is a map open. Doing a screen shot and then pasting the image looks right(containing the topbar menu) but on the screen there is no topbar menus.
I suspect it's either a problem on how Windows10 handles windows with OpenGL contexts(most probably), or a bug on how Qt handles OpenGL windows.
An borderless, titleless windows might do the trick.

The issue disappears by disabling OpenGL in preferences.

c64cosmin commented May 23, 2017

Doing more investigation the issues appears when pressing F11, having OpenGL enabled and there is a map open. Doing a screen shot and then pasting the image looks right(containing the topbar menu) but on the screen there is no topbar menus.
I suspect it's either a problem on how Windows10 handles windows with OpenGL contexts(most probably), or a bug on how Qt handles OpenGL windows.
An borderless, titleless windows might do the trick.

The issue disappears by disabling OpenGL in preferences.

@not-surt

This comment has been minimized.

Show comment
Hide comment
@not-surt

not-surt May 23, 2017

Sounds like this is the problem: http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows

Add the following code to the window source:
#ifdef Q_OS_WIN
#include <QtPlatformHeaders\QWindowsWindowFunctions>
#endif

In constructor:
#ifdef Q_OS_WIN
winId(); // Allocate window handle
QWindowsWindowFunctions::setHasBorderInFullScreen(windowHandle(), true);
#endif

not-surt commented May 23, 2017

Sounds like this is the problem: http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows

Add the following code to the window source:
#ifdef Q_OS_WIN
#include <QtPlatformHeaders\QWindowsWindowFunctions>
#endif

In constructor:
#ifdef Q_OS_WIN
winId(); // Allocate window handle
QWindowsWindowFunctions::setHasBorderInFullScreen(windowHandle(), true);
#endif

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 23, 2017

Owner

Sounds like this is the problem: http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows

Hmm, indeed, thanks for digging that down!

The suggested solution is to do:

QWindowsWindowFunctions::setHasBorderInFullScreen(tlwWindow->windowHandle(), true);

Though it says that this will add a 1 pixel border around the window to work around the issue. Since that may be annoying for scroll bars, I should probably only do that when OpenGL rendering is enabled.

Generally there isn't much of an advantage to the current OpenGL rendering btw, since it works through the QPainter API and as such it's usually not faster than software rendering.

Owner

bjorn commented May 23, 2017

Sounds like this is the problem: http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows

Hmm, indeed, thanks for digging that down!

The suggested solution is to do:

QWindowsWindowFunctions::setHasBorderInFullScreen(tlwWindow->windowHandle(), true);

Though it says that this will add a 1 pixel border around the window to work around the issue. Since that may be annoying for scroll bars, I should probably only do that when OpenGL rendering is enabled.

Generally there isn't much of an advantage to the current OpenGL rendering btw, since it works through the QPainter API and as such it's usually not faster than software rendering.

@bjorn bjorn added this to the Tiled 1.0 milestone May 23, 2017

@bjorn bjorn closed this in 00daa99 May 23, 2017

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