From ab1d18b562875be786cc3592aad5332a9a67fa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 9 Jan 2021 16:40:24 +0100 Subject: [PATCH] zero sized gtk window. --- internal/desktop/gtk.go | 3 ++- internal/desktop/gtk/gtk.c | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/desktop/gtk.go b/internal/desktop/gtk.go index 4d009b9e..451447cc 100644 --- a/internal/desktop/gtk.go +++ b/internal/desktop/gtk.go @@ -2,6 +2,7 @@ package desktop import ( "time" + "demodesk/neko/internal/desktop/gtk" ) @@ -17,7 +18,7 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) { // TODO: Find a bettter way. time.Sleep(DELAY) - manager.Move(10, 10) + manager.Move(0, 0) manager.ButtonDown(1) manager.Move(x, y) time.Sleep(DELAY) diff --git a/internal/desktop/gtk/gtk.c b/internal/desktop/gtk/gtk.c index f49772fa..4840d262 100644 --- a/internal/desktop/gtk/gtk.c +++ b/internal/desktop/gtk/gtk.c @@ -63,13 +63,7 @@ void drag_window(char **uris) { gtk_window_set_title(window, "neko-drop"); gtk_window_set_decorated(window, FALSE); gtk_window_set_keep_above(window, TRUE); - gtk_window_set_default_size(window, 100, 100); - - gtk_widget_set_app_paintable(widget, TRUE); - GdkScreen *screen = gtk_widget_get_screen(widget); - GdkVisual *visual = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(widget, visual); - gtk_widget_set_opacity(widget, 0); + gtk_window_set_default_size(window, 0, 0); GtkTargetList* target_list = gtk_target_list_new(NULL, 0); gtk_target_list_add_uri_targets(target_list, TARGET_TYPE_URI);