awesome/objects
Emmanuel Lepage Vallee 9991f9ccc8 geometry: Use the relevant rounding functions instead of integers
In the case where one want to put the cursor at the middle of the
workarea, it is logic to do:

   x=screen.workarea.x+screen.workasrea.width/2

However, this can cause floating points. This commit move the
burden back to the C-API so the Lua placement code doesn't have
to add a large number of rounding methods. Given 1 type of rounding
cover a vast majority of use cases for each types of coordinates,
the C-API can take care of it in peace. For the other corner cases,
it is still possible for the Lua code to do the rounding there, but
no longer necessary. The convenstions are:

 'x' and 'y': use round (move to the closest point)

 'width' and 'height': use ceil (to avoid involontary truncating)
2016-04-18 04:20:22 -04:00
..
button.c Merge branch 'lua-index-handlers' of https://github.com/psychon/awesome 2016-03-06 14:19:00 +01:00
button.h Clean up header includes 2014-03-30 20:07:48 +02:00
client.c geometry: Use the relevant rounding functions instead of integers 2016-04-18 04:20:22 -04:00
client.h Merge pull request #713 from psychon/no_focus_window 2016-02-28 22:16:22 +01:00
drawable.c Merge branch 'lua-index-handlers' of https://github.com/psychon/awesome 2016-03-06 14:19:00 +01:00
drawable.h drawable/drawin: Pass both lua_State and stack index around 2014-12-06 10:46:45 +01:00
drawin.c geometry: Use the relevant rounding functions instead of integers 2016-04-18 04:20:22 -04:00
drawin.h drawin: lazily configure drawin windows 2015-08-23 15:25:23 +02:00
key.c Merge branch 'lua-index-handlers' of https://github.com/psychon/awesome 2016-03-06 14:19:00 +01:00
key.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
screen.c Fix build warning 2016-04-15 19:38:09 +02:00
screen.h Remove luaA_pushscreen 2016-03-26 18:13:55 +01:00
tag.c luaobject: Make the miss_handlers documentation private 2016-04-11 23:54:28 -04:00
tag.h tag_client: Add explicit lua_State argument 2014-12-06 11:14:59 +01:00
window.c geometry: Use the relevant rounding functions instead of integers 2016-04-18 04:20:22 -04:00
window.h geometry: Use the relevant rounding functions instead of integers 2016-04-18 04:20:22 -04:00