discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GWorkspace as windowmanager?


From: Enrico Sersale
Subject: Re: GWorkspace as windowmanager?
Date: Sat, 12 Jun 2004 18:33:14 +0300

On 2004-06-12 18:10:27 +0300 Enrico Sersale <enrico@imago.ro> wrote:

On 2004-06-12 15:03:49 +0300 Enrico Sersale <enrico@imago.ro> wrote:

On 2004-06-12 14:05:37 +0300 Gregory John Casamento <greg_casamento@yahoo.com> wrote:


<snip>

Is there a way to have a NSWindow which _windowNum is 0, that is, the X root
window?
In XGServerWindow we have a -_rootWindowForScreen: method returning a
gswindow_device_t structure that represents the root window; it is used in
-window::: to set the root window for all the new windows.
I've tried to subclass NSWindow to override -_initBackendWindow: and then add
something in XGServerWindow to setup all the stuff, but I can't because
-_initBackendWindow: accesses windowmaps, a class variable of NSWindow.

If you find the answer to this, please let me know as well. InnerSpace.app,
the screensaver in my GAP project, needs to have a window which sits at this
level as well.

Only a idea...

If a window is deferred, NSWindow calls -_initBackendWindow: only in -orderWindow:relativeTo:. NSDesktopWindowLevel is a GNUstep addition, so, the case of a window that is deferred *and* which level is NSDesktopWindowLevel could be used to identify the root window. In this case NSWindow, instead of -_initBackendWindow:, could use a other method, say "-_initRootBackendWindow:", that, throught a appropiate method in GSDisplayServer (instead of -window:::, -rootwindow:::, for example), let the backend class setup the window. (The backend part should be easy to write, I think).

This seems to work, but I'm getting a "Desktop[9837] X-Windows error - BadAccess (attempt to access private resource denied)" in the new backend method. I'm doing something wrong with some X function. Could somebody a little more expert in X take a look at this? Gregory?

The problem is here:

  XSelectInput(dpy, window->ident, ExposureMask | KeyPressMask |
                                KeyReleaseMask | ButtonPressMask |
                             ButtonReleaseMask | ButtonMotionMask |
                           StructureNotifyMask | PointerMotionMask |
                               EnterWindowMask | LeaveWindowMask |
                               FocusChangeMask | PropertyChangeMask |
                            ColormapChangeMask | KeymapStateMask |
                            VisibilityChangeMask);

Anyway, I can confirm that this works; I'm adding NSViews in the root window 
and drawing in them. The only thing that doesn't work are the events.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]