/* gcc hello3.c -o hello3 $(pkg-config --cflags --libs gtk+-3.0) */

#include <gtk/gtk.h>

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
    GtkWidget *entry;
    GtkWidget *box;
    GtkTextBuffer *buffer;

    gtk_init (&argc, &argv);

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

    g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);

    gtk_container_set_border_width (GTK_CONTAINER (window), 10);

    char* text = "If you have multiple master devices with xinput2,\nand you right-click on this textview,\nyou have a one in two chance that the popup appears near the wrong device.";
    buffer = gtk_text_buffer_new(NULL);
    gtk_text_buffer_set_text (buffer, text, -1);
    entry = gtk_text_view_new_with_buffer(buffer);

    gtk_container_add (GTK_CONTAINER (window), entry);

    gtk_window_set_default_size(GTK_WINDOW(window), 600, 400);
    gtk_widget_show_all (window);
    gtk_window_resize(GTK_WINDOW(window), 600, 400);

    gtk_main ();

    return 0;
}
