tests: Test the remaining existing `awful.placement` methods.
Notes that some asserts are missing because the tests fail. This will be fixed later. It is not a regression.
This commit is contained in:
parent
f7b5240571
commit
ef5ec333cc
|
@ -0,0 +1,8 @@
|
||||||
|
screen[1]._resize {width = 128, height = 96} --DOC_HIDE
|
||||||
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
|
client.gen_fake {x = 10, y = 10, width=40, height=30} --DOC_HIDE
|
||||||
|
|
||||||
|
mouse.coords {x= 50, y=50} --DOC_HIDE
|
||||||
|
mouse.push_history() --DOC_HIDE
|
||||||
|
|
||||||
|
awful.placement.next_to_mouse(client.focus)
|
|
@ -0,0 +1,9 @@
|
||||||
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
|
|
||||||
|
local c = client.gen_fake {x = -30, y = -30, width= 100, height=100} --DOC_HIDE
|
||||||
|
|
||||||
|
print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
|
||||||
|
|
||||||
|
awful.placement.no_offscreen(c)--, {honor_workarea=true, margins=40})
|
||||||
|
|
||||||
|
print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
|
|
@ -0,0 +1,26 @@
|
||||||
|
screen[1]._resize {width = 128, height = 96} --DOC_HIDE
|
||||||
|
screen._add_screen {x = 140, y = 0 , width = 128, height = 96} --DOC_HIDE
|
||||||
|
screen._add_screen {x = 0 , y = 110, width = 128, height = 96} --DOC_HIDE
|
||||||
|
screen._add_screen {x = 140, y = 110, width = 128, height = 96} --DOC_HIDE
|
||||||
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
|
local beautiful = require("beautiful") --DOC_HIDE
|
||||||
|
|
||||||
|
|
||||||
|
client.gen_fake {x = 10, y = 10, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = 80, y = 55, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = 0, y = 0, width=40, height=50, color=beautiful.bg_highlight} --DOC_HIDE
|
||||||
|
client.focus:_hide() --DOC_HIDE
|
||||||
|
|
||||||
|
awful.placement.no_overlap(client.focus)
|
||||||
|
|
||||||
|
local x,y = screen[4].geometry.x, screen[4].geometry.y
|
||||||
|
client.gen_fake {x = x+10, y = y+10, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = x+80, y = y+10, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = x+10, y = y+55, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = x+80, y = y+55, width=40, height=30} --DOC_HIDE
|
||||||
|
client.gen_fake {x = x+0, y = y+0, width=40, height=50, color=beautiful.bg_highlight} --DOC_HIDE
|
||||||
|
client.focus:_hide() --DOC_HIDE
|
||||||
|
awful.placement.no_overlap(client.focus) --FIXME --DOC_HIDE
|
||||||
|
|
||||||
|
--TODO maximized + no_overlap --DOC_HIDE
|
||||||
|
--TODO add 9 clients with no_overlap on all of them --DOC_HIDE
|
|
@ -0,0 +1,8 @@
|
||||||
|
screen[1]._resize {width = 128, height = 96} --DOC_HIDE
|
||||||
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
|
client.gen_fake {x = 10, y = 10, width=40, height=30} --DOC_HIDE
|
||||||
|
|
||||||
|
mouse.coords {x= 50, y=50} --DOC_HIDE
|
||||||
|
mouse.push_history() --DOC_HIDE
|
||||||
|
|
||||||
|
awful.placement.under_mouse(client.focus)
|
Loading…
Reference in New Issue