all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathias Dahl <mathias.dahl@gmail.com>
Subject: Re: raise frame no go
Date: Thu, 04 Jan 2007 02:34:48 +0100	[thread overview]
Message-ID: <m23b6rd16v.fsf@gmail.com> (raw)
In-Reply-To: mailman.2165.1166663239.2155.help-gnu-emacs@gnu.org

Leo <sdl.web@gmail.com> 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
         http://freedesktop.org/wiki/Standards_2fwm_2dspec

         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))); */
    }
  else
    x_lower_frame (f);
}

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

/Mathias

       reply	other threads:[~2007-01-04  1:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2165.1166663239.2155.help-gnu-emacs@gnu.org>
2007-01-04  1:34 ` Mathias Dahl [this message]
2007-01-04  5:22   ` raise frame no go Leo
     [not found] <m2ac0z5q7a.fsf@sl392.st-edmunds.cam.ac.uk>
     [not found] ` <459CE81B.2090201@swipnet.se>
     [not found]   ` <uhcv61o2b.fsf@gnu.org>
2007-01-06 12:32     ` Jan Djärv
2007-01-07  3:47       ` Richard Stallman
2007-01-08  7:43         ` Jan Djärv
2007-01-07 15:45       ` Stefan Monnier
2007-01-07 16:58         ` Mathias Dahl
2007-01-13 19:04           ` Mathias Dahl
2007-01-08  7:45         ` Jan Djärv
2007-01-08 15:19           ` Stefan Monnier
2007-01-08 17:40             ` Jan Djärv
2007-01-08 23:34               ` Stefan Monnier
2007-01-09  7:18                 ` Jan Djärv
2007-01-10 21:47                   ` Miles Bader
2007-01-11  0:28                     ` Chris Moore
2007-01-11  7:48                     ` Jan Djärv
2007-09-23 11:35       ` Leo
2007-09-24  5:53         ` Jan Djärv
2007-09-24  8:40           ` Leo
2006-12-21  1:06 Leo
2006-12-21  1:17 ` Juanma Barranquero
2006-12-21  1:34   ` Leo

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

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

  git send-email \
    --in-reply-to=m23b6rd16v.fsf@gmail.com \
    --to=mathias.dahl@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.