discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GWorkspace as windowmanager?


From: Yen-Ju Chen
Subject: Re: GWorkspace as windowmanager?
Date: Sat, 12 Jun 2004 09:06:26 -0400

Not sure I understand the problem,
but here is how I get the roow window from GNUstep appplication:

Class xgserver = NSClassFromString(@"XGServer") // Get XGServer class
GSDisplayServer *gsDisplay = GSCurrentServer(); // Get GSDisplayServer instance
Display display = [gsDisplay xDisplay]; // X window display
NSArray *screens = [gsDisplay screenList]; // Get screens
unsigned int screenNumber = [[screens objectAtIndex: 0] intValue]; // Get first screen number Window rootWindow = [gsDisplay xDisplayRootWindowForScreen: screenNumber]; // Get X window

Then you can use Xwindow function to draw on this root window.
If you want to use GNUstep to draw, this may work (not sure):

gswin = [[NSWindow alloc] init...] // Get NSWindow instance
gswindow_device_t *gsWin = [xgserver _windowWithTag: [gswin windowNumber]];

gsWin->ident is the Xwindow in NSWindow.
Maybe you can reparent the root X window on the gsWin->ident,
then you can use -gui to draw on it.

Most of the methods are not public, so you have to copy the headers from -back.

Yen-Ju


From: Gregory John Casamento <greg_casamento@yahoo.com>
To: enrico@imago.ro, Armando Di Cianno <armando@nycap.rr.com>
CC: discuss-gnustep@gnu.org
Subject: Re: GWorkspace as windowmanager?
Date: Sat, 12 Jun 2004 04:05:37 -0700 (PDT)


--- Enrico Sersale <enrico@imago.ro> wrote:
> On 2004-06-11 01:59:44 +0300 Armando Di Cianno <armando@nycap.rr.com> wrote:
>
> > On 2004-06-10 18:24:30 -0400 Charles Kerr <punt1959@msn.com> wrote:
> >> I have been using Windowmaker, and like the feel.
> > ...
> >> Having both, the workspace seemed to overlap with WindowMaker.
> >
> > <snip>
> > Actually ... is it feasible to have the icons draw right onto the root
> > window? I ... *sigh* ... I run xscreensaver's on the root window, e.g.
> > `/usr/lib/xscreensaver/flurry -root`, and would love the ability for
> Desktop
> > to paint the root, but not create a "desktop window" that isn't the actual > > root .... and if it just has to be so, Alt-Drag shouldn't be able to move
> it!
> > <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.

GJC

=====
Gregory John Casamento -- CEO/President Open Logic Corp.
#### Maintainer of Gorm for GNUstep.




__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

_________________________________________________________________
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.click-url.com/go/onm00200362ave/direct/01/





reply via email to

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