Adw Dialog not making my app "dim" while showing

Hi folks,

I’m developing a Python app using Adw/Gtk4 on Manjaro Linux.

I recently noticed that when my app pops up a dialog that it doesn’t go “dim” while the dialog is showing.

I have another test app where this works. This app shows a header bar, button and a gridview of icons. When the button pops up a dialog, the app window correctly dims behind it.

My real app goes insensitive (none of the widgets react to clicks) but does not go dim. I’ve confirmed that the widget I use as the parent in the dialog present() is an instance of Adw ApplicationWindow and is in fact my main window.

I’m not expecting any debugging done for me, but has anyone any idea what would inhibit Gtk4/Adw from dimming the main window when I show the dialog? Then I can look to see if I’m doing that anywhere in my code.

In the meantime I’ve already started on the process of commenting out parts of my GUI set up to see if I can find offending widgets or options.


Screenshot? I suspect you’re using a custom theme or something like that.

Thanks for the prompt response.

I don’t think I’m running a custom. I grepped through and removed anywhere I applied any CSS classes. I’m running on xfce, but that doesn’t seem to affect the correct behavior in my test app or any Gnome apps.

I hope the screenshot isn’t too big - it’s my first time posting here.

Here’s a screenshot of the “test” running in the identical environment and showing the correct behavior.

Wait, that dialog is also off-centered and has a strange shadow. Are you sure it’s displayed within the window and not as a separate window? The 2 screenshots seem to be showing different dialogs AND different versions of the app, so you might want to check if it’s just running something different.

The possible reasons can be:

  • The parent is not an AdwWindow or AdwApplicationWindow
  • The parent window is non-resizable

That’s it.

The parent window is non-resizable in the failing app. I’ll fix that, so please ignore this topic for now.

Thanks for your help.

Fair enough.

The non-resizable requirement exists because of apps like Emblem that are non-resizable and also small. Non-resizable means they don’t work on mobile anyway, and too small means the dialog won’t fit.

We could add a size check too, instead of just resizability - that should make it work for your case - because yeah, it’s silly if it still does a separate window when the parent is this large.

Thanks for the offer but I’ll leave that completely up to you. I wouldn’t want to make work for you for an edge case.


Just confirmed - not being resizable was the problem. Thank you again for your prompt help.

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