Previous image display in Xserver while launching the application
I have made one application using Xlib and loading a jpeg stream video in the x_window.
The application is working fine but I am seeing one issue that whenever i restart the application, it firstly shows the old image where I have stopped the application and then only it moves and start the main application.
I am not seeing anywhere how it is storing that image. Ever Xsetroot is not helping.
The other strange thing is that even after reboot the same thing is there so it means either Xserver is saving that info somewhere or something else is happening.
If i start the application manually like
startx ./myapp the old image comes for a sec and then the normal app starts working
if i launch it automatically by putting it in rc.local,
the old image continues to display at 6-7 secs and then the normal app starts.
Also, it is happneing when i normally starts the startx without my app then also whateve the last image was, it vl display firstly and then only the KDE desktop will come.
Anyone has seen this issue before?
BTW i am using Slackware 12.0 and the Xserver bundled within this distro.
I can't say I've ever noticed this happen, but I suppose it's feasible that either the Xserver or the graphics card could allocate exactly the same blocks of uninitialised memory each time and that is how the prior image is persisting. The XServer in Slackware 12.0 is pretty old now, many bugs have passed under the bridge since then.
Perhaps you could add a XClearWindow() call before you map the window just to be sure it's nice and empty when it is first presented? Might be an idea to also clear it just before program exit too for user privacy reasons.
I'm not really an expert with this stuff though, these are just some thoughts that occurred to me.
Oh, and if you're actually drawing to the root window (probably not the best idea), then make sure your xserver isn't using the "-background none" option (Assuming that option existed for the Xserver in 12.0)
|All times are GMT -5. The time now is 07:13 PM.|