Re: Maximize/Restore window on OS X (aka Zoom)

From: vais <vsalik....at.gmail.com>
Date: Mon, 16 Feb 2009 11:02:58 -0800 (PST)

Nope. Just tried that, no such luck. I think it has to do with the way
the GTK top level menu works under OSX - not quite like native apps.
This is why I figured rolling my own version of this functionality is
more likely to succeed. Here is what I ended up doing - hard-code my
screens dimensions and be done with it :)

Here is the final result that works for my MacBook Pro (I stuck it
directly into my key_commands file):

keys['sam'] = { function()
  if textadept.original_size then
    textadept.size = textadept.original_size
    textadept.original_size = nil
  else
    textadept.original_size = textadept.size
    textadept.size = {1436, 856}
  end
end }

Only to realize, of course, that this only works when the window is
positioned with the top left corner in the top left corner of the
screen :) In other words, this does not work.

In order to make this work there has to be a way of getting
Textadept's window's position on screen as well as the dimensions of
the screen.

I must give up on this for now.

Thanks,

Vais

On Feb 16, 1:43 pm, mitchell <mforal.n....at.gmail.com> wrote:
> Vais,
>
> > It is the "screen.width, screen.height" part that I am not sure how to
> > get at. Is this information available? Perhaps there is something like
> > this available in GTK that can be exposed to scripting?
>
> Oh sorry, I read your question too fast. I don't know if GTK has
> access to the screen.
>
> I'm not sure how OSX handles key commands, but since keys.am is
> assigned to multiple line editing, maybe re-assigning it will let OSX
> handle apple+m?
>
Received on Mon 16 Feb 2009 - 14:02:58 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:26 EST