unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: embedding gtk widgets in a buffer
Date: Sun, 11 May 2008 14:48:55 +0200	[thread overview]
Message-ID: <m37ie1uhu0.fsf@verona.se> (raw)
In-Reply-To: <m3fxspuu1f.fsf@verona.se> (joakim@verona.se's message of "Sun, 11 May 2008 10:25:16 +0200")

joakim@verona.se writes:

> Richard M Stallman <rms@gnu.org> 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




  parent reply	other threads:[~2008-05-11 12:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 23:23 embedding gtk widgets in a buffer joakim
2008-05-08  0:21 ` joakim
2008-05-08  9:02 ` BVK
2008-05-08 22:28 ` Richard M Stallman
2008-05-08 23:13   ` joakim
2008-05-08 23:24     ` Lennart Borgman (gmail)
2008-05-10  8:55     ` Richard M Stallman
2008-05-10 11:55       ` joakim
2008-05-10  8:55     ` Richard M Stallman
2008-05-10  9:58       ` joakim
2008-05-10 10:22         ` Lennart Borgman (gmail)
2008-05-11  7:34         ` Richard M Stallman
2008-05-09  8:34   ` YAMAMOTO Mitsuharu
2008-05-10 21:07 ` joakim
2008-05-11  7:35   ` Richard M Stallman
2008-05-11  8:25     ` joakim
2008-05-11 12:32       ` David Kastrup
2008-05-11 12:48       ` joakim [this message]
2008-05-11 12:58         ` Lennart Borgman (gmail)
2008-05-12  4:38           ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37ie1uhu0.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).