QXEmbed grabbing mouse

Owen Taylor otaylor at redhat.com
Thu Nov 21 00:39:12 GMT 2002


I don't really have enough context here, but certainly focus shold be
fully handled in both the the original XEMBED protocol and the revised
version that I posted last spring.

When the client app needs to get the focus, what it does is send a
XEMBED_REQUEST_FOCUS event to the embedder, and the embedder responds
by giving focus to the client.

See:

 http://www.freedesktop.org/standards/xembed/html/messages.html

As I recall, this worked properly in my test app for QXEmbed within
QXEmbed as well as in mixed QXEmbed/GTK+ embedding.

Regards,
                                        Owen

Havoc Pennington <hp at redhat.com> writes:

> Hi,
> 
> Have Matthias and Owen weighed in on this issue? Shouldn't it be
> covered in the XEMBED spec if the host app needs to take special
> action?
>
> On Wed, Nov 20, 2002 at 03:24:33PM -0800, Charles Samuels wrote:
> > 
> > I see.
> > 
> > But why is it necessary to have a mouse grab, specifically, can't you set and
> > release focus without a grab?
> > 
> > (P.S., I worked around it by doing an X ungrab call in the mouse click
> > handler)
> > 
> > On Wednesday 20 November 2002 02:46 pm, Koos Vriezen wrote:
> > > Hi,
> > >
> > > I don't have write access on kde-core-devel but I added the mouse grabbing
> > > stuff. It was added so that QXEmbed is notified that there was a mouse
> > > click on the embedded application and set the focus accordantly.
> > > Before the patch, the host app was unaware of this. It resulted in khtml
> > > with a Java applet inside a HTML page, both having a text box, that both
> > > text boxes had blinking cursors. It was then impossible to type text in
> > > the Java text box.
> > > I did test it with other apps using QXEmbed like kicker and
> > > nspluginviewer. Didn't find any problems. Patch was also discussed on
> > > kfm-devel.
> > > I don't have a workaround for you, but now the QXEmbed widget is aware of
> > > mouse clicks of the embedded app which it didn't have before. (Maybe
> > > override QXEmbed::x11Event(..) and check ButtonPress/ButtonRelease?)




More information about the kde-core-devel mailing list