unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* override_redirect of X Window System
@ 2003-09-17  2:45 Kazu Yamamoto
  2003-09-18 11:05 ` Richard Stallman
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Kazu Yamamoto @ 2003-09-17  2:45 UTC (permalink / raw)
  Cc: handa

Hello,

I have one request for Emacs 21.

I'm now creating a presentation tool for Emacs 21. One problem is that
there is no way to set one frame attribute "override_redirect" to
True.

Imagine that we try to create a frame which overs the entire screen
for presentation. Since we can't set override_redirect to True, the
created frame can't cover the entire screen unders some window
managers including gnome.

Thus I would like to a method to set override_redirect to True. One
idea is extend modify-frame-parameters to handle override_redirect.

Thanks in advance.

--Kazu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-17  2:45 override_redirect of X Window System Kazu Yamamoto
@ 2003-09-18 11:05 ` Richard Stallman
  2003-09-19 15:24 ` Jan D.
  2003-10-05 17:11 ` Jan D.
  2 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2003-09-18 11:05 UTC (permalink / raw)
  Cc: handa, emacs-devel

    Thus I would like to a method to set override_redirect to True. One
    idea is extend modify-frame-parameters to handle override_redirect.

It seems reasonable to me.  Does someone want to write the code?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-17  2:45 override_redirect of X Window System Kazu Yamamoto
  2003-09-18 11:05 ` Richard Stallman
@ 2003-09-19 15:24 ` Jan D.
  2003-09-22 17:32   ` Mike Hearn
  2003-10-05 17:11 ` Jan D.
  2 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2003-09-19 15:24 UTC (permalink / raw)
  Cc: handa, emacs-devel

> 
> Hello,
> 
> I have one request for Emacs 21.
> 
> I'm now creating a presentation tool for Emacs 21. One problem is that
> there is no way to set one frame attribute "override_redirect" to
> True.
> 
> Imagine that we try to create a frame which overs the entire screen
> for presentation. Since we can't set override_redirect to True, the
> created frame can't cover the entire screen unders some window
> managers including gnome.
> 
> Thus I would like to a method to set override_redirect to True. One
> idea is extend modify-frame-parameters to handle override_redirect.

I do not think this is a good idea to accomplish what you want.  First,
to handle thie properly (as in ICCCM compliance), we would have to grab
both the pointer and the keyboard.  And if Emacs hangs, you have to exit
X.  Also, there can be no switching to other applications.  There are
probably other nasty side effects I haven't thought about.

It is true that Metacity (the current Gnome window manager) does not
allow you to move windows above the screen (i.e. y coordinate less than
zero), but this is a Metacity bug.  Maybe you can run another window manager?
Some that even allows you to specify that the window in question shall
have no decorations at all (most except Metacity can handle this)?

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-19 15:24 ` Jan D.
@ 2003-09-22 17:32   ` Mike Hearn
  2003-09-24 17:14     ` Jan D.
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Hearn @ 2003-09-22 17:32 UTC (permalink / raw)


On Fri, 19 Sep 2003 17:24:15 +0200, Sir Jan D. scribed thus:
> It is true that Metacity (the current Gnome window manager) does not
> allow you to move windows above the screen (i.e. y coordinate less than
> zero), but this is a Metacity bug.  Maybe you can run another window manager?
> Some that even allows you to specify that the window in question shall
> have no decorations at all (most except Metacity can handle this)?

It is not a metacity bug - there is an agreed upon protocol for full
screening windows, and override-redirect is not it.

To Kazu: I'd recommend you research the latest EWMH specification, that
will show you how to properly fullscreen windows.

thanks -mike

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-22 17:32   ` Mike Hearn
@ 2003-09-24 17:14     ` Jan D.
  2003-09-24 17:40       ` Mike Hearn
  0 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2003-09-24 17:14 UTC (permalink / raw)
  Cc: emacs-devel

> On Fri, 19 Sep 2003 17:24:15 +0200, Sir Jan D. scribed thus:
>> It is true that Metacity (the current Gnome window manager) does not
>> allow you to move windows above the screen (i.e. y coordinate less 
>> than
>> zero), but this is a Metacity bug.  Maybe you can run another window 
>> manager?
>> Some that even allows you to specify that the window in question shall
>> have no decorations at all (most except Metacity can handle this)?
>
> It is not a metacity bug - there is an agreed upon protocol for full
> screening windows, and override-redirect is not it.

http://bugzilla.gnome.org/show_bug.cgi?id=106740

