--- /root/.pekwm/mouse	2011-10-31 17:50:30.201455364 +0100
+++ mouse	2011-10-31 18:49:31.417458073 +0100
@@ -1,10 +1,12 @@
 FrameTitle {
-	ButtonRelease = "1" { Actions = "Raise; Focus; ActivateClient" }
+	#ButtonRelease = "1" { Actions = "HideAllMenus; Raise; Focus; ActivateClient" }
+	ButtonRelease = "1" { Actions = "HideAllMenus; Raise; Focus" }
 	ButtonRelease = "Mod1 1" { Actions = "Focus; Raise" }
 	ButtonRelease = "Mod4 1" { Actions = "Focus; Raise" }
 	ButtonRelease = "2" { Actions = "ActivateClient" }
 	ButtonRelease = "Mod4 3" { Actions = "Close" }
-	ButtonRelease = "3" { Actions = "ShowMenu Window" }
+	#ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Window" }
+	ButtonPress = "3" { Actions = "HideAllMenus; ShowMenu Window" }
 	ButtonRelease = "4" { Actions = "ActivateClientRel 1" }
 	ButtonRelease = "5" { Actions = "ActivateClientRel -1" }
 	ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
@@ -16,7 +18,8 @@
 	ButtonRelease = "Ctrl Mod1 1" { Actions = "Focus; Raise True" }
 	DoubleClick = "2" { Actions = "Toggle Shaded" }
 	DoubleClick = "Mod1 2" { Actions = "Toggle Shaded" }
-	DoubleClick = "1" { Actions = "MaxFill True True" }
+	#DoubleClick = "1" { Actions = "MaxFill True True" }
+	DoubleClick = "1" { Actions = "Toggle Shaded" }
 	DoubleClick = "Mod1 1" { Actions = "Toggle Maximized True True" }
 	Motion = "1" { Threshold = "4"; Actions = "Raise; Move" }
 	Motion = "Mod1 1" { Threshold = "4"; Actions = "Raise; Move" }
@@ -31,7 +34,7 @@
 	ButtonRelease = "1" { Actions = "Raise; Focus" }
 	ButtonRelease = "2" { Actions = "Focus" }
 	ButtonRelease = "3" { Actions = "Close" }
-	ButtonRelease = "Mod4 3" { Actions = "ShowMenu Window" }
+	ButtonRelease = "Mod4 3" { Actions = "HideAllMenus; ShowMenu Window" }
 	ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
 	ButtonRelease = "Mod1 5" { Actions = "SendToWorkspace Prev; GotoWorkspace Prev" }
 	ButtonRelease = "Mod1 Shift 4" { Actions = "SendToWorkspace PrevV; GotoWorkspace PrevV" }
@@ -47,44 +50,44 @@
 	TopLeft {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize TopLeft" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize TopLeft" } }
 	Top {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize Top" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize Top" } }
 	TopRight {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize TopRight" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize TopRight" } }
 	Left {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize Left" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize Left" } }
 	Right {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize Right" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize Right" } }
 	BottomLeft {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize BottomLeft" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize BottomLeft" } }
 	Bottom {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize Bottom" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize Bottom" } }
 	BottomRight {
 		# Remove the following line if you want to use click to focus.
 		Enter = "Any Any" { Actions = "Focus" }
-		ButtonPress = "1" { Actions = "Focus; Resize BottomRight" } }
+		ButtonPress = "1" { Actions = "Raise ; Focus; Resize BottomRight" } }
 }
 
 ScreenEdge {
 	Down {
 		Enter = "Mod1 Any" { Actions = "GoToWorkspace Down" }
-		ButtonRelease = "3" { Actions = "ShowMenu Root" }
-		ButtonRelease = "2" { Actions = "ShowMenu Goto" }
+		ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Root" }
+		ButtonRelease = "2" { Actions = "HideAllMenus; ShowMenu Goto" }
 		ButtonRelease = "1" { Actions = "GoToWorkspace Down" }
-		ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
+		ButtonRelease = "Mod4 2" { Actions = "HideAllMenus; ShowMenu GotoClient" }
 		ButtonRelease = "4" { Actions = "GoToWorkspace Up" }
 		ButtonRelease = "5" { Actions = "GoToWorkspace Down" }
 		ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace PrevV" }
@@ -93,10 +96,10 @@
 	}
 	Up {
 		Enter = "Mod1 Any" { Actions = "GoToWorkspace Up" }
-		ButtonRelease = "3" { Actions = "ShowMenu Root" }
-		ButtonRelease = "2" { Actions = "ShowMenu Goto" }
+		ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Root" }
+		ButtonRelease = "2" { Actions = "HideAllMenus; ShowMenu Goto" }
 		ButtonRelease = "1" { Actions = "GoToWorkspace Up" }
-		ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
+		ButtonRelease = "Mod4 2" { Actions = "HideAllMenus; ShowMenu GotoClient" }
 		ButtonRelease = "4" { Actions = "GoToWorkspace Up" }
 		ButtonRelease = "5" { Actions = "GoToWorkspace Down" }
 		ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace PrevV" }
@@ -105,11 +108,11 @@
 	}
 	Left {
 		Enter = "Mod1 Any" { Actions = "GoToWorkspace Left" }
-		ButtonRelease = "3" { Actions = "ShowMenu Root" }
+		ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Root" }
 		ButtonRelease = "1" { Actions = "GoToWorkspace Left" }
 		DoubleClick = "1" { Actions = "GoToWorkspace Left" }
-		ButtonRelease = "2" { Actions = "ShowMenu Goto" }
-		ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
+		ButtonRelease = "2" { Actions = "HideAllMenus; ShowMenu Goto" }
+		ButtonRelease = "Mod4 2" { Actions = "HideAllMenus; ShowMenu GotoClient" }
 		ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
 		ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
 		ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace Next" }
@@ -118,11 +121,11 @@
 	}
 	Right {
 		Enter = "Mod1 Any" { Actions = "GoToWorkspace Right" }
-		ButtonRelease = "3" { Actions = "ShowMenu Root" }
+		ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Root" }
 		ButtonRelease = "1" { Actions = "GoToWorkspace Right" }
 		DoubleClick = "1" { Actions = "GoToWorkspace Right" }
-		ButtonRelease = "2" { Actions = "ShowMenu Goto" }
-		ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
+		ButtonRelease = "2" { Actions = "HideAllMenus; ShowMenu Goto" }
+		ButtonRelease = "Mod4 2" { Actions = "HideAllMenus; ShowMenu GotoClient" }
 		ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
 		ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
 		ButtonRelease = "Mod1 4" { Actions = "GoToWorkspace Next" }
@@ -133,9 +136,9 @@
 
 Client {
 	# Remove the following line and uncomment the alternative if windows should raise when clicked.
-	ButtonPress = "1" { Actions = "Focus" }
+	ButtonPress = "1" { Actions = "HideAllMenus; Focus" }
 	# Uncomment the following line if windows should raise when clicked.
-	# ButtonPress = "1" { Actions = "Focus; Raise" }
+	# ButtonPress = "1" { Actions = "HideAllMenus; Focus; Raise" }
 
 	ButtonRelease = "Mod1 1" { Actions = "Focus; Raise" }
 	ButtonRelease = "Mod4 1" { Actions = "Lower" }
@@ -153,9 +156,9 @@
 }
 
 Root {
-	ButtonRelease = "3" { Actions = "ShowMenu Root" }
-	ButtonRelease = "2" { Actions = "ShowMenu Goto" }
-	ButtonRelease = "Mod4 2" { Actions = "ShowMenu GotoClient" }
+	ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Root" }
+	ButtonRelease = "2" { Actions = "HideAllMenus; ShowMenu Goto" }
+	ButtonRelease = "Mod4 2" { Actions = "HideAllMenus; ShowMenu GotoClient" }
 	# Horizontal movement
 	ButtonRelease = "4" { Actions = "GoToWorkspace Right" }
 	ButtonRelease = "5" { Actions = "GoToWorkspace Left" }
@@ -171,6 +174,7 @@
 
 Menu {
 	Enter = "Any Any" { Actions = "Focus" }
+	ButtonRelease = "Any Any" { Actions = "Select" }
 	Motion = "Mod1 1" { Threshold = "4"; Actions = "Focus; Raise; Move" }
 }
 
