mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
drag_window add logging.
This commit is contained in:
parent
98bf62ef5e
commit
0f27b81f76
@ -54,13 +54,16 @@ static void drag_end(
|
||||
}
|
||||
|
||||
void drag_window(char **uris) {
|
||||
gtk_init(NULL, NULL);
|
||||
if (gtk_init_check(NULL, NULL) == FALSE) {
|
||||
fprintf(stderr, "Unable to initialize GTK for drag and drop widget!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
GtkWidget *widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
GtkWindow *window = GTK_WINDOW(widget);
|
||||
|
||||
gtk_window_move(window, 0, 0);
|
||||
gtk_window_set_title(window, "neko-drop");
|
||||
gtk_window_set_title(window, "Neko Drag & Drop Window");
|
||||
gtk_window_set_decorated(window, FALSE);
|
||||
gtk_window_set_keep_above(window, TRUE);
|
||||
gtk_window_set_default_size(window, 0, 0);
|
||||
@ -76,6 +79,7 @@ void drag_window(char **uris) {
|
||||
g_signal_connect(widget, "drag-end", G_CALLBACK(drag_end), NULL);
|
||||
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
|
||||
|
||||
fprintf(stderr, "Preparing to show drag and drop widget.\n");
|
||||
gtk_widget_show_all(widget);
|
||||
gtk_main();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user