> To Kazu: I'd recommend you research the latest EWMH specification, that
> will show you how to properly fullscreen windows.

This requires XSendEvent.  It is not available from elisp.
It is also not a solution that works on all window managers out there.

But it might be a good idea to make an interface to XSendEvent from
elisp so Kazu can use it.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-24 17:14     ` Jan D.
@ 2003-09-24 17:40       ` Mike Hearn
  2003-09-24 18:17         ` Jan D.
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Hearn @ 2003-09-24 17:40 UTC (permalink / raw)
  Cc: emacs-devel

On Wed, 2003-09-24 at 18:14, Jan D. wrote:
> > It is not a metacity bug - there is an agreed upon protocol for full
> > screening windows, and override-redirect is not it.
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=106740

This is about being able to move windows above panels for accessibility
reasons, not how apps are supposed to fullscreen.

> > To Kazu: I'd recommend you research the latest EWMH specification, that
> > will show you how to properly fullscreen windows.
> 
> This requires XSendEvent.  It is not available from elisp.
> It is also not a solution that works on all window managers out there.

It works on all standards compliant WMs, which is an increasing number.
There's no need to expose XSendEvent to elisp, simply having a
fullscreen function that does the necessary machinery would work too.

thanks -mike

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-24 17:40       ` Mike Hearn
@ 2003-09-24 18:17         ` Jan D.
  2003-09-25  9:56           ` Mike Hearn
  0 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2003-09-24 18:17 UTC (permalink / raw)
  Cc: emacs-devel

> On Wed, 2003-09-24 at 18:14, Jan D. wrote:
>>> It is not a metacity bug - there is an agreed upon protocol for full
>>> screening windows, and override-redirect is not it.
>>
>> http://bugzilla.gnome.org/show_bug.cgi?id=106740
>
> This is about being able to move windows above panels for accessibility
> reasons, not how apps are supposed to fullscreen.

And that is what I said.

>
>>> To Kazu: I'd recommend you research the latest EWMH specification, 
>>> that
>>> will show you how to properly fullscreen windows.
>>
>> This requires XSendEvent.  It is not available from elisp.
>> It is also not a solution that works on all window managers out there.
>
> It works on all standards compliant WMs, which is an increasing number.
> There's no need to expose XSendEvent to elisp, simply having a
> fullscreen function that does the necessary machinery would work too.

The good things about standards is that there are so many to choose 
from :-)
Seriously, there are WMs that where created before EWMH existed.  One
is CDE, which is used a lot.  Others in use still, are fvwm 1.x, olvwm,
mwm and KDE 1.x.

If we add a solution to Emacs that says "call this function to get
fullscreen" and then it does not work on peoples WMs, I think we are
going to see bug reports.  And if there is one response I don't like
w.r.t. things that doesn't work, it is "please change your
unrelated app/version/OS... to something else".

Exposing XSendEvent can be potentially useful for more things than
fullscreen.  For example, expand vertically and/or horizontally that
are also in EWMH.

But I do not make these desicions for Emacs, these are just my opinions.
If it is descided to put in a C-function that only works on a subset of
X window WMs, I can implement it.  But I think my suggestion is more
portable and more useful (hardly surprising :-)

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-24 18:17         ` Jan D.
@ 2003-09-25  9:56           ` Mike Hearn
  2003-09-25 21:08             ` Jan D.
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Hearn @ 2003-09-25  9:56 UTC (permalink / raw)
  Cc: emacs-devel

On Wed, 2003-09-24 at 19:17, Jan D. wrote:
> And that is what I said.

I'm confused then. Why is it relevant? I don't think the functionality
in that bug lets apps place themselves above the panel, I think it's
there so users can move them  there.

> The good things about standards is that there are so many to choose 
> from :-)

Not here :) There is only one protocol for fullscreening apps that I'm
aware of.

> Seriously, there are WMs that where created before EWMH existed.  One
> is CDE, which is used a lot.  Others in use still, are fvwm 1.x, olvwm,
> mwm and KDE 1.x.

Sure, but so what? There are people who still use Netscape 1, does that
mean we shouldn't use anything not available in that version on the web?

> If we add a solution to Emacs that says "call this function to get
> fullscreen" and then it does not work on peoples WMs, I think we are
> going to see bug reports.  

If it's done using override-redirect it will generate more. Believe me,
this is the technique we use currently in Wine, and it breaks pretty
much everything (z-ordering, panels etc). There's a reason that protocol
was developed, and it's because it's badly needed.

> And if there is one response I don't like
> w.r.t. things that doesn't work, it is "please change your
> unrelated app/version/OS... to something else".

Hacks for ancient/buggy WMs don't belong in emacs. If somebody insists
on using software that doesn't keep up with the times, then they should
be prepared to sacrifice some features.

> Exposing XSendEvent can be potentially useful for more things than
> fullscreen.  For example, expand vertically and/or horizontally that
> are also in EWMH.

That's true, but XSendEvent as an API is rather cumbersome, not to
mention large. I'm not sure it makes sense to try and expose so much of
Xlib in elisp.

thanks -mike

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-25  9:56           ` Mike Hearn
@ 2003-09-25 21:08             ` Jan D.
  2003-09-25 22:06               ` Kim F. Storm
  0 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2003-09-25 21:08 UTC (permalink / raw)
  Cc: emacs-devel


