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: Wed, 24 Jan 2007 21:10:43 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

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.




reply via email to

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