From: Jarek Czekalski <jarekczek@poczta.onet.pl>
To: 17408@debbugs.gnu.org
Subject: bug#17408: 24.4.50; tooltips make ms-window go top
Date: Tue, 06 May 2014 16:46:37 +0200 [thread overview]
Message-ID: <5368F5CD.2090504@poczta.onet.pl> (raw)
In-Reply-To: <536794D9.9000406@poczta.onet.pl>
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
Actually a complete solution was even easier. First I noticed that a
Java app I use (muCommander) also retreats from displaying tooltips when
the app is inactive. Then a Google search gave me this JDK bug report
[1]. And once the SWP_NOOWNERZORDER flag was mentioned, the rest was a
walk in a park.
Double checking what flags others use for their tooltips revealed
nothing more, see this for example [3].
Attaching a patch that applies this flag to our tooltip SetWindowPos [2]
invocations, in w32fns.c. Works for me. Tested on trunk and emacs24.
If you agree, I might commit this to emacs24.
Jarek
[1] http://bugs.java.com/view_bug.do?bug_id=6770457
[2]
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx
[3] http://www.vtdev.com/net/tooltip.html
[-- Attachment #2: tooltips_1_00.patch --]
[-- Type: text/plain, Size: 1989 bytes --]
=== modified file 'src/ChangeLog'
--- src/ChangeLog 2014-05-05 17:37:43 +0000
+++ src/ChangeLog 2014-05-06 13:59:45 +0000
@@ -1,3 +1,9 @@
+2014-05-06 Jarek Czekalski <jarekczek@poczta.onet.pl>
+
+ Stop tooltips pulling Emacs window to front (Bug#17408).
+ * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
+ SetWindowPos invocations.
+
2014-05-05 Jan Djärv <jan.h.d@swipnet.se>
* nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
=== modified file 'src/w32fns.c'
--- src/w32fns.c 2014-03-21 09:23:22 +0000
+++ src/w32fns.c 2014-05-06 13:50:02 +0000
@@ -5984,6 +5984,7 @@
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
ptrdiff_t count = SPECPDL_INDEX ();
+ #define SWP_EMACS_TOOLTIP (SWP_NOACTIVATE | SWP_NOOWNERZORDER)
specbind (Qinhibit_redisplay, Qt);
@@ -6036,12 +6037,12 @@
/* Put tooltip in topmost group and in position. */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
root_x, root_y, 0, 0,
- SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOSIZE | SWP_EMACS_TOOLTIP);
/* Ensure tooltip is on top of other topmost windows (eg menus). */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP,
0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOMOVE | SWP_NOSIZE | SWP_EMACS_TOOLTIP);
unblock_input ();
goto start_timer;
@@ -6239,12 +6240,12 @@
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
root_x, root_y,
rect.right - rect.left + FRAME_COLUMN_WIDTH (f),
- rect.bottom - rect.top, SWP_NOACTIVATE);
+ rect.bottom - rect.top, SWP_EMACS_TOOLTIP);
/* Ensure tooltip is on top of other topmost windows (eg menus). */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP,
0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOMOVE | SWP_NOSIZE | SWP_EMACS_TOOLTIP);
/* Let redisplay know that we have made the frame visible already. */
SET_FRAME_VISIBLE (f, 1);
next prev parent reply other threads:[~2014-05-06 14:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 13:40 bug#17408: 24.4.50; tooltips make ms-window go top Jarek Czekalski
2014-05-05 13:56 ` Eli Zaretskii
2014-05-05 14:19 ` Jarek Czekalski
2014-05-05 14:47 ` Eli Zaretskii
2014-05-05 15:18 ` Jarek Czekalski
2014-05-05 15:42 ` Eli Zaretskii
2014-05-06 14:46 ` Jarek Czekalski [this message]
2014-05-06 15:08 ` Eli Zaretskii
2014-05-06 15:26 ` Jarek Czekalski
2014-05-06 16:06 ` Jarek Czekalski
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=5368F5CD.2090504@poczta.onet.pl \
--to=jarekczek@poczta.onet.pl \
--cc=17408@debbugs.gnu.org \
/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.