> On Wed, 2003-09-24 at 19:17, Jan D. wrote:
>> And that is what I said.
>
> I'm confused then. Why is it relevant? I don't think the functionality
> in that bug lets apps place themselves above the panel, I think it's
> there so users can move them  there.

Because if you can move the title bar above y=0, you basically have
fullscreen.  But Metacity don't let you do that.  Every other WM allows
that.

>
>> The good things about standards is that there are so many to choose
>> from :-)
>
> Not here :) There is only one protocol for fullscreening apps that I'm
> aware of.

Yes, but it is not a "standard" in  the sence, "included in the X
specification".  Freedesktop is separate from X, which is defined by
the X organisation.  So you can be complient to X without doing EWMH.

>
>> Seriously, there are WMs that where created before EWMH existed.  One
>> is CDE, which is used a lot.  Others in use still, are fvwm 1.x, 
>> olvwm,
>> mwm and KDE 1.x.
>
> Sure, but so what? There are people who still use Netscape 1, does that
> mean we shouldn't use anything not available in that version on the 
> web?

In the case of Emacs, yes.  Emacs has the unique property of being
the same in many platforms.  It would be a bad thing (IMHO) if full
Emacs functionallity relied on running Gnome or KDE.  Emacs is the same
on all X implementations.  It would be a bad thing if we changed that.

>> If we add a solution to Emacs that says "call this function to get
>> fullscreen" and then it does not work on peoples WMs, I think we are
>> going to see bug reports.
>
> If it's done using override-redirect it will generate more. Believe me,
> this is the technique we use currently in Wine, and it breaks pretty
> much everything (z-ordering, panels etc). There's a reason that 
> protocol
> was developed, and it's because it's badly needed.

I don't disagreee on the protocol, I think it is a good thing.  But
how it should be incorporated into Emacs is another thing.  If you read 
my
post you will see I talk against unsing override-rederict.
I rather put a general mechanism that works on every platform
at the C level and then create something like EWMH.el at the lisp
level.  After all, platform specific lisp packages is not uncommon, but
the C level should (again IMHO) be generic.

>
>> And if there is one response I don't like
>> w.r.t. things that doesn't work, it is "please change your
>> unrelated app/version/OS... to something else".
>
> Hacks for ancient/buggy WMs don't belong in emacs. If somebody insists
> on using software that doesn't keep up with the times, then they should
> be prepared to sacrifice some features.

I have no statistics, but I think there are more users running CDE
(without EWMH) than Gnome (or any other EWMH complient WM) today.

Hacks for old stuff do exist in Emacs.  WMs that don't implement EWMH 
is not "ancient/buggy", the spec has only existed for a year or so.  If 
it
where five years it would be a different matter.

>
>> Exposing XSendEvent can be potentially useful for more things than
>> fullscreen.  For example, expand vertically and/or horizontally that
>> are also in EWMH.
>
> That's true, but XSendEvent as an API is rather cumbersome, not to
> mention large. I'm not sure it makes sense to try and expose so much of
> Xlib in elisp.

It is not much different from the selection stuff that is exposed to 
elisp
today.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-25 21:08             ` Jan D.
@ 2003-09-25 22:06               ` Kim F. Storm
  0 siblings, 0 replies; 12+ messages in thread
From: Kim F. Storm @ 2003-09-25 22:06 UTC (permalink / raw)
  Cc: Mike Hearn, emacs-devel

"Jan D." <jan.h.d@swipnet.se> writes:

> Hacks for old stuff do exist in Emacs.  WMs that don't implement EWMH
> is not "ancient/buggy", the spec has only existed for a year or so.
> If it
> where five years it would be a different matter.

That's around the time when 21.4 will be released, right?  (couldn't resist :-)

