git-gui: set suitable extended window manager hints.
This patch uses recent Tk attributes support to specify the intended use of new toplevels by setting the correct EWMH hint. This helps modern window managers to apply sensible decoration for the tooltip and dialogs. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Pat Thoyts committed
Oct 19, 2011 at 14:26 UTC
508dee31f3412d8708b7b47c1677b4294c865edb
5 files changed
+5
lib/blame.tcl
+1
@@ -1201,6 +1201,7 @@ method _open_tooltip {cur_w} {
1201
_hide_tooltip $this
1202
1203
set tooltip_wm [toplevel $cur_w.tooltip -borderwidth 1]
1204
+ catch {wm attributes $tooltip_wm -type tooltip}
1205
wm overrideredirect $tooltip_wm 1
1206
wm transient $tooltip_wm [winfo toplevel $cur_w]
1207
set tooltip_t $tooltip_wm.label
lib/choose_rev.tcl
+1
@@ -497,6 +497,7 @@ method _open_tooltip {} {
497
498
if {$tooltip_wm eq {}} {
499
set tooltip_wm [toplevel $w_list.tooltip -borderwidth 1]
500
+ catch {wm attributes $tooltip_wm -type tooltip}
501
wm overrideredirect $tooltip_wm 1
502
wm transient $tooltip_wm [winfo toplevel $w_list]
503
set tooltip_t $tooltip_wm.label
lib/class.tcl
+1
@@ -138,6 +138,7 @@ proc make_dialog {t w args} {
138
upvar $t top $w pfx this this
139
global use_ttk
140
uplevel [linsert $args 0 make_toplevel $t $w]
141
+ catch {wm attributes $top -type dialog}
142
pave_toplevel $pfx
143
}
144
lib/themed.tcl
+1
@@ -123,6 +123,7 @@ proc paddedlabel {w args} {
123
# place a themed frame over the surface.
124
proc Dialog {w args} {
125
eval [linsert $args 0 toplevel $w -class Dialog]
126
+ catch {wm attributes $w -type dialog}
127
pave_toplevel $w
128
return $w
129
}
lib/transport.tcl
+1
@@ -124,6 +124,7 @@ proc do_push_anywhere {} {
124
125
set w .push_setup
126
toplevel $w
127
+ catch {wm attributes $w -type dialog}
128
wm withdraw $w
129
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
130
pave_toplevel $w