Re: Radeon 9800XT 3D acceleration problem

2003-12-29 Thread Gerhard W. Gruber
On Mon, 29 Dec 2003 19:18:55 +, M Taylor [EMAIL PROTECTED] wrote:

To the best of my knowledge XFree86 4.3.0 supports all Radeon cards.

Yes, but not 3D.

XFree86 only provides 2D, for 3D acceleration (which is OpenGL not
X11) you need to get the ATI binary drivers from ATI's website. Because 

That' s exactly the problem. The 3D acceleration does not work for 9800XT. I
know at least one other guy with an XT and he sold it after a few weeks and,
bought an nVidia instead, because it doesn' t work.

XFree86 cannot control these drivers, please direct any questions to the ATI
technical support forums. 

Technical support forum from ATI has exactly one answer: Linux is not
supported blablabla.

They don' t even bother to answer questions which is not related to
installation as long as the magic keyword linux is included. :(

I wonder if it was the wrong decision to buy this card and go for an nVidia
instead. :(

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Radeon 9800XT 3D acceleration problem

2003-12-26 Thread Gerhard W. Gruber
I have a Asus Radeon 9800XT and everything I tried so far, to get 3D
acceleration working, failed. Now I wonder if
 there is the chance that XFree will support this card with 3D natiively any
time soon. All the success stories I
found were with 9800PRO and the only guy, I found with the XT model, had the
same problems as I.

I read that ATI committed themselve to a drvier update 6 times per year.
Anybody know when the next issue is to be
 expected? I hope that this will be fixed then.

Of course if anybody has some suggestion as how to get 3D working I would
gladly appreciate any suggestions.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: State of radeon driver

2003-12-11 Thread Gerhard W. Gruber
On Thu, 11 Dec 2003 02:16:01 +0100, wim delvaux
[EMAIL PROTECTED] wrote:

On Thursday 11 December 2003 00:48, Gerhard W. Gruber wrote:
 On Thu, 11 Dec 2003 00:39:57 +0100, wim delvaux

 [EMAIL PROTECTED] wrote:
 The closed source drivers on the ATI website

 I tried them, but no success. But I think the problem is with KDE/OpenGL
 because I managed to get at least the Desktop with Mesa working. Only when
 I try to activate the ATI provided OpenGL lib I can't start X/KDE anymore.

I tried it too and also had no success.  What version did you use ?

I was using the ATI drivers 3.2.8. Then I tried the ones from Suse 9.0 also
3.2.8. And I also tried the 3.2.7 download but I didn't know how to install
that because this was an RPM only and I found no makefiles within. When I
tried to load the module it said that my kernel is compile dwith gcc2 and the
module with gcc3 wich doesn't work.
I found a thread on linuxquestions which was quite good. At least it got me
going so far that X now uses the fglrx driver, but I still have the problem
that I can't use KDE with the 3D accelerated OpenGL. When I link against Mesa
everything works, but of course I have about 350 FPS on glxgears. When I trie
to use the provided OpenGL lib I get this errormessage when starting X:

DCOP aborting call from 'anonymous-3627' to 'kded'
ERROR: KUniqueApplication: DCOP communication error!
DCOP aborting call from 'anonymous-3630' to 'knotify'
ERROR: KUniqueApplication: DCOP communication error!
startkde: Shutting down...
KLauncher: Exiting on signal 1
startkde: Running shutdown scripts...



I don't think that the Radon 9800XT is so much different than the Radeon
9800Pro so the drivers should work. But I think the problem is maybe with KDE.
Most of the users I found, which reported success were using Suse 9.0 so it
could be that they have an updated KDE.
I also tried the libGL.so from one of these users, but that gave me the same
errormessage. Of course it could be that I would have needed to copy other
lib*so files as well, but I don't think so. On the other hand I can run fvwm2
which works fine, but when I try to run glxgears it breaks also, so this
points to the OpenGL stuff. I don't know what else I could try.
Currently I install gentoo on my laptop and then I will see. I have a Radeon
900 Mobility in that, but I forgot to check how 3D works there. I plan to
install gentoo on my main machine as well, but this will take quite some time
until everything works. In the meantime I would be more than happy if somebody
could point out what could be wrong.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: State of radeon driver

2003-12-10 Thread Gerhard W. Gruber
On Wed, 10 Dec 2003 14:47:27 +0100, wim delvaux
[EMAIL PROTECTED] wrote:

I haven't seen this posting. ???

 There is no general OEM barrier anymore.
 It only was it was in early days where no one was sure
 if drivers would work well on those boards.

 It would be kind if you can you retry this test
 with latest fglrx drivers and mail me the results
 in private or public, just as you want.

   Sure with pleasure ... where can I download the 'lastest' drivers ?

Which drivers are we talking about here? I have also the problem that I can't
get my 3D acceleration not to work with an ASUS 9800XT, but I have XFree86
4.3.0.


-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: State of radeon driver

2003-12-10 Thread Gerhard W. Gruber
On Thu, 11 Dec 2003 00:39:57 +0100, wim delvaux
[EMAIL PROTECTED] wrote:

The closed source drivers on the ATI website

I tried them, but no success. But I think the problem is with KDE/OpenGL
because I managed to get at least the Desktop with Mesa working. Only when I
try to activate the ATI provided OpenGL lib I can't start X/KDE anymore.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Wine crashes the machine

2003-12-08 Thread Gerhard W. Gruber
I noticed that wine can crash the entire linux box. So what has that got to do
with X? :)
When I activate DGA and start wine the machine immediately crashes.

Kernel: 2.4.22 (from kernel.org unpatched)
CPU: Pentium4
XFree86: 4.3.0
Card: ATI Radeon 9800XT
Driver: fglrx 3.2.8

It could be that this is the fault of the driver but I thought I mention it
anyway just in case you are interested. When I disable DGA then wine works
fine. The wine build is from yesterday CVS.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-05 Thread Gerhard W. Gruber
On Fri, 5 Dec 2003 00:16:11 +0100, Alexander Stohr [EMAIL PROTECTED] wrote:

depends on distor and setup, sometimes there are standalone
Mesa packages and other times it is all merged into the XF86 
libGL packages as the non-optional sofware renderer fallback.

I just found a posting in alt.os.linux.suse from somebody with the same
problem but a Radeon 9700Pro. He wrote that he is using the DRI package from
sourceforge. I downloaded and installed it, but I got the below errormessage.

I also wondered about this posting. I thought to enable 3D acceleration I have
to use the ATI binary drivers instead of open sourced ones. I know that this
is the case for nVidia so I thought it is the same for ATI here. Of course ATI
has this less restrictive NDA policy under which it is possible to still
release OS drivers. So is it worth the effort to use the sourceforge package
and will I have full 3D acceleration?

If so, how can I fix the below error? What is this ABI that the error message
is talking about?


XFree86 Version 4.3.0
Release Date: 27 February 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: SuSE Linux [ELF] SuSE
Build Date: 11 September 2003
Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
 (++) from command line, (!!) notice, (II) informational,
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: /var/log/XFree86.0.log, Time: Fri Dec  5 19:13:12 2003
(==) Using config file: /etc/X11/XF86Config-4
(EE) module ABI minor version (7) is newer than the server's version (6)
(EE) Failed to load module radeon (module requirement mismatch, 0)
(EE) No drivers available.

Fatal server error:
no screens found

When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file /var/log/XFree86.0.log.
Please report problems to http:/www.suse.de/feedback.

XIO:  fatal IO error 104 (Connection reset by peer) on X server :0.0

  after 0 requests (0 known processed) with 0 events remaining.


-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-05 Thread Gerhard W. Gruber
On Fri, 5 Dec 2003 10:14:10 -0800 (PST), Alex Deucher [EMAIL PROTECTED] wrote:

3D accel on r300 cards (9500 and up) is only supported by ati's binary
drivers.  

Oh, well. So I wonder what I should do now. :( It's now a full week that I try
to find some info on how to enable that.

The ABI error comes from the fact that you are using a newer driver
with a old version of the XFree86 server.  you need to upgrade you
XFree86 binary.  there is one available here:
http://dri.sourceforge.net/snapshots/extras/

I tried that, but it doesn't work. Or maybe it didn't work because my card is
not supported.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-04 Thread Gerhard W. Gruber
On Thu, 4 Dec 2003 07:49:05 -0800 (PST), Alex Deucher [EMAIL PROTECTED] wrote:

Like I said before:  If you MB is 8x you will need to patch your 2.4
kernel with 8x support (or if you can set your BIOS to 4x only mode) or
use a 2.6 kernel.  once you have that done you can just use the DRI
snapshots.  This will allow you to use 4x mode.  if you want to use 8x,
you will have to apply michel/hui's, or keith's 8x patch.

With my 9800XT I have the same problem, but my Mobo has only 4x AGP, so I
don't have any clue as to why it doesn't work.

I always get these errormessage when I load agpgart and fglrx and then startx.

The weird thing is that X starts up with this gray screen and the mouse
working. It only crashes the instant when the KDE dialog should be coming up.

(==) Using config file: /etc/X11/XF86Config-4
(WW) fglrx: No matching Device section for instance (BusID PCI:1:0:1) found
Could not init font path element /usr/X11R6/lib/X11/fonts/local/, removing
from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing
from list!
DCOP aborting call from 'anonymous-3627' to 'kded'
ERROR: KUniqueApplication: DCOP communication error!
DCOP aborting call from 'anonymous-3630' to 'knotify'
ERROR: KUniqueApplication: DCOP communication error!
startkde: Shutting down...


-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-04 Thread Gerhard W. Gruber
On Thu, 4 Dec 2003 18:57:10 +0100, Alexander Stohr [EMAIL PROTECTED] wrote:

how about a totally pure and simple XFree86?
this will launch an X-Server without any window manager.
shut it down with CTRL-ALT-Backspace if the mouse moves.

OK. Never thought of that.

On the other hand my desktop works fine as long as I don't use the agpgart
with th fglrx driver.

As sonn as I load agpgart before fglrx (which should enable 3D) I get this
problem.

other attempt, try fvwm2, twm or GNOME window manager.

Thanks. I try that.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-04 Thread Gerhard W. Gruber
On Thu, 4 Dec 2003 18:57:10 +0100, Alexander Stohr [EMAIL PROTECTED] wrote:

how about a totally pure and simple XFree86?
this will launch an X-Server without any window manager.
shut it down with CTRL-ALT-Backspace if the mouse moves.

other attempt, try fvwm2, twm or GNOME window manager.
it should be configureable by your system software or
via hidden files at your user's home directory.

Thanks! You really made my day! :)The last days I was hunting for some info
and I couldn't find anything. I dind't know what to try else, so this gave me
at least a little boost, even though I still have no 3D yet.

I tried running fvwm2 and it worked. I verified with lsmod and I could see at
the usagecount that X was indeed using the fglrx driver. Normally it is 0 and
now it was 6 and 4 (agpgart).

I tried running glxgears but it gave me an Breakpoint/Trap something
errormessage. The same for fgl_glxgears, glxinfo, etc.) was always the same.
OpenGL should work in fvwm2 the same as in KDE, right?

