Where is a good place to ask for help on strange behavior regarding GTK+ programming with gtk-rs?

Hello everybody.

I have written a GTK+ application with gtk-rs, that runs perfectly well on the standard desktop of Ubuntu 14.04, being Unity, but shows strange behavior on the standard desktop of Ubuntu 18.04, being Gnome.

Here is the program.

Unfortunately I don't have access to other desktops.

Can someone help me to check if the behavior is specific to the Gnome desktop, or if it is my fault somehow? Or give me some pointers to some place where I can get such help?

I am testing your demo on Arch Linux x86_64, with the last version of Gnome. Apparently I am not able to get strange behaviours. What is happening on your 18.04 desktop?

Sorry for not having included this in my original question.

Hoping not to bore you too much, I explain first what I want to achieve and how I try to do that.

As you might have noticed, the app is intended to be able to show more than only one window and to save the state of the window in a global struct when it is closed, so when a new window is created, it should be set to the same state as the previously closed window. To get this window state, I use the .connect_window_state_event() callback.

The strange behavior I do reproduce by the following steps:

  1. In a terminal start the application in the background, like ./target/debug/show-gnome-maximize-bug &
  2. Switch back to the terminal and start a second "instance" of the app - showing a second window.
  3. First maximize this second window, and then click the Fullscreen button.
  4. Close this window by using the key combination Alt+F4
  5. In the terminal start a third "instance" of the app and watch the output of the println statements showing the window state events.

This third window is shown fullscreen, as it should be, but the maximize state changes from true when the window is created to false at the end.

On Ubuntu 14.04 the window state MAXIMIZED does not change to false on window creation, that is, it stays Maximized.

I am not sure, therefore I am copy-pasting what I obtain when running the third instance.

./target/debug/show-gnome-maximize-bug

--- new window state event received - start processing ------------------------------------------
changed_window_state: WITHDRAWN | FOCUSED
new_window_state: FOCUSED
window_state_local_mut.is_fullscreen: false
window_state_local_mut.is_maximized: false
--- end processing ------------------------------------------------------------------------


--- new window state event received - start processing ------------------------------------------
changed_window_state: MAXIMIZED | FULLSCREEN | FOCUSED | TILED | TOP_TILED | RIGHT_TILED | BOTTOM_TILED | LEFT_TILED
new_window_state: MAXIMIZED | FULLSCREEN | TILED | TOP_TILED | RIGHT_TILED | BOTTOM_TILED | LEFT_TILED
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: true
--- end processing ------------------------------------------------------------------------

--- new window state event received - start processing ------------------------------------------
changed_window_state: FOCUSED
new_window_state: MAXIMIZED | FULLSCREEN | FOCUSED | TILED | TOP_TILED | RIGHT_TILED | BOTTOM_TILED | LEFT_TILED
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: true
--- end processing ------------------------------------------------------------------------


--- new window state event received - start processing ------------------------------------------
changed_window_state: FOCUSED
new_window_state: MAXIMIZED | FULLSCREEN | TILED | TOP_TILED | RIGHT_TILED | BOTTOM_TILED | LEFT_TILED
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: true
--- end processing ------------------------------------------------------------------------

First, thank you very much for helping me by replying!

But, looking at the first block of "--- new window state event received - start processing ---" and seeing "window_state_local_mut.is_fullscreen: false" and "window_state_local_mut.is_maximized: false" there, to me it seems that you closed all previously started instances.

It would be nice if you, or someone else willing to help track down this strange behavior, could do exactly what I described, that is, especially not closing/exiting/ending the first instance!

On my side, when I start the third instance of the already running program after I do the steps described above, the following output is given:

--- new window state event received - start processing ------------------------------------------
changed_window_state: WITHDRAWN | MAXIMIZED | FULLSCREEN | FOCUSED
new_window_state: MAXIMIZED | FULLSCREEN | FOCUSED
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: true
--- end processing ------------------------------------------------------------------------


--- new window state event received - start processing ------------------------------------------
changed_window_state: TOP_RESIZABLE | RIGHT_RESIZABLE | BOTTOM_RESIZABLE | LEFT_RESIZABLE
new_window_state: MAXIMIZED | FULLSCREEN | FOCUSED | TOP_RESIZABLE | RIGHT_RESIZABLE | BOTTOM_RESIZABLE | LEFT_RESIZABLE
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: true
--- end processing ------------------------------------------------------------------------


--- new window state event received - start processing ------------------------------------------
changed_window_state: MAXIMIZED | FOCUSED
new_window_state: FULLSCREEN | TOP_RESIZABLE | RIGHT_RESIZABLE | BOTTOM_RESIZABLE | LEFT_RESIZABLE
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: false
--- end processing ------------------------------------------------------------------------


--- new window state event received - start processing ------------------------------------------
changed_window_state: FOCUSED
new_window_state: FULLSCREEN | FOCUSED | TOP_RESIZABLE | RIGHT_RESIZABLE | BOTTOM_RESIZABLE | LEFT_RESIZABLE
window_state_local_mut.is_fullscreen: true
window_state_local_mut.is_maximized: false
--- end processing ------------------------------------------------------------------------

As you can see, in the second event received all is OK, but the third event is "removing" the MAXIMIZED state, and that is the strange behavior that does not happen on Ubuntu 14.04 Unity desktop.