From: Sebastian Boldt
Subject: CLX
Date: 
Message-ID: <20020224122225.532522e1.SebastianBoldt@t-online.de>
Hi ppl,

I postet a question concerning round windows(X' Shape Extension) about a week ago. Someone postet a piece of code.
I'm using this code  and I now have a window, which has a transparent background and a circle in it, but there
is still the title bar and the border. Is there a way to get rid of the border and the title bar?

Another Problem:
When I'm clicking on this nice little x in the upper right corner of the window in order to close it,
is there a event that is generated? How can I be notified of this "event"?

I would appreciate any help...
	...thanks in advance

Sebastian

From: Bulent Murtezaoglu
Subject: Re: CLX
Date: 
Message-ID: <871yfahay3.fsf@nkapi.internal>
>>>>> "SB" == Sebastian Boldt <··············@t-online.de> writes:
[...]
    SB> I'm using this code and I now have a window, which has a
    SB> transparent background and a circle in it, but there is still
    SB> the title bar and the border. Is there a way to get rid of the
    SB> border and the title bar?

I haven't touched X at that level in years, so take what I say with a 
grain of salt.  I think you can do it in several ways, but the easiest is
to tell your window manager to not decorate that window.  CLX itself is not
putting those decorations there, your window manager is.  There probably is 
a way for you to give a hint to your window manager to not decorate the 
window but AFAIR that is just a hint that the wm can override.

    SB> Another Problem: When I'm clicking on this nice little x in
    SB> the upper right corner of the window in order to close it, is
    SB> there a event that is generated? How can I be notified of this
    SB> "event"?

If you get rid of your decorations, that X will disappear!  Anyhow, if you
don't have printed documentation, do a search on variants of Inter Client 
Communications Conventions (the acronym is ICCCM with the M being Manual)

cheers,

BM
From: Fred Gilham
Subject: Re: CLX
Date: 
Message-ID: <u7u1s57adl.fsf@snapdragon.csl.sri.com>
>>>>> "SB" == Sebastian Boldt <··············@t-online.de> writes:
[...]
    SB> I'm using this code and I now have a window, which has a
    SB> transparent background and a circle in it, but there is still
    SB> the title bar and the border. Is there a way to get rid of the
    SB> border and the title bar?


I suddenly remembered how to do this!

You use `override-redirect' when you create the window:


; test code

;(load "shape")

(defun test (&optional (host "localhost"))
  (let* ((d (xlib:open-display host))
         (s (first (xlib:display-roots d)))
         (r (xlib:screen-root s))
         (w (xlib:create-window :x 0 :y 0 :parent r :width 100 :height 100 :override-redirect :on))
         (p (xlib:create-pixmap :width 100 :height 100 :depth 1 :drawable w))
         (g (xlib:create-gcontext :drawable p :foreground 0)))

    (multiple-value-bind (b? bx by bw bh c? cx cy cw ch) (xlib:shape-query-extents w)
      (print (list b? bx by bw bh c? cx cy cw ch)))
    (setf (xlib:window-background w) 0)
    (xlib:draw-rectangle p g 0 0 100 100 t)
    (setf (xlib:gcontext-foreground g) 1)
    (xlib:draw-arc p g 0 0 100 100 0.0 6.29 t)
    (xlib:shape-combine-mask w xlib:shape-bounding 0 0 p xlib::shape-set)
    (xlib:map-window w)
    (xlib:display-finish-output d)

    (multiple-value-bind (b? bx by bw bh c? cx cy cw ch) (xlib:shape-query-extents w)
      (print (list b? bx by bw bh c? cx cy cw ch)))))




-- 
Fred Gilham ······@csl.sri.com || His word is a creative word, and
when he speaks the good exists as good.  God is neither arbitrary nor
tyrannical.  He is love, and when he expresses his will it is a will
of love.  Hence the good given by God is good for us.-- Jacques Ellul