0

I have a MainWindow supposed to be always on full screen mode. A Dialog pops up when button "Open Dialog" is clicked. On a desktop system, Ubuntu 20.04, the application works correctly.

When a Dialog pops up, the MainWindow remains at full screen mode. However, on JetsonNano Ubuntu 18.04, the Task bar pops up and the MainWindow is not at full screen mode when the Dialog is opened. Has anyone get the same problem? Why is the difference?

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->showFullScreen();
}

void MainWindow::on_btn_dialog_clicked()
{
    Dialog *dialog = new Dialog();
    dialog->show();
}

1 Answers1

0

Documentation says:

Full-screen mode works fine under Windows, but has certain problems under X. These problems are due to limitations of the ICCCM protocol that specifies the communication between X11 clients and the window manager. ICCCM simply does not understand the concept of non-decorated full-screen windows. Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work. The borderless window is requested using MOTIF hints, which are at least partially supported by virtually all modern window managers.

An alternative would be to bypass the window manager entirely and create a window with the Qt::X11BypassWindowManagerHint flag. This has other severe problems though, like totally broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.

X11 window managers that follow modern post-ICCCM specifications support full-screen mode properly.

mugiseyebrows
  • 4,138
  • 1
  • 14
  • 15