Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread hessiess
Its because SDL is resolution dependent(non resizeable). I wrote the
Quad-Ren graphics engine, a resolution independent graphics engine to
solve this problem. It was designed specifically to work with tiling WM's.




Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread Szabolcs Nagy
On 5/14/10, hessi...@hessiess.com hessi...@hessiess.com wrote:
 Its because SDL is resolution dependent(non resizeable).

what do you mean by non resizeable?



Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread Mate Nagy
On Fri, May 14, 2010 at 04:40:59PM -, hessi...@hessiess.com wrote:
 Literally non resizeable, the window cannot be resized.
 hm, I can open SDL windows that are resizable easily enough,
 with... SDL_RESIZABLE

Mate



Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread hessiess
 On Fri, May 14, 2010 at 04:40:59PM -, hessi...@hessiess.com wrote:
 Literally non resizeable, the window cannot be resized.
  hm, I can open SDL windows that are resizable easily enough,
  with... SDL_RESIZABLE

 Mate


Sure, but *NO ONE* uses that flag. Go download almost any game made with
SDL, its not resizeable.




Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread Anders Andersson
 Literally non resizeable, the window cannot be resized.
  hm, I can open SDL windows that are resizable easily enough,
  with... SDL_RESIZABLE

 Sure, but *NO ONE* uses that flag. Go download almost any game made with
 SDL, its not resizeable.


Doesn't that mean that the games are very badly designed? Or do all
those games have specially tailored graphics for each single physical
display size?



Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread pancake
On Fri, 14 May 2010 16:50:53 -
hessi...@hessiess.com wrote:

  On Fri, May 14, 2010 at 04:40:59PM -, hessi...@hessiess.com wrote:
  Literally non resizeable, the window cannot be resized.
   hm, I can open SDL windows that are resizable easily enough,
   with... SDL_RESIZABLE
 
  Mate
 
 
 Sure, but *NO ONE* uses that flag. Go download almost any game made with
 SDL, its not resizeable.
 
 

[panc...@dazo tmp]$ cat sdldwm.c
/*
 * Copyright (C) 2010
 * pancake youterm.com
 * 
 * $ gcc sdldwm.c -shared -ldl -fPIC -o sdldwm.so
 * $ LD_PRELOAD=./sdldwm.so programname
 */
#define _GNU_SOURCE
#include dlfcn.h

static void *(*svm)(int w, int h, int b, unsigned int f);
static void __() __attribute__ ((constructor));
static void __() {   svm = dlsym(RTLD_NEXT, SDL_SetVideoMode); }

void *SDL_SetVideoMode(int w, int h, int b, unsigned int f) {
return svm(w,h,b,f|0x10);
}

what about this hack?



Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread pancake
Many of them are using fixed resolution pixmaps, not vectors, so, to  
avoid scaling or incorrect display they prefer to drop this  
possibility (ugly btw)


On May 14, 2010, at 6:25 PM, Anders Andersson pipat...@gmail.com  
wrote:



Literally non resizeable, the window cannot be resized.

 hm, I can open SDL windows that are resizable easily enough,
 with... SDL_RESIZABLE


Sure, but *NO ONE* uses that flag. Go download almost any game made  
with

SDL, its not resizeable.



Doesn't that mean that the games are very badly designed? Or do all
those games have specially tailored graphics for each single physical
display size?





Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread Anders Andersson
On Fri, May 14, 2010 at 7:15 PM, pancake panc...@youterm.com wrote:
 Many of them are using fixed resolution pixmaps, not vectors, so, to avoid
 scaling or incorrect display they prefer to drop this possibility (ugly btw)

Yeah, but they could still implement a scrolling view or similar.
Making a game for a fixed resolution was ok on the Amiga, possibly as
far as VGA. Off-topic anyway.



Re: [dev] SDL fullscreen problems in dwm

2010-05-14 Thread Thomas Spurden
On 14/05/10 18:02, pancake wrote:
 
 [panc...@dazo tmp]$ cat sdldwm.c
 /*
  * Copyright (C) 2010
  * pancake youterm.com
  * 
  * $ gcc sdldwm.c -shared -ldl -fPIC -o sdldwm.so
  * $ LD_PRELOAD=./sdldwm.so programname
  */
 #define _GNU_SOURCE
 #include dlfcn.h
 
 static void *(*svm)(int w, int h, int b, unsigned int f);
 static void __() __attribute__ ((constructor));
 static void __() {   svm = dlsym(RTLD_NEXT, SDL_SetVideoMode); }
 
 void *SDL_SetVideoMode(int w, int h, int b, unsigned int f) {
 return svm(w,h,b,f|0x10);
 }
 
 what about this hack?
 

I think you will find that this would just stop the app working; when
the SDL_RESIZABLE flag is set the app has to react to SDL_VIDEORESIZE
events from SDL by re-calling SDL_SetVideoMode with the size in the
SDL_VIDEORESIZE event.  If the app isn't set up to do this then things
will go wrong...

-- 
Thomas Spurden



[dev] SDL fullscreen problems in dwm

2010-05-07 Thread Thomas Spurden
I have recently being playing a few games that use SDL to get a
full-screen window.  This causes some problems with dwm.  These have
been discussed before on the list, but have always assumed is was simply
a problem with SDL assuming a reparenting WM.  I came across a post on
the awesome mailing list which pointed me to a bug[1] in their issue
tracker; basically at least part of the problem is the fact that awesome
restarts when the screen resolution is changed.  This seems to be the
behavior I am seeing in dwm.

I had some success running World of Goo (which sets the resolution to
800x600 by default) in monocle mode, however any other stacking mode
required a switch to a VT and killing the game (black window covering
most of the screen, mouse  keyboard input grabbed).  If I set the game
resolution to my current resolution (1920x1200) the game starts and
plays fine in any stacking mode.

As I see it the problem is this: dwm receives a ConfigureNotify on the
root window with a new size (new screen resolution), this then calls
updategeom, which causes some problem with the game.  I'm not familiar
enough with X11 programming to tell exactly what the problem is, but it
seems that this is the root of it to me.

Does this seem a reasonable explanation?  If so is there anything that
can be changed in dwm to support full-screen SDL applications at
non-current resolutions?

[1] http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=717

-- 
Thomas Spurden



Re: [dev] SDL fullscreen problems in dwm

2010-05-07 Thread Jacob Todd
This is a known problem, see the BUGS file.


pgp83Jjv9UzjJ.pgp
Description: PGP signature