The question now is, what should I do next?

I'am running KDE 3.1 so I should be quite fine. Do you mean I should reinstall
KDE? Or is there something else?

This really helped a lot, because now I'm at least a (even though a tiny) step
further. :)

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [XFree86] Radeon 920, hardware 3D

2003-12-04 Thread Gerhard W. Gruber
On Thu, 4 Dec 2003 12:35:57 -0800 (PST), Alex Deucher [EMAIL PROTECTED] wrote:

run ldd on your glxgears or glxinfo executables and see which libGL it
is using.

It is using the ones from the driver. It uses libGL which points to a link
which is the drvier lib. I made a diff on the file which is in the driver
directory and the installed libGL.so.1.2 and they are the same.

When I run glxgears I get now 300FPS which is a little better because
previously I had 99FPS but I think that was because I was using sync to vert
retrace. 

when I run enemy territory it always claims that I'm using Mesa, though I
don't know why it thinks this. I already uninstalled Mesa, so there shouldn't
be any files there.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


ATI and NDA

2003-12-03 Thread Gerhard W. Gruber
On ATIs website I was reading that as a developer for XFree (and probably
other graphics related stuff) you can sign an NDA and you will get all the
information you need. Now I wonder how this will fit in with Open Source.
When I sign this NDA then I wont be allowed to tell certain things to the
public, but then how can I create an open source module which will contain the
code which relates to the stuff?

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: ATI and NDA

