emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs X/GTK code trouble with Maemo


From: Jan Djärv
Subject: Re: Emacs X/GTK code trouble with Maemo
Date: Tue, 23 Jan 2007 08:16:08 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070102)



Ted Zlatanov skrev:
I'm having a problem with the Emacs X code.  Specifically, on the
Maemo platform, standard GTK widgets that accept text entry will get a
pop-up keyboard.  With Emacs, however, I am not able to get that
keyboard with Emacs buffer windows.  I was pointed to some
documentation, which suggests that either I need to use standard GTK
widgets or manually call the functions Window::AcquireKeyboardInput()
and Window::ReleaseKeyboardInput(), plus handle some X events.

I'm using this post as reference:
http://www.gossamer-threads.com/lists/maemo/developers/13600?search_string=input;#13600

Plus these snippets:
https://garage.maemo.org/snippet/browse.php?by=lang&lang=2

You can get more information about input methods for Maemo here:
http://maemo.org/platform/docs/tutorials/Maemo_tutorial.html#input

You can install the Maemo SDK easily on a Debian system:
http://maemo.org/platform/docs/howtos/Maemo_tutorial_bora.html

My questions:

1) are buffer windows text-input-capable GTK widgets when --with-gtk
is used?  If yes, something is going wrong in the setup phase, and
they don't accept keyboard input when they should.

No, buffer windows are GTK drawing areas. Text is handeled with X primitives, like XDrawImageString. GTK text input widgets just don't have what it takes to handle all Emacs requirements for text. Also, there is no GTK-specific drawing code for text, it is generic for all X platforms.


2) Assuming "no" to (1), if I have to use the manual acquire/release
keyboard functions, where would I make that change?  I couldn't find a
gain/lose focus event in the C code.  Also, where would I handle the X
events?  I need to handle them to tell Maemo that the keyboard is safe
to bring up.

The main event loop is, as you say below, in src/xterm.c:XTread_socket. The individual events are handeled in handle_one_xevent. Focus changes are dealt with in x_focus_changed.

I think I can use src/window.c:select-window() to acquire the
keyboard.  X Events seem to be processed in
src/xterm.c:XTread_socket().  My inexperience with GTK and X, however,
is making it hard for me to understand what's going on, and I would
like some help from people that understand the Emacs X internals better.

        Jan D.




reply via email to

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