emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embedding gtk widgets in a buffer


From: joakim
Subject: Re: embedding gtk widgets in a buffer
Date: Sun, 11 May 2008 14:48:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

address@hidden writes:

> Richard M Stallman <address@hidden> writes:

>> Many programs would need to get keyboard focus.
>> The xembed should set up a keymap with a command
>> to give the focus to that program.
>>
>> That command could be RET and/or C-c C-c.


Apparently this line in xterm.c steals kbd input:

          /* Don't pass keys to GTK.  A Tab will shift focus to the
             tool bar in GTK 2.4.  Keys will still go to menus and
             dialogs because in that case popup_activated is TRUE
             (see above).  */
          *finish = X_EVENT_DROP;

When commented out, kbd input goes to embedder and embedded alike, which
is not very convenient of course.

Even though the case of embedding an emacs within an emacs is probably
not a real world case, it exposes problems all more complex application
embedding will have. Keyboard events would need to be filtered by the
embedding emacs, and forwarded to the embedee on a key-by-key basis.

The simplest filter would have 2 states and work somewhat like:
1: send nothing to the embedee
2: send everything except c-c c-c to the embedee

c-c c-c could toggle between states. (initially I will probably have
some single key for this for simplicity)

This is not perfect in general since one might want to send c-c c-c to
the embedee sometimes, but should be good enough to start with. A
separate command might be made to send a synthetic c-c c-c to the
embedee if needed.

A brief summary of current issues with this patch:
- xwidgets currently only works in 1 window in 1 frame.
- some graphics bugs when moving widgets.
- keyboard handling of xembedded widgets.

All issues seems to be solvable.


-- 
Joakim Verona




reply via email to

[Prev in Thread] Current Thread [Next in Thread]