unmanage logic updated
This commit is contained in:
		
							
								
								
									
										17
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								init.lua
									
									
									
									
									
								
							| @@ -18,7 +18,7 @@ local function set_contains(set, key) | |||||||
|     return set[key] ~= nil |     return set[key] ~= nil | ||||||
| end | end | ||||||
|  |  | ||||||
| local micky = function () | local micky = function() | ||||||
|     gears.timer.weak_start_new(0.05, function() |     gears.timer.weak_start_new(0.05, function() | ||||||
|         local c = client.focus |         local c = client.focus | ||||||
|         local cgeometry = c:geometry() |         local cgeometry = c:geometry() | ||||||
| @@ -46,9 +46,6 @@ client.connect_signal("focus", function(c) | |||||||
|         if should_stay then return false end |         if should_stay then return false end | ||||||
|         --+ exclusions |         --+ exclusions | ||||||
|  |  | ||||||
|         -- if compare_coords(focused_client) then return false end |  | ||||||
|         --+ avoid tabs |  | ||||||
|  |  | ||||||
|         if not client_under_mouse then |         if not client_under_mouse then | ||||||
|             micky() |             micky() | ||||||
|             return false |             return false | ||||||
| @@ -56,10 +53,10 @@ client.connect_signal("focus", function(c) | |||||||
|         --+ nothing under the mouse, move directly |         --+ nothing under the mouse, move directly | ||||||
|  |  | ||||||
|         if focused_client:geometry().x ~= client_under_mouse:geometry().x |         if focused_client:geometry().x ~= client_under_mouse:geometry().x | ||||||
|            or focused_client:geometry().y ~= client_under_mouse:geometry().y |             or focused_client:geometry().y ~= client_under_mouse:geometry().y | ||||||
|            then |         then | ||||||
|            micky() |             micky() | ||||||
|            return false |             return false | ||||||
|         end |         end | ||||||
|         --+ no need to relocate the mouse if already over |         --+ no need to relocate the mouse if already over | ||||||
|         --> the client. |         --> the client. | ||||||
| @@ -68,10 +65,12 @@ client.connect_signal("focus", function(c) | |||||||
|     --> client without the callback. |     --> client without the callback. | ||||||
| end) | end) | ||||||
|  |  | ||||||
|  |  | ||||||
| client.connect_signal("unmanage", function(c) | client.connect_signal("unmanage", function(c) | ||||||
|     local client_under_mouse = mouse.current_client |     local client_under_mouse = mouse.current_client | ||||||
|  |  | ||||||
|  |     local killed_client = c | ||||||
|  |     --+ client the focus is going towards | ||||||
|  |  | ||||||
|     if not client_under_mouse then |     if not client_under_mouse then | ||||||
|         return false |         return false | ||||||
|     end |     end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user