From 62f0965951901623da63e96f8a9b5ba61965d56e Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 7 Jan 2022 10:11:25 +0800 Subject: [PATCH] Set window type hint to notification Contributed-by: Markus Demleitner --- NEWS | 3 +++ src/floating_shape.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index c4bd963..a2f6a62 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ Changes in 1.6 - The -t option now allows fractional time values (e.g. -t 0.5 to display for half a second). +- Set window type hint to notification to avoid shadows and other + decorations (thanks to Markus Demleitner). + Changes in 1.5.1 ===================== diff --git a/src/floating_shape.c b/src/floating_shape.c index dfbd1c5..6545ae9 100644 --- a/src/floating_shape.c +++ b/src/floating_shape.c @@ -104,6 +104,10 @@ float_shape_t *make_shape_from_pixbuf(GdkPixbuf *pixbuf) gtk_window_set_default_size(GTK_WINDOW(s->window), s->width, s->height); gtk_widget_set_size_request(GTK_WIDGET(s->window), s->width, s->height); + gtk_window_set_type_hint( + GTK_WINDOW (s->window), + GDK_WINDOW_TYPE_HINT_NOTIFICATION); + gtk_widget_set_app_paintable(GTK_WIDGET(s->window), TRUE); screen = gtk_widget_get_screen(s->window); -- 2.39.2