From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs X/GTK code trouble with Maemo
Date: Wed, 24 Jan 2007 21:10:43 +0100 [thread overview]
Message-ID: <45B7BD43.20102@swipnet.se> (raw)
In-Reply-To: <g69veiww8xl.fsf@dhcp-65-162.kendall.corp.akamai.com>
Ted Zlatanov skrev:
> Jan,
>
> I just wanted to ask how to obtain the GDK window for a frame. Right
> now I'm using:
>
> GdkWindow *gdkWindow;
> im_context = gtk_im_multicontext_new();
> gdkWindow = gdk_window_foreign_new(FRAME_X_WINDOW(frame));
> gtk_im_context_set_client_window(im_context, gdkWindow); /* we need the frame's GDK window */
> hildon_gtk_im_context_show(im_context);
> xassert (im_content != NULL);
>
> to set the IM context for a "fake" GDK window around the frame's X
> window. I'd like to get the real GDK window, the one used for
> drawing. If we don't use a GDK window, when should I create the fake
> one mentioned above? Right now, I'm doing it on FocusIn events in
> src/xterm.c:x_focus_changed(), which I'm sure is the wrong place.
>
FRAME_X_OUTPUT (frame)->edit_widget->window;
> I looked at all the macros in frame.h, but couldn't find what I
> needed.
>
> The current patch (very preliminary) is attached if you or anyone else
> have the time to look at it.
>
There are lots of whitespace changes, I'm sure you can rearrange the code so
that does not happen.
You should save the atoms you intern in the dpyinfo structure instead of
interning them for each event. And there should of course be some suitable
#ifdef around your code.
Jan D.
prev parent reply other threads:[~2007-01-24 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-15 20:06 porting and packaging Emacs to a new platform: Maemo Ted Zlatanov
2007-01-22 21:43 ` Emacs X/GTK code trouble with Maemo (was: porting and packaging Emacs to a new platform: Maemo) Ted Zlatanov
2007-01-23 7:16 ` Emacs X/GTK code trouble with Maemo Jan Djärv
2007-01-23 16:31 ` Ted Zlatanov
2007-01-24 18:56 ` Ted Zlatanov
2007-01-24 19:57 ` Ted Zlatanov
2007-01-24 20:10 ` Jan Djärv [this message]
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=45B7BD43.20102@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
--cc=tzz@lifelogs.com \
/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).