Sdl 2.0.1 rc1

2013/10/23, Gabriele Greco <gabriele.greco at darts.it>:

So it seems that the best way to “stream” a texture is to update a static
texture after all :slight_smile:

I wonder if this is the case for other kind of textures too? Since I’m
also hitting the same case (use a single texture that gets updated
once per frame).

Den 22. okt. 2013 23:10, skrev Jonas Kulla:

The only problem I see now is that SDL2 has already been released with this
function and changing the behavior now would probably catch a few people
unprepared. Maybe introduce a second function? I don’t know. I think you
should ask Ryan for the specifics as he’s the one that implemented the
function in the first place and also has over a decade experience in
shipping
closed source titles on Linux.

Update: I filed a bug on the bugzilla, and Ryan fixed it =)

Compatibility isn’t a problem because SDL_GetPrefPath is new in 2.0.1,
which hasn’t been released yet.

-g

Do you have more information on the issue that was fixed with this changeset?

I’m not sure how to reproduce it (it’s probably not helping that I use
Windows with the classic design). Did it occur with Windows 7 or 8 and
DWM active? Trying to find out more about it for this issue.

https://bugzilla.libsdl.org/show_bug.cgi?id=2172

I also noticed that SDL_RaiseWindow doesn’t work very reliably so I’m
going to have a look at that too.

I’m not sure if this is related to the issue Gabriele is seeing, but on an
app using GLES2 on x11 that I have, updating to SDL-2.0.1 causes the
context creation to fail. stracing, I noticed that it tries to dlopen()
libGL.so instead of libGLESv2.so, which is what it used to do.

2013/10/24 Norfanin > Do you have more information on the issue that was fixed with this

changeset?

http://hg.libsdl.org/SDL/rev/357bccc72a1c

I’m not sure how to reproduce it (it’s probably not helping that I use
Windows with the classic design). Did it occur with Windows 7 or 8 and
DWM active? Trying to find out more about it for this issue.

https://bugzilla.libsdl.org/show_bug.cgi?id=2172

I also noticed that SDL_RaiseWindow doesn’t work very reliably so I’m
going to have a look at that too.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

This was an issue with a fullscreen application that I was working on:

  1. I alt-tabbed away from the original fullscreen application
  2. I clicked a button on another application that sent a message to the
    original one requesting that it regain focus.

This was on Windows 7 with DWM active.On Thu, Oct 24, 2013 at 7:03 AM, Norfanin wrote:

Do you have more information on the issue that was fixed with this
changeset?

http://hg.libsdl.org/SDL/rev/357bccc72a1c

I’m not sure how to reproduce it (it’s probably not helping that I use
Windows with the classic design). Did it occur with Windows 7 or 8 and
DWM active? Trying to find out more about it for this issue.

https://bugzilla.libsdl.org/show_bug.cgi?id=2172

I also noticed that SDL_RaiseWindow doesn’t work very reliably so I’m
going to have a look at that too.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sam Lantinga wrote:

This was an issue with a fullscreen application that I was working on:

  1. I alt-tabbed away from the original fullscreen application
  2. I clicked a button on another application that sent a message to the
    original one requesting that it regain focus.

This was on Windows 7 with DWM active.

I see. SDL minimizes the fullscreen window when it lost focus (by
default) and moving the focus back with SDL_RaiseWindow doesn’t
restore it. OS X and Linux seem to have the same behaviour.

Hm. This doesn’t really fit what you describe in the commit message
though. In case that’s what you mean, shouldn’t your application check
if it is minimized and restore itself before the raise?

I don’t think this is SDL_RaiseWindow’s job and should be handled
higher up if this behaviour is really desired. I tried poking the code
that handles the WM_ACTIVATE message, but didn’t get anywhere.

Good point. I’ll take a look at that, thanks!On Wed, Nov 6, 2013 at 9:46 AM, Norfanin wrote:

Sam Lantinga wrote:

This was an issue with a fullscreen application that I was working on:

  1. I alt-tabbed away from the original fullscreen application
  2. I clicked a button on another application that sent a message to the
    original one requesting that it regain focus.

This was on Windows 7 with DWM active.

I see. SDL minimizes the fullscreen window when it lost focus (by
default) and moving the focus back with SDL_RaiseWindow doesn’t
restore it. OS X and Linux seem to have the same behaviour.

Hm. This doesn’t really fit what you describe in the commit message
though. In case that’s what you mean, shouldn’t your application check
if it is minimized and restore itself before the raise?

I don’t think this is SDL_RaiseWindow’s job and should be handled
higher up if this behaviour is really desired. I tried poking the code
that handles the WM_ACTIVATE message, but didn’t get anywhere.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

This was an issue with a fullscreen application that I was working on:

  1. I alt-tabbed away from the original fullscreen application
  2. I clicked a button on another application that sent a message to the
    original one requesting that it regain focus.

This was on Windows 7 with DWM active.

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the behaviour
of ALT-TAB is correct:

window fullscreen (SDL_WINDOW_FULLSCREEN_DESKTOP)

alt-tab -> minimize
click on the minimized icon -> fullscreen window
alt-tab -> minimize
alt-tab till the app is again the frontmost -> fullscreen window

PS: it works the same way also on Linux Mint 14 with cinnamon–
Bye,
Gabry

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the
behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as
it minimizes to the dock when the volume control notification thing pops
up over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to
work, and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.

Why minimise on focus lost? Should the window manager not be handling thatOn Nov 7, 2013 11:44 AM, “Ryan C. Gordon” wrote:

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the

behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as it
minimizes to the dock when the volume control notification thing pops up
over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to work,
and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Because they often don’t. On Windows, for example, if you lose focus, you
just get a fullscreen windiow in the background.

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?On Thu, Nov 7, 2013 at 10:48 AM, Andre D wrote:

