I'm finishing up my software for releasing but run into a big issue. If
I use window mode instead of full-screen mode the user should be able to
close the window using the X button. I can prevent this from happening
using this code:
Atom delAtom = XInternAtom( display, "WM_DELETE_WINDOW", False );
Hello Roland,
While defining delAtom and calling XSetWMProtocls, you specifiy
"display", and in your loop, you specify "pDisplay" ; is it the same
display ?
Le 19/01/2020 à 13:33, Roland Plüss a écrit :
I'm finishing up my software for releasing but run into a big issue. If
I use window mode
Hi Lucien,
Depends what you call the same display. The window is created in the
render thread while event looping is done in the main thread. In both
places XOpenDisplay(getenv("DISPLAY")) is called. Is this not the same
display? If not how can I "attach" them together? It's a requirement
that the
Le 19/01/2020 à 15:17, Roland Plüss a écrit :
Hi Lucien,
Depends what you call the same display. The window is created in the
render thread while event looping is done in the main thread. In both
places XOpenDisplay(getenv("DISPLAY")) is called. Is this not the same
display?
It is the s
Is X not "not thread safe"? I can't just pass a display struct around
can't I? That said if I create a window on the render thread display and
use WM_DELETE_WINDOW on the main thread display then I should get the
notification?
What I don't get is why I do get notifications like gain/loose focus of
I tried now setting the atom with the main thread display (same display
as will be calling XNextEvent) but I still do not get ClientMessage. Do
I need to use the thread having created the window for this to work? Can
I use an event loop in the render thread too?
On 1/19/20 3:53 PM, Lucien Gentis
On Sun, 19 Jan 2020 15:17:17 +0100 Roland Plüss said:
> Hi Lucien,
>
> Depends what you call the same display. The window is created in the
> render thread while event looping is done in the main thread. In both
> places XOpenDisplay(getenv("DISPLAY")) is called. Is this not the same
> display?
In many cases I can do it purely on the render thread only if this
helps. If though a toolkit is involved (FOX in this case) then I need to
"inject" the render window.
I can prevent synchronization issues easily if this is required as I
have a specific synchronization window so no two display woul
I've added now an event loop to the render thread using that display
connection. This seems to work. Come to think of it this is actually not
so bad anyways. Moved some events over to that event loop. In the end I
need the main loop only for input handling so these events can go to the
render threa