[Top][All Lists]

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

[gmane.emacs.help] Re: raise frame no go

From: Leo
Subject: [gmane.emacs.help] Re: raise frame no go
Date: Thu, 04 Jan 2007 05:14:01 +0000
User-agent: Gnus v5.11, Emacs/ (2007-01-01), Fedora 6 gnu/linux

--- Begin Message --- Subject: Re: raise frame no go Date: Thu, 04 Jan 2007 02:34:48 +0100 User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)
Leo <address@hidden> writes:

> I want to use emacsclient to bring Emacs frame to the front. I tried
> several functions including raise-frame, x-focus-frame etc, but none
> of them worked. All they do is causing the Emacs frame to flash in
> the taskbar. Any ideas?
> This is tested in Gnome 2.16 in Fedora 6.
> Emacs 23: 20061218.

I just wanted to mention that I have the same problem. Running CVS
Emacs as of 2007-01-1 under Mandriva GNU/Linux, using GNOME with its
Metacity window manager. What I do is this:

 $ emacsclient -e "(my-function)"

and my-function is:

(defun my-function ()
 (select-frame-set-input-focus (selected-frame)))

(well, of course it does more than that but...)

Up until today I haven't played with emacsclient under GNU/Linux. I
have just used gnuclient & friends under w32. I am currently coding a
small command/url/hatever launcher in Emacs, and the current behavior
is quite frustrating (when Emacs is not the topmost window).

I see this code in xterm.c:

XTframe_raise_lower (f, raise_flag)
     FRAME_PTR f;
     int raise_flag;
  if (raise_flag)
      /* The following code is needed for `raise-frame' to work on
         some versions of metacity; see Window Manager
         Specification/Extended Window Manager Hints at

         However, on other versions (metacity 2.17.2-1.fc7), it
         reportedly causes hangs when resizing frames.  */

      /* Lisp_Object frame;
         const char *atom = "_NET_ACTIVE_WINDOW"; */

      x_raise_frame (f);

      /* XSETFRAME (frame, f);
         Fx_send_client_event (frame, make_number (0), frame,
                            make_unibyte_string (atom, strlen (atom)),
                            make_number (32),
                            Fcons (make_number (1),
                                   Fcons (make_number (time (NULL) * 1000),
                                   Qnil))); */
    x_lower_frame (f);

Is is that piece of code that fails? My version of metaciy is 2.16.1.


--- End Message ---

Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

reply via email to

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