But FWIW, I agree with you that we should keep the C-level interface generic,
and implement the higher level protocols in lisp.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-09-17  2:45 override_redirect of X Window System Kazu Yamamoto
  2003-09-18 11:05 ` Richard Stallman
  2003-09-19 15:24 ` Jan D.
@ 2003-10-05 17:11 ` Jan D.
  2003-10-08  0:04   ` Kazu Yamamoto
  2 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2003-10-05 17:11 UTC (permalink / raw)
  Cc: handa, emacs-devel

> 
> Hello,
> 
> I have one request for Emacs 21.
> 
> I'm now creating a presentation tool for Emacs 21. One problem is that
> there is no way to set one frame attribute "override_redirect" to
> True.
> 
> Imagine that we try to create a frame which overs the entire screen
> for presentation. Since we can't set override_redirect to True, the
> created frame can't cover the entire screen unders some window
> managers including gnome.
> 
> Thus I would like to a method to set override_redirect to True. One
> idea is extend modify-frame-parameters to handle override_redirect.

I have made a function that can work as a base for implementing a
package for extended window manager hints (EWMH).  However, I am
currently only able to do Emacs stuff during weekends (traveling during
the week), so I have just made a client event sending function you can
use.  For example, to set fullscreen with EWMH, do:

(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                       '(2 "_NET_WM_STATE_FULLSCREEN" 0))

2 in the list is "toggle".  You can also use 1 for "add" and 0 for
"remove".  See the section on _NET_WM_STATE here for other usages:
http://pdx.freedesktop.org/Standards/wm-spec/1.3/

Is this enough for your needs?

Here is the documentation for the function:
(x-send-client-message DISPLAY DEST FROM MESSAGE-TYPE FORMAT VALUES)

Send a client message of MESSAGE-TYPE to window DEST on DISPLAY.

For DISPLAY, specify either a frame or a display name (a string).
If DISPLAY is nil, that stands for the selected frame's display.
DEST may be an integer, in which case it is a Window id.  The value 0 may
be used to send to the root window of the DISPLAY.
If DEST is a frame the event is sent to the outer window of that frame.
Nil means the currently selected frame.
If DEST is the string "PointerWindow" the event is sent to the window that
contains the pointer.  If DEST is the string "InputFocus" the event is
sent to the window that has the input focus.
FROM is the frame sending the event.  Use nil for currently selected frame.
MESSAGE-TYPE is the name of an Atom as a string.
FORMAT must be one of 8, 16 or 32 and determines the size of the values in
bits.  VALUES is a list of integer and/or strings containing the values to
send.  If a value is a string, it is converted to an Atom and the value of
the Atom is sent.  If more values than fits into the event is given,
the excessive values are ignored.

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: override_redirect of X Window System
  2003-10-05 17:11 ` Jan D.
@ 2003-10-08  0:04   ` Kazu Yamamoto
  0 siblings, 0 replies; 12+ messages in thread
From: Kazu Yamamoto @ 2003-10-08  0:04 UTC (permalink / raw)


Hello Jan D.,

From: "Jan D." <jan.h.d@swipnet.se>
Subject: Re: override_redirect of X Window System

> I have made a function that can work as a base for implementing a
> package for extended window manager hints (EWMH).  However, I am
> currently only able to do Emacs stuff during weekends (traveling during
> the week), so I have just made a client event sending function you can
> use.  For example, to set fullscreen with EWMH, do:
> 
> (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
>                        '(2 "_NET_WM_STATE_FULLSCREEN" 0))
> 
> 2 in the list is "toggle".  You can also use 1 for "add" and 0 for
> "remove".  See the section on _NET_WM_STATE here for other usages:
> http://pdx.freedesktop.org/Standards/wm-spec/1.3/
> 
> Is this enough for your needs?

Yes. Yes. Thank you very much!

My presentation tool now can work with Gnome! 

--Kazu

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-10-08  0:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-17  2:45 override_redirect of X Window System Kazu Yamamoto
2003-09-18 11:05 ` Richard Stallman
2003-09-19 15:24 ` Jan D.
2003-09-22 17:32   ` Mike Hearn
2003-09-24 17:14     ` Jan D.
2003-09-24 17:40       ` Mike Hearn
2003-09-24 18:17         ` Jan D.
2003-09-25  9:56           ` Mike Hearn
2003-09-25 21:08             ` Jan D.
2003-09-25 22:06               ` Kim F. Storm
2003-10-05 17:11 ` Jan D.
2003-10-08  0:04   ` Kazu Yamamoto

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).