From: Hal Fulton Date: 2013-07-10T23:27:46+09:00 Subject: RMagick's #display (focus issues) - off-topic? --bcaec501613bbea85004e12914bc Content-Type: text/plain; charset=ISO-8859-1 I was playing with a little software idea last night and ran into difficulty. Actually, I could start an email with that sentence almost every day. ;) I wanted a little image-processing tool and felt that Photoshop was massive overkill (also, I don't have it anymore, and it's expensive). So I thought: It might be fun to write a little semi-interactive program with an old-fashioned interface. This is Mac OS X, fwiw. The basic logic flow was: Read an image file Loop: Read a command via gets Parse and execute the command Display the resulting image Which works "mostly ok" -- but when I do img.display and it opens a new window... the new window (naturally?) has the focus -- I would say "steals" the focus from iTerm. Thinking about this, I suppose it relates more to the window manager (and maybe ImageMagick and the OS) than to Ruby... Having said that, I wonder if there is a solution to this, other than constantly re-clicking in my original terminal window? Thanks, Hal --bcaec501613bbea85004e12914bc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I was playing with a little software idea last night and r= an into difficulty.

Actually, I could start an email wit= h that sentence almost every day. =A0;)

I wa= nted a little image-processing tool and felt that Photoshop was
massive overkill (also, I don't have it anymore, and it'= s expensive).

So I thought: It might b= e fun to write a little semi-interactive program
with an ol= d-fashioned interface.

This is Mac OS X, fwiw.
The basic logic flow was:

=A0 =A0Read an image file
=A0 =A0Loop:
=A0 =A0 =A0 Read a command via gets
=A0 =A0 =A0 Parse and execute the command
=A0 = =A0 =A0 Display the resulting image

Wh= ich works "mostly ok" -- but when I do img.display and it
opens a new window... the new window (naturally?) has the
focus -- I would say "steals" the focus from iTerm.

Thinking about this, I suppose it relate= s more to the window
manager (and maybe ImageMagick and the= OS) than to Ruby...

Having said that, I wonder if there is a so= lution to this, other than
constantly re-clicking in my ori= ginal terminal window?

Thanks,
Hal

--bcaec501613bbea85004e12914bc--