Why minimise on focus lost? Should the window manager not be handling that
On Nov 7, 2013 11:44 AM, “Ryan C. Gordon” wrote:

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the

behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as it
minimizes to the dock when the volume control notification thing pops up
over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to work,
and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.On Thu, Nov 7, 2013 at 2:10 PM, Sam Lantinga wrote:

Because they often don’t. On Windows, for example, if you lose focus, you
just get a fullscreen windiow in the background.

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?

On Thu, Nov 7, 2013 at 10:48 AM, Andre D <@Andre_D> wrote:

Why minimise on focus lost? Should the window manager not be handling that

On Nov 7, 2013 11:44 AM, “Ryan C. Gordon” wrote:

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the
behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as it
minimizes to the dock when the volume control notification thing pops up
over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to work,
and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Er, different monitor.On Thu, Nov 7, 2013 at 2:12 PM, Andre D <@Andre_D> wrote:

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.

On Thu, Nov 7, 2013 at 2:10 PM, Sam Lantinga wrote:

Because they often don’t. On Windows, for example, if you lose focus, you
just get a fullscreen windiow in the background.

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?

On Thu, Nov 7, 2013 at 10:48 AM, Andre D <@Andre_D> wrote:

Why minimise on focus lost? Should the window manager not be handling that

On Nov 7, 2013 11:44 AM, “Ryan C. Gordon” wrote:

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the
behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as it
minimizes to the dock when the volume control notification thing pops up
over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to work,
and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2013/11/7, Sam Lantinga :

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?

Given X11 doesn’t understand any concept of fullscreen at all, I don’t
think there’s even anything that could be called right behavior :stuck_out_tongue:

2013/11/7, Andre D :

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.

Maybe SDL could be programmed to minimize only on single monitor
systems? (where you definitely want this behavior)

I recall some code doing that, SDL may do that already, someone should check.On Thu, Nov 7, 2013 at 2:18 PM, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

2013/11/7, Sam Lantinga :

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?

Given X11 doesn’t understand any concept of fullscreen at all, I don’t
think there’s even anything that could be called right behavior :stuck_out_tongue:

2013/11/7, Andre D <@Andre_D>:

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.

Maybe SDL could be programmed to minimize only on single monitor
systems? (where you definitely want this behavior)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Can we even tell what the right behavior is under X11?

Uh, that’s the other problem. :slight_smile:

–ryan.

Andre D wrote:> On Thu, Nov 7, 2013 at 2:12 PM, Andre D wrote:

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.

Er, different monitor.

I’m told that other applications on OS X also don’t minimize this way.

Luckily, SDL 2 provides an override for this when setting the
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS environment variable to 0. That
doesn’t help the users that don’t know about environment variables,
but I think it’s a very good way to approach this without getting
intrusive.

My 2c on the OS X side of things:

I completely disable SDL?s minimize-on-focus-loss in OS X because the rest of the operating system doesn?t work like that: fullscreen windows either stay in the background when focus is lost or have their own unique Space (OS 10.7+), although windows can still be minimized manually. All OS X programs also have the capability to hide themselves completely (which is different from minimizing an individual window), via the menubar or a hotkey.

When a window in a program is minimized, it creates a new icon for the window in the dock separate from the actual program - it?s very very rare for an OS X program to minimize one of its windows without the user explicitly pressing a button to do so.

Expos? and Spaces also take away some of the usefulness of minimizing individual windows, since they provide (imo) better functionality for some of the cases where one might?ve wanted a window to be minimized.On Nov 7, 2013, at 3:12 PM, Andre D wrote:

I have a huge problem with games which do this on multiple monitor
platforms, I don’t expect the game to go minimal when I select
something in a different window for an example.

On Thu, Nov 7, 2013 at 2:10 PM, Sam Lantinga wrote:

Because they often don’t. On Windows, for example, if you lose focus, you
just get a fullscreen windiow in the background.

Maybe this logic needs to not be generic for all platforms, but have each
platform know when it should minimize or not? Can we even tell what the
right behavior is under X11?

On Thu, Nov 7, 2013 at 10:48 AM, Andre D wrote:

Why minimise on focus lost? Should the window manager not be handling that

On Nov 7, 2013 11:44 AM, “Ryan C. Gordon” wrote:

Just to add that on Linux (ubuntu 12.04 with “classic gnome”) the
behaviour of ALT-TAB is correct:

It’s worth noting, too, that on Ubuntu 12.04 with Unity, hitting the
volume key on your keyboard will make your fullscreen window vanish (as it
minimizes to the dock when the volume control notification thing pops up
over the window).

It’s really harsh. I’m thinking this is not the best way for X11 to work,
and it’s the minimize-on-focus-lost behavior that causes it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2013/11/7, Norfanin :

Luckily, SDL 2 provides an override for this when setting the
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS environment variable to 0. That
doesn’t help the users that don’t know about environment variables,
but I think it’s a very good way to approach this without getting
intrusive.

Don’t forget programs can override the hints. You could easily do that
to by-pass the environment variables.

2013/11/7 Sik the hedgehog <sik.the.hedgehog at gmail.com>

2013/11/7, Norfanin :

Luckily, SDL 2 provides an override for this when setting the
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS environment variable to 0. That
doesn’t help the users that don’t know about environment variables,
but I think it’s a very good way to approach this without getting
intrusive.

Don’t forget programs can override the hints. You could easily do that
to by-pass the environment variables.

Yeah. I unconditionally do the

 SDL_SetHint("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0");

in my engine at startup. Any other behavior (under X11) makes absolutely
no sense to me.