2003-12-03 Thread Gerhard W. Gruber
Thanks!
-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Problem with ATI Radeon 9800 XT

2003-12-01 Thread Gerhard W. Gruber
Two days ago I got my Radeon 9800 XT and so I was forced to upgrade from Suse
8.0 Pro to 8.2.
Now my configuration is the following:
Kernel: 2.4.22 (from kernel.org not from Suse)
XFree86: 4.3.0
glibc: 2.3

I downloaded the drivers from ATI and I can insmod agpgart and fglrx, but when
I try to load X I get this errormessage in the messagelog:

kernel: [fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL
pointer

I was googling now since yesterday and I'm pretty sure that I did everything
required, so I have to assume that it is either a problem with XFree86 or with
the ATI drivers. I would really appreciate it if anybody can help me on how to
get that 3D acceleration working. I'm not familiar with XFree development, but
if you tell me what you need I can also help in providing information about
this problem.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-06 Thread Gerhard W. Gruber
On Thu, 6 Nov 2003 02:37:18 -0500 (EST), Mike A. Harris
[EMAIL PROTECTED] wrote:

There are 2 completely different Nvidia video drivers:

Thanks. Now that is clear to me. There was some confusion on my part about the
relation between the two.

Also, whenever one does load kernel modules by hand, using 
modprobe is generally speaking, the preferred method as it 

Yes. I was mixing the names of depmod with modprobe.

The X server handles saving the current text mode, prior to then 
programming a new video mode itself, and then handles restoring 
the text mode when a VTswitch occurs.

Yes. The problem for me is how to save the current state of the video card, I
hoped to learn that from the sources of XFree, but since it doesn't need to
this ,it is not that much help to me. But there is still some value for me in
it, because at least I can see how to reliably switch to textmode, which
currently also doesn't work for me.

I presume you mean the nv driver.

Yes.

maintained by Mark Vojkovich at Nvidia.  The other proprietary 

Oh. That's a surprise to me. I thought only the proprietary part is from
nVidia as they don't want to give out information. Well, maybe I can contact
him and ask if he can tell me on how to save the the current state of the
card. :) At least worth a try.

very small part of it which the source code is available for 
which is not driver related, but which is a glue or shim later to 
glue the Nvidia binary blob to the kernel.  This small bit of 
code is not helpful for video driver authors however, it contains 
no video control bits, just kernel glue.

I noticed that. :) I thought that there should be at least some information in
the exported functions, but I couldn't make much out of it.

Look at the driver source in XFree86 for foo_dga.c files for 
example stuff.

Thanks. I have not that much time, but from what I could read so far in the
sources there are bits that are usefull to me.

Hope this helps.  Good luck with your work!

Thanks. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-06 Thread Gerhard W. Gruber
On Thu, 6 Nov 2003 02:50:57 -0500 (EST), Mike A. Harris
[EMAIL PROTECTED] wrote:

Wrong.  Video mode switching is completely done within XFree86 
itself, and does not involve the kernel at all.  The video driver 
directly programs the CRTC on the video card in some drivers, and 
in other drivers, the video mode is programmed using the video 
BIOS.  Drivers with kernel modules, the kernel module contains 
interfaces which allow the userland 2D/3D driver components to do 
direct rendering to the video card, using DMA/IRQ.  The Nvidia 

Thanks.

proprietary kernel module also contains other goodies of which 
probably include some kind of JIT compiler to compile microcode 
on the fly for their GPU engine.  What else it might contain is 

Well, that I am not interested in anyway.

Hope it helps out.  ;o)

Yes. Definitley.

That is not open sourced really.  That is nothing bug glue code, 
and is useless other than for the purpose of relinking the Nvidia 
proprietary kernel driver to a new kernel, so you can continue to 
use their driver.

But it does export some function to be called from user space. Another kernel
module can of course utilize these functions as well. At least if you know on
how to use them. :)

Hope this clears up any misconceptions for sure this time.  ;o)  

Yes. :)

The most useful stuff for you is most likely the 2D XFree86 nv  
driver source code, and whatever might be in the Linux kernel
framebuffer driver, or BSD et al.  Since no docs are available
for this hardware though, you may have a tough time doing
anything with it without the aide of someone familiar with the
hardware.  Wish you the best of luck nonetheless.

I give it a try at least. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-06 Thread Gerhard W. Gruber
On Thu, 6 Nov 2003 12:48:47 -0400, Randy Kramer [EMAIL PROTECTED] wrote:

Your statement confuses me.  Maybe I miss your point, open source *does* 
mean you can read the source code.  (Maybe you meant to say it does not mean 
that you can *only* read the source code?)

Well, there are two different meanings in the Open of Open Source.

1.) Open as in free for all to use, like in the GPL.
2.) Open to read for everybody.

In the second case you can read the code, and often this already helps to
understand why a bug in your own code occurs or how to employ badly documented
features, but you are not allowed to use it in any way.

Of course copying a function call from one source to the other shouldn't hurt
because there is only one way to call a specific function, but you may not
copy an algorithm or part of it.

quote
The basic idea behind open source is very simple: When programmers can read, 
redistribute, and modify the source code for a piece of software, the 
software evolves. People improve it, people adapt it, people fix bugs. And 
this can happen at a speed that, if one is used to the slow pace of 
conventional software development, seems astonishing.
/quote

But that is Open as in the first meaning which is not true for all open
sources.

I can't recall the name, but there is that other thing that Microsoft promotes 
that is their attempt to co-opt open source, the program that lets some of 
their customers view the source (for a fee) and (possibly) submit bug fixes, 
but does not actually let them modify the code (IIUC).

It was in their govermental program, but I can't recall the name now. Some
words that you would never associate with MS like trust and security. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-06 Thread Gerhard W. Gruber
On Thu, 6 Nov 2003 00:49:28 +0100, Rafa? Rzepecki
[EMAIL PROTECTED] wrote:

Why won't you check the open sourced XFree86 driver called 'nv'? 
The only functionality it lacks is AFAIK OpenGL and XV acceleration, 
and I don't think you would use these in a debugger.

That's what i do. Thanks.

Also you could have a look at how libraries like SVGAlib do VT 
switching.

I already looked also in these. My major problem is that I have not much
experience with VGA programming, but I certainly have to check this as well.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-05 Thread Gerhard W. Gruber
On Wed, 5 Nov 2003 18:14:03 +0100, Rafa³ Rzepecki
[EMAIL PROTECTED] wrote:

I hope that clears it up.

Yes. Thanks. I hoped that the XFree part would have been open source, but of
course that is a small hope. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-04 Thread Gerhard W. Gruber
On Mon, 3 Nov 2003 18:36:52 -, Rob Taylor [EMAIL PROTECTED] wrote:

one way to do what you want (from kernel space) is to use the kernel
framebuffer driver for writing graphics, and use up one of the VT's for your
debugger, switching to that vt when doing, umm, whatever your doing

I know, and I'm looking into this, but I would prefer to support the normal X
screen if possible.

I have to ask tho, whats wrong with kgdb?

1.) kgdb I think has to use a kernel patch.
2.) If kgdb is similar to gdb then I don't really like it because the
interface sucks. :)
3.) I want to have a decent debugger that can be used for stuff like driver
development, but also user space debugging, with a nice interface.
4.) The original project is already there but the author abandonded it and I
found thi sproject interesting, so I would like to continue it. From what I
see on the statistics on sourceforge, it seems there is enough interest in
such a project.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-04 Thread Gerhard W. Gruber
On Mon, 03 Nov 2003 11:31:41 -0800, Tim Roberts [EMAIL PROTECTED] wrote:

nvidia.o is not a kernel module.  It is just a dynamically loaded object
file that gets loaded by the XFree86 dynamic loader and called entirely in
user mode.  It could have been done as an ordinary .so DLL, but the design
objective was to have these work regardless of operating system.  That's
why there is a loader built-in to XFree86.

I think I know now where the confusion comes from. There is a kernel module
for nVidia which you can download at their site and there is also, seemingly,
a module within XFree86. I suppose the kernel part from nVidia is only there
for 3D acceleration stuff, right? I looked into what functions this module
exports but I can't make much of it. Seems mostly to do with register/memory
access.

Some drivers DO have kernel modules, to handle the DMA transfers that are
necessary for adequate 3D operation.  However, kernel drivers are loaded
with insmod.  If you specify a driver name in the Device section of an
XF86Config file, it is NOT a kernel driver.  It is a user-mode library.

There is a module which has to be loaded with insmod (or depmod if you prefer
:) ), so I was wondering what this module is exactly doing and how it is
related to XFree86.

Have you never looked at the XFree86 source code?  You need to do so. 
Really.  Much of this would be cleared up.

I had a look at the source code, but the code base for XFree86 is not exactly
small, so I didn't knew where to start. I looked into the kernel sources and I
found some support for switching non-standard consoles (meaning non-textmode)
which is aparently used by XFree86 and others like SVGAlib.

If you have a kernel module that you load with insmod, there still needs
to be an XFree86 board-specific driver that can talk to that kernel
driver.

Yes. That's what I meant. I already looked into the code of XFree86 nVidia
driver, but this will take some time to figure it out. :)

The driver put it into that mode originally.  It has a data structure that
tells it exactly what timing parameters it set.  All it has to do is do
that again.

I see. I hoped that the driver would read the current state from the hardware
and forgot that it probably wouldn't need to do that. :)

Driver   nvidia
then XFree86 will load /usr/X11R6/lib/modules/drivers/nvidia_drv.o.  The
name of the EnterVT entry point is up to the driver, but it will usually
be based on the driver name, just like you said.

The module of XFree86 is nv for nVidia. The proprietary drivers are called
nvidia. Apparently nVidia open sourced only that small part needed on the side
of XFree86 and closed source on the kernel part.

ALL done in the user-mode driver.  For those drivers that DO have kernel
components, the kernel sections are doing little more than DMA memory
management, which cannot be done in user-mode.  Register I/O and mode
switching is STILL in user mode.

I see. That would fit what I read in the kernel module, at least what is
available.

There are documents on DGA in the XFree86 tree, and you can probably find
pointers on the XFree86 web site.  As others have said, however, I'm not
sure it will help you, because DGA is an application interface that gets
called from user-mode.

Even if I can't use DGA directly, the source should provide information on how
to handle the hardware, so that would help me also. I have to take a look at
these.

Thanks.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-04 Thread Gerhard W. Gruber
On Mon, 3 Nov 2003 17:48:01 -0500 (EST), Mike A. Harris
[EMAIL PROTECTED] wrote:

Agreed.  I think he is of the belief perhaps that an X driver 
module is perhaps like an SVGAlib API you can use in arbitrary 
programs perhaps including kernelspace, which of course isn't 
true.

NO, I was not thinking of that. I was rather thinking to take a look on how
the mode is exactly set so I can copy this to the kernel module. Of course not
verbatim as this wouldn't work since it is user space code. I never intended
to use the user space code from the kernel. What I wanted to know is, on how
to read the current state so that I can save that information, do whatever I
need to do, and then restore the original state so that the application
executaion can resume without problems.

That's of course all true... I think he just totally 
misunderstands XFree86 and it's driver architecture in general.  

Might be. :) But that is because I had to download a kernel module and the
OpenGL stuff from the nVidia web site. I think most of that is needed in order
to use 3D acceleration, but I was not sure what else is in there.

Perhaps knowing that the majority of drivers don't even have a 
kernel module at all period is a clearer indicator that XFree86 
and it's userland video driver modules do _everything_ WRT 
setting video modes, and configuring the hardware to blast 
pixels.

It can't do everything. When I run Enemy territory it switches to OpenGL 3D
mode. This can obviously not done from within XFree86, because if that would
be the case, I wouldn't have needed to download that kernel module and the
libraries. 

Indeed.  I think the key part of your message, and I'm in 
complete concurrence with you, is read the source Luke.  ;o)

I will do that. Now with your all help I know at least where I can start
reading. :)

xc/programs/Xserver/hw/xfree86/drivers

Thanks.

The source of the Nvidia proprietary drivers is in:

/dev/null

Actually the open sourced part is in 
/root/src/NVIDIA_kernel-1.0-4191
along with the closed module nvidia.o downloaded from 
ftp://download.nvidia.com/XFree86/Linux-x86/1.0-4496

So it seems there IS a kernel module to accompany XFree86. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Nvidia driver relation to XFree

2003-11-03 Thread Gerhard W. Gruber
I'm working on a kernel debugger which is similar to SoftICE on WIndows. I
would like to take advantage of the graphics mode when a user activates the
debugger under X and so I was investigating how to solve this. When I use
normal VGA mode it doesn't work on my card when I have X running while a
fellow coder has a similar card with also nvidia drvier and it works for him
(more or less). 
Now I wonder what is the relation of the video driver to X. What is happening
when i.e. the user changes to a console? X must save the current state of the
VGA card (i.e. resolution, frequency, etc.) and switch to a suitable console
mode. Similarily when the user switches back to X this has to be reversed and
the state restored. Now I wonder how exactly this is going to happen. Since
nvidia doesn't open it's code I can't look at it, but there has to be some
interface so that X can do this stuff without knowing the details of the
driver. Can I use this interface in kernel modules as well? I think it should
be possible.
Another thing is, that I would like to take advantage of the current display
and draw my window directly into the framebuffer. Is this possible? I know
that I can install the framebuffer support for the kernel and then I would
have an interface to do this, but I wonder how X is doing that. Can I get the
pointer to the framebuffer and use it, or is there some way to do this via an
interface through the driver. It is not exaclty clear to me on how X and
nvidia.o are related to each other.

Of course the same holds true for other cards, so the best solution for my
purpose would be to find some way that is more or less independent of the
card, but I guess this is to much to ask for. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-03 Thread Gerhard W. Gruber
On Mon, 03 Nov 2003 16:58:10 +, Torgeir Veimo [EMAIL PROTECTED] wrote:

You would probably need to use an XFree86 extension. Look at the DGA
extension.

I don't want to use X itself. I need to use this functionality from within a
kernel module, so I don't want to rely on a user space application. I just
want to know what is happening inside X to see if I can use at least some of
it for my project.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Nvidia driver relation to XFree

2003-11-03 Thread Gerhard W. Gruber
On Mon, 03 Nov 2003 10:08:37 -0800, Tim Roberts [EMAIL PROTECTED] wrote:

The video driver is part of XFree86.

I don't think that this is neccessarily true, or is it? I don'tknow how it is
for other cards but in case of NVidia you have this kernel module nvidia.o
which you need to load and in the Device section I specify as driver nvidia.
Of course it could be that this is just a name which coincides with the kernel
module name. I assumed that it is the name of the module that is the driver,
but I realize that this is not neccessarily so. Do you mean that this driver
also has some part within X itself? It owuld make sense I guess. But then
where is this particular module? Is this also some closed source stuff from
nVidia? At least I only had to download the kernel module and nothing else
because Suse is not allowed to bundle it with their distribution. I suppose,
that this would be true for a module within X as well.

Basically, yes.  It isn't usually necessary to save the graphics state;
the driver put the card in a graphics state initially, and since it still
knows the parameters requested in the XF86Config file, it can put the card
back into that state whenever it wishes.  However, the driver does have to

Well, at least it needs to know which mode it was, because I can configure
several modes and the switch shold restore the one that has been active when I
switched console.

The driver is part of XFree86.  Each driver has functions called
EnterVT and LeaveVT (where  depends on the driver name) that
implement the switch to and from a console (VT = virtual terminal).  Go
look through some of the drivers and you can see how it is done.

Is this the name of the driver mentioned in the XF86Config Device section? In
my case this would then be called nvidiaLeaveVT?

Absolutely not.  XFree86 drivers are just user-mode shared object files
loaded by the XFree86 executable.  They use a custom API and call a bunch
of user-mode functions.  They will not work in kernel mode.

But the call of the EnterVT/LeaveVT has to end up in the kernel module
somewhere, so I guess it should be possible to trace that and see what is
called.

Another thing is, that I would like to take advantage of the current display
and draw my window directly into the framebuffer. Is this possible?

Haven't we had this conversation before?

Well, it could be, because I asked this in several newsgroups. :) I sure never
posted it on the XFree mailinglist I think. :)

The XFree86 driver has INTIMATE knowledge of the specific graphics card. 
Typically, the driver goes out and reads the PCI configuration registers
(or allows XFree86 to do it) to get the physical addresses assigned to the
board.  Because the driver knows the card, it knows which of the addresses
is the frame buffer and which has the memory-mapped registers.  It maps
that space into user-mode address space, and starts writing.

And where can I find that code, which interacts with the driver? I think this
EnterLeaveVT functions are only a small part of this. Is the most of that card
dependent stuff in there as well?

nvidia.o is part of XFree86.  It is a dynamically-loaded library that
implements the same interface as all other XFree86 video drivers, and it
calls back in to the XFree86 executable and its other drivers for most of
its services.

Thanks. I see if I can locate this functions and what they do.

DGA is one was for you to take ownership of the frame buffer, but like all
of XFree86, it is a user-mode service.

Where can I find information about this?

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-11-01 Thread Gerhard W. Gruber
On Sat, 1 Nov 2003 11:55:08 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

the raise will raise ontop of everything - BUt something may raise itself above
your window immediately afterwards too...

Bad luck. :)

inputonly windows are invisible windows. you can map,unmap, move, resize, get
events (mouswe moves, button presses, key events etc.) on them, but they do not
visually do anything on the screen.

ok, that's what I want.

yes. every time a window is created (or destroyed etc. etc.) if you select for
the right event mask (structure  substructurenotify) x will tell u when the
root window and children of it change (created, destoryed, reparent, move,
resize, restack etc.) with events. this is close to what a window manager does
(close, but not quite). i'd definitely suggets the inputonly window. u will
never be ab;e to sensibly pass events on, but in the area of the screen the
inputonly window lives, you can eat all the events yourself :)

Can I monitor the mousemovment for all windows? Like a grab, but not that I
grab the events, just get a notification about an event. Another idea that
just occured is to monitor mousemovement and rais my window when the mouse is
in the area where I want it to be activated. Can this be done? And how would I
do this? Using a grab doesn't work but you guys always talk of polling the
root window or monitor it. How can this be done? Polling is only the last
ressort of course because it is not nice. :)

on-top stacking of your inputonly window) then if the mouse exits that toolbor,
hide it again. monitor stacking as mentioned above with structure 
substructurenotify mask set on root and handle the events. the problemn here is

This is similar to what the sidebar can do in Window, but I don't like it. It
always gets in the way because it pops up when you don't need it.

really gdk/gtk. i dont know how well it will deal with this. if u did it in xlib
u'd be fine, but i am not sure if gdk/gtk will be 100% happy. others might know
if ti will or will not.

If I have one solution either in X or in GTK then I can worry about the other.
If I have a GTK solution, thats fine. If I find an Xlib solution then I cann
see how to do it in GTK or do some wrapper for this. But first I have to find
at least ONE solution that works as I want it to. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-11-01 Thread Gerhard W. Gruber
On Fri, 31 Oct 2003 21:21:15 +, Raymond Jennings
[EMAIL PROTECTED] wrote:

You could fudge it if you have to.  Monitor your window for configure 
notify events, and poll the root window.  Whenever there is information 

How can I poll the root window? X sends me an XEvent when something happens,
at least if I told X to be notified, so I wonder how I can poll on this. But
polling is not really what I want to do. If I can find a way to monitor
mousemovement, without empeding the other applications like with a grab, then
I think I can also live with it.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window (ID20311056 ignore this number)

2003-11-01 Thread Gerhard W. Gruber
On Fri, 31 Oct 2003 21:24:46 +, Raymond Jennings
[EMAIL PROTECTED] wrote:

windows are visible (i.e. the X server will tell you that they exist, where 
they are, etc), but you can only receive events related to windows that YOU 
own.

I tried now to use that VisibilityNotify event but the problem is that my
window doesn't seem to get this event. Carsten said that this might be because
this event will not be sent for InputOnly windows, so I don't receive the
events I would need.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-31 Thread Gerhard W. Gruber
On Fri, 31 Oct 2003 10:52:44 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

no. the wm - or any app can go raising windows above yours... you cant clock
windows in place to be on top as such. (ok we can argue of some nasty hacks and
methods if you are the wm... but thats a world on its own.)

If I raise my window, how can I make sure that it is on top of all?

ok. for a normal window yes its possible to get events to know if you got
obscured. they are called visibilitynotify events. BUT i am actually not sure if
they will be received by inputonly windows. but thats the path you want to go.

Whats input only windows? How can I make sure my window is not an InputOnly
window but, whatever, else?

you could find if a window has been raised/lowered etc. by monitoring
creatnotifies on root, then on every windows created monitor structurenotifies
then look for configurenotify events and check the stacking sections (above,
window, event). again - i dont know how well gdk(gtk) supports this part of x so
you may have to dump into xlib.

I don'tneccessarily need to do that. If it is possible to make sure that my
window is raised on top off all, then I can simply monitor for this
visibillitynotify, and raise it anyway. If it is not possible to create other
window then this inputwindow then I can monitor this createnotify. How is this
working? Does root then send me an event everytime a window is created?

hmm how is it meant to work? mouse goes to left or right side of window,
launcher buttons pop up and u click one to run something?

Yes.  The nice thing of this tool is, that it always works. You don't need to
have a window or a bar or anything on the screen which you need to access. 

It's really usefull to have around, thats why I decided to port it to linux.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-30 Thread Gerhard W. Gruber
On Thu, 30 Oct 2003 08:20:52 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

basically you are competing with the wm. you need to basically hack/modify/patch
and work WITH the wm to do what you want. you cant do it on your own. now your
solution will be wm specific.

So it this means I have to use another way. :)

Creating a undecorated invisble window which always stays on top and is only
one pixel in width will be possible? This way I can align it the the border
the user chooses and then I will get the events for sure.

I suppose this should work independent of the WM, right? Do you by chance know
how to create such a window as a GtkWidget? If not, no problem, I hope I can
find some samples for this on the web.

Thanks for your explanation though. I wonder why such a thing never has been
implemented. From what I saw brwosing the web I'm not the only one who could
use this for some desktop tools. Also I wonder how event recorder will do
their job under X? Or is there nos such application for X? Tools similar to
WinRunner which capture all events and play them back later.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-30 Thread Gerhard W. Gruber
On Thu, 30 Oct 2003 19:18:31 + (GMT), Dr Andrew C Aitchison
[EMAIL PROTECTED] wrote:

I believe that the RECORD extension is what people use for that sort of 

Recording is not really what I need for my app, because I will only see the
events and can not prevent them from getting through to other apps. :)

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-30 Thread Gerhard W. Gruber
On Fri, 31 Oct 2003 08:51:07 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

you willonly then get events when the mouse passes over your thin window.

That's no problem as long as my window stays on top.

not as a widget - no. you'll have to jump down to gdk. i'm not sure if gdk
supports this though. you'll want an inputonly window thats a toplevel window
(immediate child of root) thats override-redirect. you'll need to also monitor

I managed to create an invisible window which is only one pixel in widht and
has the same height as the screen (hardcoded for now, how can I query the
current resolution?).  The only problem, I still have is, to make the window
stay on top of all others in order to always receive input events when the
user moves the mouse to the right border (or where he configured it).

Is it possible to create a window that always stays on top? Not only of it's
own application, but of all application windows.
If not, is it possible to get an event when my window is obscured or lowered
because another window has been raised over it? Actually getting the inof when
it is obscored would be enough because it only needs to stay accessible all
the time and for this it doesn't have to be the top window. And can I raise a
window above all others? I browsed the web for this, but it seems that is also
not possible. Everytime I think of a new way how to achieve what I need it
seems to be blocked by X. :(

all client windows, where they move, go etc. and follow i'm still not even
100% sure what it is you want to actually do (in overall aim)

You can take a look in the readme at
http://sourceforge.net/projects/launchmenu, there I explain it. Its just a
simple app that has been proven quite usefull to me over the years and I wrote
this for myself because the original source is not portable and the author
doesn't give away all the source anyway.
If you don't want to download the package, it is of course in the CVS as well.

there's a whole extension devoted to recording events - the xrecord extension -
but i know very little about it. :)

No prob. It wouldn't do what I need anyway. 

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-29 Thread Gerhard W. Gruber
On Wed, 29 Oct 2003 08:20:00 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

again - see my other reply. you've found a can of worms that basically x doesn't
do. ou COULD do this with mouse button presses (XGrabButton) and the dot he
XAllowEvent thing... but not just the mouse moving in general. you'd hit a

I don't need the mouse movements. I just need the buttons. I read something
today about XAllowEvents and I had the impression that this could do what I
wanted, but I can't put my finger on it, because I don't know enough about
Xlib.

limitation of x. you'd HAVE to extend X itself with an extension to do what you
are after (unless there is an extension of this i don't know of somewhere. i
know xtest wont do it for sure...)

Well, xtest is only a small program to test how I can achieve this. I never
claimed it would do this and it also isn't finished. It just that, a
testprogram so that I don't have to deal with a fullblown application and GTK
and wxWindows also.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-29 Thread Gerhard W. Gruber
On Wed, 29 Oct 2003 08:17:30 +1100, Carsten Haitzler (The Rasterman)
[EMAIL PROTECTED] wrote:

this has issues all of its own. first. other peoples windows need to get the
correct event at the correct location and time - which now won't be right as
windows may have been destroyed, created, shown and hidden, moved and resized,

I don't see a problem with this. 1) Why is the timing so critical? The delay
should be very small because I just check the event type and would pass it
right back on. And 2) even if the timing is wrong, what's the deal? I capture
all the events and pass it back (If I manage to find out how this can be
done), so the timing is delayed for a, more or less, constant factor. It's not
as if my application is real time ciritical, its just a small desktop helper
tool. X always has to deal with events not sent to the proper window because
of destruction or other things. 

to re-construct the event to send. your chances of getting this correct are
getting slimmer by the second, ESPECIALLY since X is an synchronous environment,

I sure don't want to write something like a windowmanager just to support my
app. :)

also since you have the mouse grabbed to your window (unless you use a big
input-only window on top of everything... another can of worms on its own), this

I don't have a window and I don't want a proxy window. I would like to use the
desktop root window.

i can probably find more holes to poke in it all - but suffice to say however
you look at it you'll NEVER get it right. your only choice to find out what the
mouse is doing outside windows you're listening for events on is to poll. you
cannot intercept and optionally not send an event.

Suppose I would poll for it then there would still be two questions:

1) How can I poll for this?
2) What do I do if a find that my criteria is met. The requirement is that in
that case I should suppress the original message and do my own processing. How
can I achieve this?

It wouldn't do to scan for Mousebuttonpress and then display the menu and the
original app also displays it's context menu. This would be ugly and confusing
for the user.

this is actually one of x's downfalls which should be fixed. the ability to
monitor events globally/in general without having to specifically select on
them on target windows. then add the ability to allow/disallow them to go to the
next guy listening (first in first served ala the wm?).

Yes. That's what the MS Windows Hook mechanism do. There are also limitations,
but I managed to work around this to get the tool  working mostly as I want it
to, though it can use some improvements, but for now I'm content until I can
get the linux version working as well.

-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Capturing events from the root window

2003-10-28 Thread Gerhard W. Gruber
On Tue, 28 Oct 2003 15:53:39 +0100, Robert Woerle [EMAIL PROTECTED]
wrote:

it should work with XSendEvent shoudlnt it ??

I don't know. From what you told me I looked agina in the manuals and it
sounds like it should, but it doesn't.

Below is the code that I use in my small test programm. It grabs the pointer
events andthis works, as I recive all events no matter where I click, but I
played around with all settings of XSendEvent and I found no way where the
desktop resumed normal operation, as it should. My desktop runs at 1600x1200
this is why I have the if x = 1599.
---

#include stdio.h
#include Xlib.h
#include unistd.h

static int *
null_X_error (Display * d, XErrorEvent * e)
{
  static int already = 0;

  /* The warning is displayed only once */
  if (already != 0)
return (NULL);
  already = 1;

  printf (\n*** Warning ***\n);
  printf (Please, verify that there is not another program which grabs the
mouse\n);

  return (NULL);
}

int
main (int argc, char *argv[])
{
  Display *d;
  XEvent e;
  char *dn;
  long mask;

  dn = XDisplayName(NULL);
  if(dn == NULL)
   printf(Error getting display name\n);

  d = XOpenDisplay(dn);
  if(d == NULL)
   printf(Error!\n);

  XAllowEvents(d, AsyncBoth, CurrentTime);
  XSelectInput(d, DefaultRootWindow(d), ButtonPressMask | ButtonReleaseMask);

  XGrabButton (d, AnyButton, AnyModifier, DefaultRootWindow(d),
   False, ButtonPressMask | ButtonReleaseMask,
   GrabModeAsync, GrabModeAsync, None, None);

  XSetErrorHandler ((XErrorHandler) null_X_error);
  while(1)
  {
   printf(Waiting\n);
   XNextEvent(d, e);
   printf(Type: %u\n, e.type);
   mask = NoEventMask;
   switch (e.type)
   {
   case ButtonPress:
   {
if(e.xbutton.x != 1599)
{
 printf(ButtonPress: %u %u/%u\n, 
e.xbutton.button,
e.xbutton.x, e.xbutton.y);
 printf(Display: %08lX Window: %lu   Root: 
%lu  Sub: %lu\n,
e.xbutton.display, e.xbutton.window, e.xbutton.root, e.xbutton.subwindow);
 mask = ButtonPressMask;
}
   }
   break;

   case ButtonRelease:
   {
if(e.xbutton.x != 1599)
{
 printf(ButtonRelease: %u %u/%u\n, 
e.xbutton.button,
e.xbutton.x, e.xbutton.y);
 printf(Display: %08lX Window: %lu   Root: 
%lu  Sub: %lu\n,
e.xbutton.display, e.xbutton.window, e.xbutton.root, e.xbutton.subwindow);
 mask = ButtonReleaseMask;
}
   }
   break;
   }
// if(mask != NoEventMask)
XSendEvent(e.xbutton.display, InputFocus, False, mask, e);
  }

  return 0;
}

 


-- 
Gerhard Gruber

Für jedes menschliche Problem gibt es immer eine einfache Lösung:
Klar, einleuchtend und falsch. (Henry Louis Mencken)

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel