[Xfce4-commits] [xfce/xfce4-settings] 09/27: Create a popup window instead of a dock
noreply at xfce.org
noreply at xfce.org
Sun Feb 25 23:56:18 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 2
in repository xfce/xfce4-settings.
commit fa5e67c03f8c36e152b21139f3cb7958d7a39017
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Feb 21 21:21:00 2018 +0100
Create a popup window instead of a dock
The dock hint and the popup window both have the effect of
the wm ignoring the (partly) offscreen position of the
window. The dock hint is not only wrong, it also means the
wm may draw a shadow underneath (xfwm4 has an option for
shadows under docks).
---
dialogs/accessibility-settings/find-cursor.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dialogs/accessibility-settings/find-cursor.c b/dialogs/accessibility-settings/find-cursor.c
index 77a2545..bbb3c3e 100644
--- a/dialogs/accessibility-settings/find-cursor.c
+++ b/dialogs/accessibility-settings/find-cursor.c
@@ -164,7 +164,8 @@ main (gint argc, gchar **argv)
root_window = gdk_get_default_root_window ();
gdk_window_get_pointer (root_window, &x, &y, NULL);
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ /* popup tells the wm to ignore if parts of the window are offscreen */
+ window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
gtk_window_set_default_size (GTK_WINDOW (window), 500, 500);
@@ -172,12 +173,10 @@ main (gint argc, gchar **argv)
gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
gtk_widget_set_app_paintable (window, TRUE);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), FALSE);
- /* tell the wm to ignore if parts of the window are offscreen */
- gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DOCK);
+
/* center the window around the mouse cursor */
gtk_window_move (GTK_WINDOW (window), x - 250, y - 250);
-
/* make the circles follow the mouse cursor */
gtk_widget_set_events (window, GDK_POINTER_MOTION_MASK);
g_signal_connect (G_OBJECT (window), "motion-notify-event",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list