aboutsummarylogtreecommitdiffstats
path: root/csd__headerbar-title.patch
blob: daa2767d8b3116c9547311dc6e22c0117e30ad05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -U 5 -r -Z -B ./org/gtk/gtkheaderbar.c ./mod/gtk/gtkheaderbar.c
--- ./org/gtk/gtkheaderbar.c	2017-07-19 04:55:39.000000000 +0200
+++ ./mod/gtk/gtkheaderbar.c	2017-07-30 02:19:16.171623995 +0200
@@ -565,10 +565,11 @@
 }
 
 static void
 construct_label_box (GtkHeaderBar *bar)
 {
+  if (g_getenv("GTK_CSD") == FALSE) return;
   GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (bar);
 
   g_assert (priv->label_box == NULL);
 
   priv->label_box = create_title_box (priv->title,
@@ -1348,10 +1349,11 @@
     }
 
   gtk_widget_set_visible (priv->subtitle_sizing_label, priv->has_subtitle || (priv->subtitle && priv->subtitle[0]));
 
   g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_SUBTITLE]);
+  g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_TITLE]);
 }
 
 /**
  * gtk_header_bar_get_subtitle:
  * @bar: a #GtkHeaderBar
diff -U 5 -r -Z -B ./org/gtk/gtkwindow.c ./mod/gtk/gtkwindow.c
--- ./org/gtk/gtkwindow.c	2017-07-19 04:55:39.000000000 +0200
+++ ./mod/gtk/gtkwindow.c	2017-07-30 02:19:59.491626142 +0200
@@ -4147,10 +4147,12 @@
                           GtkWindow    *self)
 {
   const gchar *title;
 
   title = gtk_header_bar_get_title (titlebar);
+  if (gtk_header_bar_get_subtitle(titlebar))
+    title = g_strconcat(title, " — ", gtk_header_bar_get_subtitle(titlebar), NULL);
   gtk_window_set_title_internal (self, title, FALSE);
 }
 
 /**
  * gtk_window_set_titlebar: