On Jul 12, 2013 4:56 AM, "Marshall Mason" <[email protected]> wrote:
>
> Hi,
> Newbie here. :) I've been having great fun hacking away with the Lua API,
and it's been, well, awesome.
>
> But I got stuck. I think this is more of a problem with Gvim than
Awesome, but it's happening in the context of the Lua API, and I doubt the
Vim guys know anything about that, so I'm hoping there's someone here who
knows Gvim's quirks enough to help.
>
> Code speaks louder than words, so here goes.
>
> function check_size()
>   local geometry = client.focus:geometry()
>   naughty.notify({
>     preset = naughty.config.presets.low,
>     title  = "Debug message",
>     height = 200,
>     width  = 400,
>     hover_timeout = 10,
>     text   = tostring(geometry.height)
>   })
> end
>
> function test_resize()
>   check_size()
>   local adjustment = 3
>   local geometry = client.focus:geometry()
>   geometry.height = geometry.height - adjustment
>   client.focus:geometry(geometry)
>   check_size()
> end
>
> When I run test_resize(), it displays the height and height minus 3 just
as it should. It does this for Gvim as well. But for Gvim only, when I
check it again with check_size() it gives a completely new number, usually
the original height minus 15 or 20. I'm guessing this has to do with Gvim's
love for measuring geometry by number of characters rather than pixels.
There must be some way to force Gvim to obey the window manager. Otherwise,
the window manager has no precision in its control over window sizes.
>
> I suspected size_hints_honor might have something to do with this, but
the problem exists no matter what size_hints_honor is set to. I'm running
Awesome 3.4.13-1 (Octopus) in Debian wheezy. Any ideas?
>
> Marshall

Hi Marshall,

It is not the first time this problem has been brought up here in this
mailing list, and sadly it remains unsolved.
We all believe it is a gvim bug, but I'm not sure anyone has ever gathered
enough info to actualy report it.

One workaround is to stop resizing gvim :)

Good luck!

Vitor
  • Gvim resizing Marshall Mason
    • Re: Gvim resizing Vitor Eiji Justus Sakaguti

Reply via email to