Additional food for thought... What if you have no-init-layer defined and are not using the primary? Maybe there are three of them and the primary is not in use? Also what if each of them is configured using a different size that does not match the actual screen size (larger or smaller)?
Our custom systems driver supports all of these possibilities, with six possible display layers and one of them may not be the primary. When GetScreenSize is called it is configured to dynamically query the current display resolution and return it. I'm not sure if the screen should start mis-representing itself... You just have to love the window creation side effect of the super interface's CreateSurface function. :( Best Regards, Timothy -- Timothy Strelchun CE Software Engineering Digital Home Group Intel Corporation The views expressed above are my own and not those of Intel >-----Original Message----- >From: directfb-dev-boun...@directfb.org >[mailto:directfb-dev-boun...@directfb.org] On Behalf Of Niels Roest >Sent: Monday, August 31, 2009 11:23 AM >To: Anders Bakken >Cc: directfb-dev@directfb.org >Subject: Re: [directfb-dev] querying size of primary surface > >good point, >I think GetScreenSize in primary.c should have something like: > > if (dfb_config->mode.width) > width = dfb_config->mode.width; > else > width = shared->screen_size.w; > >at least, that would make more sense to me.. >If no objections otherwise I'll change that appropriately. > >So your GetScreenSize will return your config, as youo would expect. > >Greets >Niels > >Anders Bakken wrote: >> Is there a way to query the size of the primary surface? >> >> My problem is the following: >> >> I am running on X11 and have set the mode to this in .directfbrc: >> >> mode=1280x720 >> >> When using IDirectFBScreen::GetSize it returns the size of my entire >> Desktop. E.g. 1600x1200. >> >> I am running in Windowed mode so I don't actually create a primary >> surface myself. >> >> regards _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev