summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2011-10-19 14:26:29 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2011-10-19 14:26:29 +0100
commit508dee31f3412d8708b7b47c1677b4294c865edb (patch)
tree44970ff9003fae219c26f0bc25c6e5ad02533faf
parent80e66678092700354f8cfc334eab62861d509201 (diff)
downloadgit-508dee31f3412d8708b7b47c1677b4294c865edb.tar.gz
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>
-rw-r--r--lib/blame.tcl1
-rw-r--r--lib/choose_rev.tcl1
-rw-r--r--lib/class.tcl1
-rw-r--r--lib/themed.tcl1
-rw-r--r--lib/transport.tcl1
5 files changed, 5 insertions, 0 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 691941e959..49eae1912a 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -1201,6 +1201,7 @@ method _open_tooltip {cur_w} {
_hide_tooltip $this
set tooltip_wm [toplevel $cur_w.tooltip -borderwidth 1]
+ catch {wm attributes $tooltip_wm -type tooltip}
wm overrideredirect $tooltip_wm 1
wm transient $tooltip_wm [winfo toplevel $cur_w]
set tooltip_t $tooltip_wm.label
diff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl
index 54c7957a66..6dae7937d5 100644
--- a/lib/choose_rev.tcl
+++ b/lib/choose_rev.tcl
@@ -497,6 +497,7 @@ method _open_tooltip {} {
if {$tooltip_wm eq {}} {
set tooltip_wm [toplevel $w_list.tooltip -borderwidth 1]
+ catch {wm attributes $tooltip_wm -type tooltip}
wm overrideredirect $tooltip_wm 1
wm transient $tooltip_wm [winfo toplevel $w_list]
set tooltip_t $tooltip_wm.label
diff --git a/lib/class.tcl b/lib/class.tcl
index c27b71476a..f08506f383 100644
--- a/lib/class.tcl
+++ b/lib/class.tcl
@@ -138,6 +138,7 @@ proc make_dialog {t w args} {
upvar $t top $w pfx this this
global use_ttk
uplevel [linsert $args 0 make_toplevel $t $w]
+ catch {wm attributes $top -type dialog}
pave_toplevel $pfx
}
diff --git a/lib/themed.tcl b/lib/themed.tcl
index 29a1696d97..8b88d3678b 100644
--- a/lib/themed.tcl
+++ b/lib/themed.tcl
@@ -123,6 +123,7 @@ proc paddedlabel {w args} {
# place a themed frame over the surface.
proc Dialog {w args} {
eval [linsert $args 0 toplevel $w -class Dialog]
+ catch {wm attributes $w -type dialog}
pave_toplevel $w
return $w
}
diff --git a/lib/transport.tcl b/lib/transport.tcl
index 7fad9b7d91..e5d211edea 100644
--- a/lib/transport.tcl
+++ b/lib/transport.tcl
@@ -124,6 +124,7 @@ proc do_push_anywhere {} {
set w .push_setup
toplevel $w
+ catch {wm attributes $w -type dialog}
wm withdraw $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
pave_toplevel $w