zero sized gtk window.

This commit is contained in:
Miroslav Šedivý 2021-01-09 16:40:24 +01:00
parent 44c8f8f62e
commit ab1d18b562
2 changed files with 3 additions and 8 deletions

View File

@ -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)

View File

@ -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);