1
Graphics / Re: Window transparency problem - SFML 2
« on: September 20, 2012, 03:10:46 am »
Does sfml expose any of the os specific windows functions, like the x window lib?
** Update
Ive been looking through the sfml source while reading about the X window library, what I found is this:
It seems that for what I want to do, I would have to modify my windows background pixmap and either set it to the parent (unmodifiable image of my desktop) or copy from parent (would allow me to do image filtering etc.).
In the sfml source (src/SFML/Window/Linux/WindowImplX11.cpp) I found this:
If I modified it so that I add...
(I would have to ensure that my window has the same depth as the parent too...)
I intend to test this myself when I have more time (since Ill probably be recompiling sfml a lot to test it Ill probably save it for the weekend )
In the mean time; do you believe this is the solution im looking for?
Would I even have to recompile sfml, could I just modify the X windows attributes from the window handle provided by sfml?
** Update
Ive been looking through the sfml source while reading about the X window library, what I found is this:
It seems that for what I want to do, I would have to modify my windows background pixmap and either set it to the parent (unmodifiable image of my desktop) or copy from parent (would allow me to do image filtering etc.).
In the sfml source (src/SFML/Window/Linux/WindowImplX11.cpp) I found this:
// Define the window attributes
XSetWindowAttributes attributes;
attributes.event_mask = eventMask;
attributes.override_redirect = fullscreen;
XSetWindowAttributes attributes;
attributes.event_mask = eventMask;
attributes.override_redirect = fullscreen;
If I modified it so that I add...
(I would have to ensure that my window has the same depth as the parent too...)
// Define the window attributes
XSetWindowAttributes attributes;
attributes.event_mask = eventMask;
attributes.override_redirect = fullscreen;
// My code
attributes.background_pixmap = ParentRelative // I believe ParentRelative is the x11 const / enum?
XSetWindowAttributes attributes;
attributes.event_mask = eventMask;
attributes.override_redirect = fullscreen;
// My code
attributes.background_pixmap = ParentRelative // I believe ParentRelative is the x11 const / enum?
I intend to test this myself when I have more time (since Ill probably be recompiling sfml a lot to test it Ill probably save it for the weekend )
In the mean time; do you believe this is the solution im looking for?
Would I even have to recompile sfml, could I just modify the X windows attributes from the window handle provided by sfml?