On 26.03.2012 17:20, Corey Thompson wrote: > On Mon, Mar 26, 2012 at 04:21:08PM +0200, Uli Schlachter wrote: >> Here you will always have a table with x, y, width and height as the >> argument to >> this signal, however... >> >> [...] >> >> ...here you check if the argument is nil, which will never be the case. > > client_resize() always pushes a table as an argument to its > property::geometry signal. client_manage() also emits a > property::geometry signal, but with no argument. > > The check for nil here is so that clients' stored floating geometries > are initialized on the first signal from client_resize(), not from > client_manage(). This is because the client's geometry at the time of > that first signal from client_manage() doesn't include the border and > titlebar.
I can't see anything in client_manage() which would mean that it doesn't include the border width. I think what happens is that the border width from the config is only set later on, when the client goes through the "manage" signal. This would also explain that property::border_width to me. And for the titlebar: What if I dynamically add/remove a titlebar depending on random stuff (e.g. a key combo that presses the titlebar)? In that case, this issue isn't solved. >> Since this code only cares about c:geometry(), why doesn't it use >> property::geometry instead of property::border_width? Shouldn't that solve >> the >> problem, too? > > I agree. That's why I got rid of the property::border_width stuff and > replaced it with property::geometry. ;) Ah. Reading diffs is hard. Sorry, entirely my fault. I don't know much about 3.4's titlebar code and I'm no longer sure what exactly the issue is that we are trying to solve, but shouldn't the floating_geometry (which only seems to be used by awful.client.floating.set(c, true) which is basically "never") be the "raw" geometry of the client then, without borders and titlebars? In that case, this code will continue working, even if someone changes the border_size and the titlebar's size later on. Uli -- 'dubito ergo sum' -- Elke's whiteboard -- To unsubscribe, send mail to [email protected].
