Full screen app screen dimensions

Hi, I’m using gtkmm4, my app uses full screen, I had noticed that some assets are misplaced, so I added a print of the screen dimensions on every call to ApplicationWindow::snapshot_vfunc().
I found that right after application start the dimensions are 1923 X 1086.
And after I change the windows order (alt+tab twice), the screen dimensions are 1920X1080.
Why does this happen and how can I maintain fixed dimensions?

You will need to provide more information:

  • which platform are you using?
  • if Linux, which windowing system: X11 or Wayland?
  • if Linux, which window manager are you using?

Additionally, what do you mean with “fullscreen”? Are you maximizing the window with gtk_window_maximize or are you asking the windowing system to full screen the contents of your window with gtk_window_fullscreen?

The size of the window is given to GTK by the windowing system; GTK has very little to do with it. But that extra padding might be the client-side shadow; how are you retrieving the window size?

I’m running on Ubuntu20.04
Fullscreen means calling fullscreen_on_monitor()
The window size is retrieved from the snapshot in ApplicationWindow::snapshot_vfunc().

You haven’t answered as to what kind of windowing system you’re using: X11 or Wayland?

Sure, but how? What kind of API are you calling to get the size?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.