public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Christoph Heiss <c.heiss@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH installer] ui: gtk3: set up proper RGBA visual for main window
Date: Fri, 19 Jun 2026 09:20:30 +0200	[thread overview]
Message-ID: <s8oik7f0zep.fsf@toolbox> (raw)
In-Reply-To: <20260618105423.664293-1-c.heiss@proxmox.com> (Christoph Heiss's message of "Thu, 18 Jun 2026 12:54:20 +0200")


Christoph Heiss <c.heiss@proxmox.com> writes:

> This properly fixes all instances of broken damage-tracking with dialogs
> and other overlaying widgets on top of the WebKit2 view.
>
> By using RGBA instead of a the default RGB visual, the GTK <-> X server
> interaction for compositing widgets on top of each other seem to work
> correctly.
>
> This was previously worked around in one instance and thus also
> effectively reverts commit
>
>   55c764163 ("gui: redraw window after closing disk setup dialog")
>
> .. as it is now no longer needed.
>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
>  proxinstall | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/proxinstall b/proxinstall
> index 49b1612..51ead26 100755
> --- a/proxinstall
> +++ b/proxinstall
> @@ -236,6 +236,13 @@ sub create_main_window {
>  
>      Proxmox::UI::init_gtk($gtk_state, $iso_env);
>  
> +    # make it play nice without a compositor, i.e. this enables proper damage
> +    # tracking in GTK in combination with WebKit2
> +    my $visual = $window->get_screen()->get_rgba_visual();
> +    if ($visual) {
> +        $window->set_visual($visual);
> +    }

Very interesting find!

I booted a new VM using the latest iso where this issue was reproducible
and I can confirm that the patch works as expected. The patch fixes a
couple of edge cases (even on disk setup dialog) that were not fixed by
55c764163.

As a side note, while reviewing gtk source code, it seems that GtkWindow
will use RGBA visuals only if gtk_window_supports_client_shadow (which
on x11 boils down to whether the compositor supports the
_GTK_FRAME_EXTENTS hint) returns true.

Looks good to me.

Reviewed-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>

-- 
Maximiliano




      reply	other threads:[~2026-06-19  7:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 10:54 [PATCH installer] ui: gtk3: set up proper RGBA visual for main window Christoph Heiss
2026-06-19  7:20 ` Maximiliano Sandoval [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s8oik7f0zep.fsf@toolbox \
    --to=m.sandoval@proxmox.com \
    --cc=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal