You are not logged in.

woshilaolei

Beginner

  • "woshilaolei" started this thread

Posts: 5

Location: China

Occupation: student

  • Send private message

1

Monday, November 14th 2005, 3:04pm

Mouse event can be passed to system directerly?

when i click the right button of the mouse ,
how can i ignore the mouse event and pass this event to the system.
just as the click is happened on the desktop ?
I am a newer to KDE

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Monday, November 14th 2005, 6:17pm

I am afraid I don't understand.

You mean passing a click that happens in your application to the application handling the desktop`

Cheers,
_
Qt/KDE Developer
Debian User

woshilaolei

Beginner

  • "woshilaolei" started this thread

Posts: 5

Location: China

Occupation: student

  • Send private message

3

Tuesday, November 15th 2005, 1:26am

yes , I just mean that !
when click the right button on the desktop , there will be a popup
menu for us to do something , and I want to know when i click the right button on my application ,can it act like that the click event ignore
by my application and passing to the system(x window?) then the popup menu disappeared.
I am a newer to KDE

This post has been edited 1 times, last edit by "woshilaolei" (Nov 15th 2005, 1:27am)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

4

Tuesday, November 15th 2005, 6:42pm

Hmm, I am pretty sure it is possible to send an event to the root window or the desktop application using Xlibs functions.

But what do you need it for?

Cheers,
_
Qt/KDE Developer
Debian User

woshilaolei

Beginner

  • "woshilaolei" started this thread

Posts: 5

Location: China

Occupation: student

  • Send private message

5

Wednesday, November 16th 2005, 1:47am

yes I mean the desktop ,which function can i use from xlibs to realize such effect ?
I am a newer to KDE

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

6

Wednesday, November 16th 2005, 8:49am

No idea, XSendEvent maybe.

But you better ask that on a forum or mailinglist for X11 development.

And I still wonder why you would want to do that.

Cheers,
_
Qt/KDE Developer
Debian User

woshilaolei

Beginner

  • "woshilaolei" started this thread

Posts: 5

Location: China

Occupation: student

  • Send private message

7

Wednesday, November 16th 2005, 8:58am

thanks very much!
I just write a little application
the app can show transparent and i want the right click on the app
just like click on the desktop.

and there is still another question:
the krootpixmap can give the form a transparency effctive
but the icon in the desktop can not be showed on the form?
e.x: when i get a transparent form , i move the form above the "Trash"
icon on the desktop ,but the icon is ignored in the form ,it is the backgroud below the "Trash" icon presented in the form.
so how can i get a form just like a lens ?
I am a newer to KDE

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

8

Wednesday, November 16th 2005, 10:53am

It is just faking transparency by getting the background image and redisplaying the part it would cover.

Real transparency is available on X server with composite extension and a running composition manager.

If you want to pass events to the root window for parts where your application is transparent, you might want use a window mask instead which makes your window leaving out that portion.

That is assuming masks also work for "holes" in windows, not just for different border shapes.

Cheers,
_
Qt/KDE Developer
Debian User

woshilaolei

Beginner

  • "woshilaolei" started this thread

Posts: 5

Location: China

Occupation: student

  • Send private message

9

Wednesday, November 16th 2005, 1:45pm

may you give me more details ?
what does window mask mean ?
Is that give some mask to the window construction function and then
the window will acted as there is a hole in it?

if it is , which function to use ?( i have google thhe "window mask" and "holes" but i get nothing :()
I am a newer to KDE

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

10

Thursday, November 17th 2005, 4:56pm

That was assuming that you are using Qt.

You can set a mask on a Qt widget using QWidget::setMask

Anyway, this is really offtopic on the KDE user forum.

If you are using Qt try qtforum.org
if you are using something different, use an appropriate forum or mailinglist for whatever it is.

Cheers,
_
Qt/KDE Developer
Debian User