LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-22-2013, 06:07 PM   #1
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,630
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Get window size with tiling window manager in SDL


Hiya,

I have an SDL application, and it's important for it to know the dimensions of its draw area. I request a window of 600x600, but because I'm using a tiling window manager this is rarely if ever what I actually get. Once the window is resized by the window manager (i.e. changing its position, or setting it to floating) then the SDL_VIDEORESIZE event is triggered and everything works perfectly. However, I can't find any way of getting the actual window size before this occurs. I am using SDL 1.12.15.

Code:
w = SDL_GetVideoInfo()->current_w;
Code:
w = SDL_GetVideoSurface()->w
Code:
w = screen->w;
All of the above seem to provide the requested width, not the actual width.

Finally,

Code:
SDL_GetWindowSize(screen,w,h)
is only supported in SDL 2.0 so even if it does work, it isn't really an option here.

Any ideas?

Thanks,

Last edited by Snark1994; 01-22-2013 at 06:09 PM.
 
Old 02-24-2013, 08:46 PM   #2
jorants
LQ Newbie
 
Registered: Nov 2012
Posts: 6

Rep: Reputation: Disabled
This is kind of freaky, have the exact same thing, also using 600x600 as default.
Anyway, if i find the answer i will tell you ;-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Favourite tiling window manager sycamorex Linux - Desktop 13 12-18-2012 05:46 AM
Creating a Fixed Window Size in a Window Manager (Odd Question) Stupac Programming 3 06-30-2011 04:04 AM
I never thought I'd get used to a tiling window manager. treewojima Linux - General 3 06-02-2011 04:44 PM
LXer: XMonad: a tiling window manager LXer Syndicated Linux News 0 05-28-2011 11:03 PM
LXer: Third version of new tiling window manager i3 released LXer Syndicated Linux News 0 08-19-2009 01:40 PM


All times are GMT -5. The time now is 07:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration