mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
zero sized gtk window.
This commit is contained in:
parent
44c8f8f62e
commit
ab1d18b562
@ -2,6 +2,7 @@ package desktop
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"demodesk/neko/internal/desktop/gtk"
|
"demodesk/neko/internal/desktop/gtk"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) {
|
|||||||
|
|
||||||
// TODO: Find a bettter way.
|
// TODO: Find a bettter way.
|
||||||
time.Sleep(DELAY)
|
time.Sleep(DELAY)
|
||||||
manager.Move(10, 10)
|
manager.Move(0, 0)
|
||||||
manager.ButtonDown(1)
|
manager.ButtonDown(1)
|
||||||
manager.Move(x, y)
|
manager.Move(x, y)
|
||||||
time.Sleep(DELAY)
|
time.Sleep(DELAY)
|
||||||
|
@ -63,13 +63,7 @@ void drag_window(char **uris) {
|
|||||||
gtk_window_set_title(window, "neko-drop");
|
gtk_window_set_title(window, "neko-drop");
|
||||||
gtk_window_set_decorated(window, FALSE);
|
gtk_window_set_decorated(window, FALSE);
|
||||||
gtk_window_set_keep_above(window, TRUE);
|
gtk_window_set_keep_above(window, TRUE);
|
||||||
gtk_window_set_default_size(window, 100, 100);
|
gtk_window_set_default_size(window, 0, 0);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
GtkTargetList* target_list = gtk_target_list_new(NULL, 0);
|
GtkTargetList* target_list = gtk_target_list_new(NULL, 0);
|
||||||
gtk_target_list_add_uri_targets(target_list, TARGET_TYPE_URI);
|
gtk_target_list_add_uri_targets(target_list, TARGET_TYPE_URI);
|
||||||
|
Loading…
Reference in New Issue
Block a user