Re: [wiki] [sites] [surf][patch][gtkblackbg] Add patch || Scarlett McAllister

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Sat, 30 Dec 2023 18:37:56 +0100

Hi Scarlett,

> +Add a black background to the GTK window and make this visible by hiding the background of the WebKit view. This effectively eliminates the momentary white screen that shows after launching `surf`.

I don't see a white screen on my distros when dark mode is enabled,
with hidebackground enabled (IIRC).
Could you describe the setup context for reproducing the issue?

> +diff --git a/surf.c b/surf.c
> +index f8c8dec..a6cb224 100644
> +--- a/surf.c
> ++++ b/surf.c
> +_AT_@ -1461,6 +1461,7 @@ createwindow(Client *c)
> + g_signal_connect(G_OBJECT(w), "window-state-event",
> + G_CALLBACK(winevent), c);
> +
> ++ gtk_widget_modify_bg(GTK_WINDOW(w), GTK_STATE_NORMAL, &(GdkColor){0});
> + return w;
> + }
> +
> +--

If this is really needed, then wouldn't it be better to place that
within the dark mode toggling within setparameter()?
Received on Sat Dec 30 2023 - 18:37:56 CET

This archive was generated by hypermail 2.3.0 : Sat Dec 30 2023 - 18:48:46 CET