unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Andrus <IAndrus@omniture.com>
To: "3792@emacsbugs.donarmstrong.com" <3792@emacsbugs.donarmstrong.com>
Subject: bug#3792: #3792 - 23.1.50; other-window misbehaving with C-tab keybinding - Emacs bug report logs
Date: Mon, 13 Jul 2009 11:17:45 -0600	[thread overview]
Message-ID: <C680C85A.8FC24%iandrus@omniture.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 56 bytes --]

Resending patch (properly formatted this time I hope).

[-- Attachment #1.2: Type: text/html, Size: 304 bytes --]

[-- Attachment #2: emacs.patch --]
[-- Type: application/octet-stream, Size: 1544 bytes --]

--- nsterm.m	06 Jul 2009 21:46:57 -0600	1.76
+++ nsterm.m	10 Jul 2009 09:11:20 -0600
@@ -218,6 +218,15 @@
    Mode 0 is normal anti-aliasing, mode 1 is no anti-aliasing, and mode 2 is
    4-bit pixel-aligned anti-aliasing (the old QuickDraw standard). */
 extern void CGContextSetFontRenderingMode (CGContextRef cg, int v);
+
+/* This will tell us whether this particular version of OS X sends
+   keyDown events for control-tab.  Apparently some versions do and
+   some don't.  If they don't, then we have to emulate it by using
+   keyUp events instead, but if they do then we don't want to send
+   both.
+*/
+static BOOL ns_sends_control_tab_keydown = NO;
+
 #endif


@@ -4456,6 +4456,16 @@
   static NSMutableArray *nsEvArray;
   static BOOL firstTime = YES;

+#ifdef NS_IMPL_COCOA
+  /* I think these will get set again later, but we need them now
+     before ns_fake_keydown is changed. */
+  flags = [theEvent modifierFlags];
+  code = [theEvent keyCode];
+  if (!ns_fake_keydown && code == 0x30 && (flags & NSControlKeyMask) && !(flags & NSCommandKeyMask)) {
+    ns_sends_control_tab_keydown = YES;
+  }
+#endif
+
   NSTRACE (keyDown);

   /* Rhapsody and OS X give up and down events for the arrow keys */
@@ -4628,6 +4628,8 @@
    If it matches one of these, send it on to keyDown. */
 -(void)keyUp: (NSEvent *)theEvent
 {
+  if ( ns_sends_control_tab_keydown )  return;
+
   int flags = [theEvent modifierFlags];
   int code = [theEvent keyCode];
   if (code == 0x30 && (flags & NSControlKeyMask) && !(flags & NSCommandKeyMask))

             reply	other threads:[~2009-07-13 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 17:17 Ivan Andrus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-10 15:13 bug#3792: #3792 - 23.1.50; other-window misbehaving with C-tab keybinding - Emacs bug report logs Ivan Andrus
2009-07-11 17:55 ` Harald Maier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=C680C85A.8FC24%iandrus@omniture.com \
    --to=iandrus@omniture.com \
    --cc=3792@emacsbugs.donarmstrong.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).