Something about SDL in Linux that bothers me

When I run an SDL program from the terminal and the program closes the
Terminal looses focus. Can anybody tell me why it does this, is there
anyone out there who does’nt have this happen to them in linux? It’s
not really a bug, but it does bother me.

You asked why, so here you go:
Obviously, whenever a new window pops up, that window gets focus.
If your window manager is set to “click to focus”, the only way to get the
focus back is to “click” in the previous window.

Similarly, if you used mouse focus, you would just have to make sure your
mouse is over the correct window when SDL exits. If it already happens to
be over the correct terminal, it gets the focus again.

This is all normal focus behavior… unless I’ve misunderstood your
problem.–
Brian

On Fri, 17 Dec 1999, Phoenix Kokido wrote:

When I run an SDL program from the terminal and the program closes the
Terminal looses focus. Can anybody tell me why it does this, is there
anyone out there who does’nt have this happen to them in linux? It’s
not really a bug, but it does bother me.

That would’nt explain why KDE apps, GTK apps, X-windows programs, all
return focus to the terminal when the app exits, the only other app
that I’ve seen (I have’nt seen every app) that does’nt return focus to
the terminal is wine, which kinda runs windows SDL apps (anyone else
tried this besides me).

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

hayward at slothmud.org wrote:> You asked why, so here you go:

Obviously, whenever a new window pops up, that window gets focus.
If your window manager is set to “click to focus”, the only way to get the
focus back is to “click” in the previous window.

Similarly, if you used mouse focus, you would just have to make sure your
mouse is over the correct window when SDL exits. If it already happens to
be over the correct terminal, it gets the focus again.

This is all normal focus behavior… unless I’ve misunderstood your
problem.

Brian

On Fri, 17 Dec 1999, Phoenix Kokido wrote:

When I run an SDL program from the terminal and the program closes the
Terminal looses focus. Can anybody tell me why it does this, is there
anyone out there who does’nt have this happen to them in linux? It’s
not really a bug, but it does bother me.

hayward at slothmud.org wrote:

You asked why, so here you go:
Obviously, whenever a new window pops up, that window gets focus.
If your window manager is set to “click to focus”, the only way to get the
focus back is to “click” in the previous window.

Similarly, if you used mouse focus, you would just have to make sure your
mouse is over the correct window when SDL exits. If it already happens to
be over the correct terminal, it gets the focus again.

This is all normal focus behavior… unless I’ve misunderstood your
problem.

If you’re using KDE, and you’re using focus-follows-mouse, you won’t get
the focus back even if the mouse is in the terminal window when you
quit. This is a bug in the KDE window manager.

MJP

[Charset iso-8859-1 unsupported, filtering to ASCII…]

When I run an SDL program from the terminal and the program closes the
Terminal looses focus. Can anybody tell me why it does this, is there
anyone out there who does’nt have this happen to them in linux? It’s
not really a bug, but it does bother me.

I’ve noticed something similar. I think however, it’s more like this:

  • Click terminal
  • Launch program
  • Program window appears
  • Do stuff in the program
  • Quit the program
  • Program window disappears
  • Click emacs
  • Start typing
  • It all goes to the terminal
  • Delete, click emacs again and try again

It could just be Enlightenment being buggy. (WOw, what a concept! :slight_smile: )

-bill!