xapp-display: Don't use deprecated gtk_widget_modify_bg
This was deprecated with the invention of gtk3.0. Instead switch to the modern
method of using css style providers and classes. This quiets some build warnings
we get.
JosephMcc
7 years ago
68 | 68 | { |
69 | 69 | GdkRectangle fullscreen; |
70 | 70 | GtkWidget *window; |
71 | GdkColor color; | |
71 | GtkStyleContext *context; | |
72 | GtkCssProvider *provider; | |
72 | 73 | |
73 | 74 | gdk_screen_get_monitor_geometry(screen, monitor, &fullscreen); |
74 | 75 | |
79 | 80 | gtk_window_move (GTK_WINDOW (window), fullscreen.x, fullscreen.y); |
80 | 81 | gtk_widget_set_visible (window, TRUE); |
81 | 82 | |
82 | color.red = 0x00C0; | |
83 | color.green = 0x00DE; | |
84 | color.blue = 0x00ED; | |
85 | gtk_widget_modify_bg(window, GTK_STATE_NORMAL, &color); | |
83 | context = gtk_widget_get_style_context (GTK_WIDGET (window)); | |
84 | gtk_style_context_add_class (context, "xapp-blanking-window"); | |
85 | provider = gtk_css_provider_new (); | |
86 | gtk_css_provider_load_from_data (provider, | |
87 | ".xapp-blanking-window { background-color: rgb(0, 0, 0); }", | |
88 | -1, NULL); | |
89 | gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | |
86 | 90 | |
87 | 91 | return window; |
88 | 92 | } |