From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Add function to make frame topmost? Date: Mon, 3 May 2010 14:47:23 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1272890899 4170 80.91.229.12 (3 May 2010 12:48:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 May 2010 12:48:19 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 03 14:48:18 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O8v4M-0005kb-Km for ged-emacs-devel@m.gmane.org; Mon, 03 May 2010 14:48:18 +0200 Original-Received: from localhost ([127.0.0.1]:58848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8v4L-0005GY-Ra for ged-emacs-devel@m.gmane.org; Mon, 03 May 2010 08:48:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8v3r-0005Am-B2 for emacs-devel@gnu.org; Mon, 03 May 2010 08:47:47 -0400 Original-Received: from [140.186.70.92] (port=50637 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8v3p-0005AE-OL for emacs-devel@gnu.org; Mon, 03 May 2010 08:47:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8v3o-0004vE-8d for emacs-devel@gnu.org; Mon, 03 May 2010 08:47:45 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:60776) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8v3o-0004uz-3q for emacs-devel@gnu.org; Mon, 03 May 2010 08:47:44 -0400 Original-Received: by fxm1 with SMTP id 1so2097683fxm.0 for ; Mon, 03 May 2010 05:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=1RO1Nl7dF19v0GgE3WAyyhsMOPbdqVYIa5sFRlMwcxU=; b=WP0Y2xhiHw5esBIN5zgW80vy4r1asJxLE6p73UIfFLP6iJwPLKymqYZS6CpHFH8Pk7 ejOhm3klTS6crgyCNAGLYUKfEI4wzf/MrCWAZQeD8wgBt+1NX7FNZFnb7I2n/2eIEKWc x4e9sooA50im/+VGds3NWKADL54iPS6D4ieCc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=R1pL6OHgt6pSKnw3t79rap0w9ttG33uLej15pTyr8Auus6U8RSryZUONXIEfiX8Io8 WV57OQ59awm6uPqGQo1IOvNdx7HR5mYQsvxGPL8tX8YXj4d5C+oLQlmox3K7RaT+PAKc 85rFk8V3XVa9numFmmR0JsC/6z3HDInU9xqZI= Original-Received: by 10.239.180.19 with SMTP id f19mr1449697hbg.91.1272890863144; Mon, 03 May 2010 05:47:43 -0700 (PDT) Original-Received: by 10.239.164.81 with HTTP; Mon, 3 May 2010 05:47:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124471 Archived-At: On Fri, Apr 30, 2010 at 3:48 AM, Lennart Borgman wrote: > Could something like this please be added to w32fns.c? > > DEFUN ("x-set-frame-topmost", Fx_set_frame_topmost, > Sx_set_frame_topmost, 1, 3, 0, > =C2=A0 =C2=A0 =C2=A0 doc: /* Make frame FRAME topmost if TOP, otherwise n= ot topmost. > When ACTIVATE try to activate freme. */) > =C2=A0 =C2=A0 (frame, top, activate) > =C2=A0 =C2=A0 Lisp_Object frame, top, activate; > { > =C2=A0FRAME_PTR f =3D check_x_frame (frame); > =C2=A0HWND hwndInsertAfter =3D NILP (top) ? HWND_NOTOPMOST : HWND_TOPMOST= ; > =C2=A0UINT swp_flags =3D SWP_NOMOVE | SWP_NOSIZE; > =C2=A0if (NILP (activate)) swp_flags =3D swp_flags | SWP_NOACTIVATE; > =C2=A0BLOCK_INPUT; > =C2=A0/* non-zero success, 0 fail + use GetLastError. */ > =C2=A0SetWindowPos (FRAME_W32_WINDOW (f), hwndInsertAfter, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00, 0, 0, 0, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0swp_flags); > =C2=A0UNBLOCK_INPUT; > =C2=A0return Qnil; > } The frame is not always redrawn as I expected. It looks like I need to tell Emacs to redraw the frame after this. How do I do that?