Unintended behaviour: SDL_CreateWindow

Here is my test case:


Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using 1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using 1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).

I think this would have more to do with i3 than SDL. I’m using xmonad and
when ever SDL creates a window it runs at the resolution stated, and
centered.On Fri, Nov 8, 2013 at 2:35 PM, Laftur Jeremy <laftur.jeremy at gmail.com>wrote:

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.

On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <laftur.jeremy at gmail.com> wrote:

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using
1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).


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

Alberto, that’s not the intended behaviour, is it? Isn’t that WM
supposed to tile windows?On Fri, Nov 8, 2013 at 3:57 PM, Alberto Corona wrote:

I think this would have more to do with i3 than SDL. I’m using xmonad and
when ever SDL creates a window it runs at the resolution stated, and
centered.

On Fri, Nov 8, 2013 at 2:35 PM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.

On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using
1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).


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

Alberto, that’s not the intended behaviour, is it? Isn’t that WM
supposed to tile windows?

I think this would have more to do with i3 than SDL. I’m using xmonad and
when ever SDL creates a window it runs at the resolution stated, and
centered.

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using
1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).


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

Well in my case it would be, since I don’t have the position defined for
the SDL window, and I also don’t have it to resizeable. In your case it
would be different depending on whether you do have it resizeable, and
if you have the X Y positions defined. Basically, as far as I know, SDL
has no say in the behavior of how it’s managed using a WM, unless it’s
written as so. Since I don’t have the position defined, and don’t have
the resizeable flag, then I don’t think the xmonad would be able to do
either of those things.On Sat, Nov 09, 2013 at 12:03:36AM -0500, Laftur Jeremy wrote:

On Fri, Nov 8, 2013 at 3:57 PM, Alberto Corona wrote:

On Fri, Nov 8, 2013 at 2:35 PM, Laftur Jeremy <laftur.jeremy at gmail.com> wrote:

On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <laftur.jeremy at gmail.com> wrote:

I’m not really sure what you’re saying. The resizeable flag and the
position of the window don’t have any effect on the issue.

However, I will ask the i3 community about this.On Sat, Nov 9, 2013 at 2:45 AM, Alberto Corona wrote:

On Sat, Nov 09, 2013 at 12:03:36AM -0500, Laftur Jeremy wrote:

Alberto, that’s not the intended behaviour, is it? Isn’t that WM
supposed to tile windows?

On Fri, Nov 8, 2013 at 3:57 PM, Alberto Corona wrote:

I think this would have more to do with i3 than SDL. I’m using xmonad and
when ever SDL creates a window it runs at the resolution stated, and
centered.

On Fri, Nov 8, 2013 at 2:35 PM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.

On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using
1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).


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

Well in my case it would be, since I don’t have the position defined for
the SDL window, and I also don’t have it to resizeable. In your case it
would be different depending on whether you do have it resizeable, and
if you have the X Y positions defined. Basically, as far as I know, SDL
has no say in the behavior of how it’s managed using a WM, unless it’s
written as so. Since I don’t have the position defined, and don’t have
the resizeable flag, then I don’t think the xmonad would be able to do
either of those things.


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

Also, I don’t get this behaviour with SDL 1.2. I think that’s worth noting.On Sat, Nov 9, 2013 at 7:57 AM, Laftur Jeremy <@Laftur_Jeremy> wrote:

I’m not really sure what you’re saying. The resizeable flag and the
position of the window don’t have any effect on the issue.

However, I will ask the i3 community about this.

On Sat, Nov 9, 2013 at 2:45 AM, Alberto Corona wrote:

On Sat, Nov 09, 2013 at 12:03:36AM -0500, Laftur Jeremy wrote:

Alberto, that’s not the intended behaviour, is it? Isn’t that WM
supposed to tile windows?

On Fri, Nov 8, 2013 at 3:57 PM, Alberto Corona wrote:

I think this would have more to do with i3 than SDL. I’m using xmonad and
when ever SDL creates a window it runs at the resolution stated, and
centered.

On Fri, Nov 8, 2013 at 2:35 PM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Just to clarify, the problem is that the window is sometimes created
as floating, when my WM is set to prefer tiled. I have no idea what
is telling it to float.

On Fri, Nov 8, 2013 at 10:29 AM, Laftur Jeremy <@Laftur_Jeremy> wrote:

Here is my test case:
http://ideone.com/O3gezg
Compiled with gcc 4.8.2.
Compiled (and linked) with options: -g -Wall -std=c++11 -lSDL2

I’m running ArchLinux x86_64 using:

i3_wm 4.6-1 (a composite window manager capable of both floating and
tiling, among other modes)

SDL 2.0.1-2

Xorg server 1.12.4-2 (My using AMD catalyst prevents me from using
1.14.4)

Here’s the problem:

I have my WM set to prefer tiling windows. This means that most
everything is opened in tiled mode. Some windows (like small dialogs)
I assume can specify that they would like to be floating, and my WM
complies, floating them on top of the layer of tiled windows.

When I execute the test program given above, its preference as a tiled
or floated window seems to be undefined. I have no way of knowing
whether it will come up tiled or floated upon execution (though it
does seem to prefer one over a large number of executions, before
switching to the other window mode without any code modification).
I can execute it, see that it comes up as a tiled window repeatedly,
reboot and/or come back later, execute the same program and it might
come up as a floating window for a while.

I looked and I couldn’t find any SDL2 documentation on how to specify
tiled/floating when creating a new window. I’m not sure if this is a
bug in SDL, i3_wm, xorg-server, or if I’m just missing something. I
would appreciate any help or at least reproduction of the issue (It
may take several executions, spanned across some time period).


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

Well in my case it would be, since I don’t have the position defined for
the SDL window, and I also don’t have it to resizeable. In your case it
would be different depending on whether you do have it resizeable, and
if you have the X Y positions defined. Basically, as far as I know, SDL
has no say in the behavior of how it’s managed using a WM, unless it’s
written as so. Since I don’t have the position defined, and don’t have
the resizeable flag, then I don’t think the xmonad would be able to do
either of those things.


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