Closed Bug 61439 Opened 25 years ago Closed 25 years ago

autocomplete-window does not allow to enter "@" (altgr key ignored)

Categories

(MailNews Core :: Composition, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: futzilogik, Assigned: bstell)

References

Details

(Keywords: intl, Whiteboard: [PDT+] r=blizzard, rs=alecf, a=chofmann critical for 0.9.2)

Attachments

(21 files)

353 bytes, text/plain
Details
353 bytes, text/plain
Details
824 bytes, application/octet-stream
Details
3.65 KB, text/plain
Details
4.93 KB, patch
Details | Diff | Splinter Review
2.60 KB, application/octet-stream
Details
10.14 KB, patch
Details | Diff | Splinter Review
14.54 KB, patch
Details | Diff | Splinter Review
16.34 KB, patch
Details | Diff | Splinter Review
17.00 KB, patch
Details | Diff | Splinter Review
2.75 KB, application/octet-stream
Details
2.77 KB, application/octet-stream
Details
2.51 KB, patch
Details | Diff | Splinter Review
648 bytes, patch
Details | Diff | Splinter Review
2.82 KB, application/octet-stream
Details
12.43 KB, patch
Details | Diff | Splinter Review
15.50 KB, patch
Details | Diff | Splinter Review
14.81 KB, patch
Details | Diff | Splinter Review
3.21 KB, application/octet-stream
Details
13.54 KB, text/plain
Details
14.84 KB, patch
Details | Diff | Splinter Review
If the autocomplete window for e-mail-addresses is shown and I enter "@" (on my keyboard this is ALT-Q), character "q" appears. Same for all other 'ALT-characters'.
the problem also applies to autocomplete for web addresses
Summary: autocomplete-window for e-mail-addresses does not allow to enter "@" → autocomplete-window does not allow to enter "@"
similarly here, with a norwegian keyboard where AltGr+2 is the @ While the autocomplete popdown is active it "eats" the other keypress, so AltGr isn't recognized. (I keep typing "2" in other words) The bug has been around a couple of weeks now. ID 2000112521
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 61724 has been marked as a duplicate of this bug. ***
Modifying summary
Summary: autocomplete-window does not allow to enter "@" → autocomplete-window does not allow to enter "@" (altgr key ignored)
reassigning to ducarroz.
Assignee: putterman → ducarroz
Keywords: mail3
accepting
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
changing component.
Component: Mail Window Front End → Composition
changing milestone to unknown. It will get changed back when we figure out what milestone to put this bug in.
Target Milestone: mozilla0.9 → ---
marking nsbeta1+ and moving to mozilla0.8
Keywords: nsbeta1
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.8
moving to mozilla0.9
Target Milestone: mozilla0.8 → mozilla0.9
I cannot reproduce this problem with my US keyboard even when I am using ATL+nnn sequence. I would need to install a "foreign" keyboard driver.
Everything works fine for me on Windows NT, I have tested with French, German and Nowergian keyboards. Does this problem occurs only on Linux?
I've tried on Linux using today's build with a German keyboard and I didn't have any problem to type AltGr+q for the at sign (@).
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
I tested it again on Linux with the build of the 18th january. The problem is still there: If I want to enter a new email/web address that begins with the same characters as another known address, the autocomplete window appears. If I now press AltGr-Q (means "@" on my german keyboard) while the autocomplete window is activated, then "q" and not "@" is entered into the textfield.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Which version of linux are you using? Can you correctly type AltGr-Q in the subject line which is a regular text field?
I have SuSE Linux 7.0 (Linux kernel 2.2.16). I can type "@" via AltGr-Q in a normal textfield (as well as into an address textfield when the autocomplete window isn't visible).
Naoki, would you be able to help with this?
Looks like the same problem as bug 62518, cc to shanjian, have you found anything about the problem?
marking nsbeta1- and moving to future milestone. If someone else wants to take a look at this, please take the bug and change the future milestone to the correct milestone.
Keywords: nsbeta1 → nsbeta1-
Whiteboard: [nsbeta1+] → [nsbeta1+ 2/21]
Target Milestone: mozilla0.9 → Future
I reproduced the problem on my linux 6.2 machine. Detailed step following: 1, Go to directory "/usr/share/xmodmap" in one xterm window, 2, type "xmodmap xmodmap.us". This step is not really necessary to reproduce the problem. You might get confused when change to german keymap. Store this command in your command history. 3, Start mozilla in another xterm. 4, type "xmodmap xmodmap.de". This command change system keymap to be german. Type "right-ALT+q" should give you '@'. 5, In mail composing window, type first part of an email address, like "shanjian". Wait until a pop-up window showup. In pop-up window, "shanjian@netscape.com" might be listed. 6, type "right-ALT+q". Instead of getting '@', you will get 'q'. My guess, After pop-up windows for auto-complete is displayed, because we need to process UP, DOWN, and ENTER key inside pop-up window, all key events are sent to pop-up window event handler. Somehow X keymap mapping is skipped. I could not find anything suspecious in file http://lxr.mozilla.org/seamonkey/source/xpfe/components/autocomplete/resources/content/autocomplete.xml#354. This might be a generic XUL event handling issue.
*** Bug 74262 has been marked as a duplicate of this bug. ***
*** Bug 76047 has been marked as a duplicate of this bug. ***
*** Bug 79567 has been marked as a duplicate of this bug. ***
A mail application where users can't write "@" ... and the bug is Futured?
All European users have problems to enter a normal e-mail address in a field *for* email addresses, and you future it? putterman, shanjian@netscape.com has a reproduction. Please reevaluate.
Severity: normal → major
Keywords: mozilla0.9.1
*** Bug 80135 has been marked as a duplicate of this bug. ***
Renominating for nsbeta1. This smells of nscatfood to me. Scott - Based on the feedback, I think we need to re-evaluate. This might be related to "Alt-GR" bug 27463.
Keywords: nsbeta1- → nsbeta1, nsCatFood
I agree that this should be fixed but once again have to ask if the 118N team can help with this.
I didn't figure out yet what, but anything changes since 0.8.1. I run into this bug all the time now, but didn't notice it until 0.9. (Didn't use nightlies between 0.8.1 and 0.9).
I found the difference: Now, the menu opens even if there is only one completion. With the default domain, there is almost always one. In 0.8.1, the menu did not appear and the default domain only completed inline.
moving to 0.9.1
Priority: P3 → P2
Whiteboard: [nsbeta1+ 2/21] → [nsbeta1+]
Target Milestone: Future → mozilla0.9.1
reassign to hewitt
Assignee: ducarroz → hewitt
Status: REOPENED → NEW
Keywords: mailtrack
don't think I'll have time for this for 0.9.1
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Depends on: 81912
Adding danielmc and andreas for input from german perspective.
It is critical for German users to be able to type in the "@" symbol for an email address using the ALT-GR key, this is equivilant as if the user can't type in the "@" symbol on the US keyboard by using SHIFT key. Would we ship the US product with this?
Friends, why are we even debating if we need to fix this problem for 0.9.1? Just look at the keyboard maps listed in /usr/share/xmodmap and see in how may of these keyboard maps, "at" appears in the 3rd position for its definition. The ratio is something like 90% -- around 26 language keyboards. That means in that many languages, users will find it very diddifcult to enter "@" character for e-mail addresses and in other text fields. Since Netscape's beta will be based on 0.9.1 and since we would like European users to use and evaluate a Beta version of Netscape Mail as well as the next Mozilla milestone, we must fix this bug. Since this character input works in ordinary editor field, clearly we are doing something extraneous during auto-completion. If Joe Hewitt cannot fix this problem within the time left for 0.9.1, then let's find someone else who can. ftang, can we find someone else?
Per PDT approval today, moving this to 0.9.1. Reassign to Kevin McCluskey.
Assignee: hewitt → kmcclusk
Status: ASSIGNED → NEW
Re-set the TM per jenm's comment.
Target Milestone: mozilla0.9.2 → mozilla0.9.1
Depends on: 27463
Makring as dependent on 27463. Fix 27463, and my guess is that this one will be resolved (e.g. I am not an engineer though). </8^)
Discussed bug with ftang@netscape.com. He recommended reassigning the bug to yokoyama@netscape.com. Note: Should this bug be dependent on bug 27463? This bug is Linux specific and bug 27463 is WIN32 specific?
Assignee: kmcclusk → yokoyama
This is Linux specific. (not happening in Windows, verified with andreasb) Assigning to bstell
Assignee: yokoyama → bstell
I can also reprodue this. This is strange. the debug code in widget/src/gtk/nsGtkEventHandler.cpp (#ifdef DEBUG_ftang) show me that while it is not in autocomplete mode, it generate key event as @, and while it is in the autocomplete mode, it does generate key event as q. so we can confirm the problem is inside gtk.
cc'ing akkana. she knows a lot about key event handling on linux and may be able to shed some light on this.
I am hoping the fix for 74088 katakai propose can also fix this problem. But it does not.
> akkana [...] may be able to shed some light on this She's away until end of Jun or so.
katakai- can you also look at this ?
adding Joe Hewitt to cc:
Status: NEW → ASSIGNED
bstell and I look at it. What we found is in the low level gdk event code we actually get wrong thing already. It looks this bug is related to menu/dropdown also. This problem happen when a menu pointer grab. For example, if we click on file menu with the menu drop down, and hit ALTGR+Q, we get exactuly the same kind of event and it will quit. (We got a 'q' in the event instead a '@' in the gdk event)
the user work around is to hit "ESC" when they are in the auto complete mode to disengage autocomplete first and then hit AltGR+q to produce @ characters. We need someone familiar with GTK and menu stuff to help.
The problem is that we use a menu to implement the autocomplete. The problem only occurs when the autocomplete menu is down. Here is my current theory: The menu system uses an alt-letter key to post (drop down) the menus from the main menu bar. When the menu is posted (goes down) the keyboard is grabbed so keystrokes can be mapped via mnemonics (underscored letters) to menu items. Because the user *may* or *may not* release the alt key the menu code ignores the alt key. Hence the 'Alt-Q' mapping to '@' is bypassed and we get a 'q' on a German keyboard.
Hewitt: is there a way we can set non-english to not enable the popup ie: overide this setting: this.ifSetAttribute("showPopup", true); http://lxr.mozilla.org/seamonkey/source/xpfe/components/autocomplete/resources/c﷒0﷓
I traced this down to the X keycode to keysym translation (XmbLookupString). In the two cases, without / with the autocomplete dropdown (a popup menu) the keycode value is passed in to XmbLookupString is the same but the output is different.
Brien, we may also need to check state field of X keyevent given to XmbLookupString. It may be different between in autocompletion mode and in normal mode.
I put debug output in gdkevents.c ################################## the AltGR keypress: XKeyEvent gdkevents.c 1094 type = 2 window = 500007c state = 10 keycode = 71 , gdkevents.c 1105 xic = 0x0x84bbfc0, gdkevents.c 1110 keysym = ff7e, gdkevents.c 1148 ################################## the first q keypress; no autocomplete dropdown: XKeyEvent gdkevents.c 1094 type = 2 window = 500007c state = 2010 keycode = 18 , gdkevents.c 1105 xic = 0x0x84bbfc0, gdkevents.c 1110 keysym = 40, gdkevents.c 1148 keysym = 0x00000040, keysym2ucs.c 853 nsWidget::~nsWidget() of toplevel: 8 widgets still exist. Gdk-CRITICAL **: file gdkwindow.c: line 716 (gdk_window_ref): assertion `window != NULL' failed. ################################## the 2nd q keypress; with autocomplete box showing: XKeyEvent gdkevents.c 1094 type = 2 window = 500007c state = 10 keycode = 18 , gdkevents.c 1105 xic = 0x0x84bbfc0, gdkevents.c 1110 keysym = 71, gdkevents.c 1148 keysym = 0x00000071, keysym2ucs.c 853
even if I release and repress the Alt key between the 1st and 2nd q the result is the same.
if I force the 0x2000 state bit then a @ is returned
If I replace the XGrabKeyboard in gdk_keyboard_grab() with GrabSuccess then AltGR-Q translates to @ when the autocomplete menu is posted.
What are these ? >nsWidget::~nsWidget() of toplevel: 8 widgets still exist. > >Gdk-CRITICAL **: file gdkwindow.c: line 716 (gdk_window_ref): assertion `window != NULL' failed.
still debugging: The input window event mask / select input: ------------------------------------------ XCreateWindow 500003e, gdkwindow.c 412 xattributes.event_mask = 2c000 XSelectInput, gdkwindow.c 1822 window = 500003e xevent_mask = 122c07f The grab window event mask / select input ------------------------------------------ XCreateWindow 500002e, gdkwindow.c 412 xattributes.event_mask = 22c031 XSelectInput, gdkwindow.c 1822 window = 500002e xevent_mask = 624003 XGrabKeyboard, gdk.c 776 xwindow = 500002e owner_events = 1
I may have distrubed the previous event_mask values
the attached program implies to me that a grab is not affecting the results
I believe the sample code's grab failed because the windows were not yet exposed.
I added this debug hack to gdkevents.c and installed on my system. When I run the sample program the @ shows up three times then q after that. static int cntr = 0; in gdk_event_translate() { ... switch (xevent->type) { case KeyPress: ... if (cntr++ > 2) XGrabKeyboard(gdk_display,xevent->xkey.window, 1, GrabModeAsync, GrabModeAsync, GDK_CURRENT_TIME); ... }
oops, 2 @@ then q
the first keypress was the AltGr
QA: do we see this on other versions of Redhat, Solaris, Irix, HP-UX, etc.
CC'ing Adrian@Redhat for comments on the latest version of RH Linux.
It is easy to use the little Gtk/Gdb only program (no mozilla code) above to demonstrate that AltGr does not work when the keyboard is grabbed.
I tried disabling the XGrabKeyboard with pointer focus and with my limited testing I did not see any changes/problems. Perhaps we should consider doing a XUngrabKeyboard. It seems to work although this kind of thing seems a bit severe to me.
one can use the Xlib only program above to demo the problem. Looks to me like a X server issue. On to workarounds ...
The above attachment (36277) checks (only once at app start) if the keyboard is using the Mode_switch in the keyboard mapping table. If Mode_switch is being used then disable keyboard grabs.
by-the-way: good call Tajima re: the state bits
to use the demo programs: (these instructions tested on Redhat 6.2) 1) gunzip/untar the file 2) cd into the dir and type make 3) run the demo program; eg: ./test_AltGr_XGrabKeyboard_xlib make sure it says "no XGrabKeyboard" note that the AltGr (right-Alt) key is Alt_R 4) get the command to restore US keyboard mappings in the shell's command history ('cuz keys like '/' and backspace will be moved and you will want to use the shell's history to get to the command to restore the keyboard) xmodmap /usr/share/xmodmap/xmodmap.us.old 5) change the keyboard mapping to a German keyboard mapping xmodmap /usr/share/xmodmap/xmodmap.de 6) run the demo program; eg: ./test_AltGr_XGrabKeyboard_xlib make sure it says "no XGrabKeyboard" note that the AltGr (right-Alt) key is now Mode_shift and AltGr-Q (right Alt and q) is now '@' 7) cause the grab to happen; eg: click in the window make sure it says " XGrabKeyboard" note that the AltGr (right-Alt) key is now Alt_R and AltGr-Q (right Alt and q) is now 'q'
Note: for both the demo programs and Mozilla the app must be restarted after the keyboard is remapped.
Whiteboard: [nsbeta1+] → [nsbeta1+] fix ready; waiting for review/super-review
I'm not seeing any regression with the patch with my japanese keyboard which has Mode_switch to toggle kana keys.
It looks like that the code you change is around blizzard's code blizzard- can you review this one ? how frequent usesModeSwitchMapping will be called? how fast ist usesModeSwitchMapping ? So... we only call gdk_keyboard_grab while the xmodmap not using switchmode ?
the patch code is only called once
http://nscp.upenn.edu/aix4.3html/x11/specs/pdf/XKBlib.pdf http://www.cs.ucsb.edu/Facilities/Software/X11R6-info/Xkb.xkbproto.txt o Use of a modifier to specify a second keyboard group has a number of side-effects and wreaks havoc with client grabs and X toolkit translations and limits us to a single keyboard group.
From an email from Owen Taylor: > Can't reproduce this with the current CVS XFree86 - looks to have > been fixed by the following change: > > === > programs/Xserver/xkb/xkbEvents.c > 204. In Grab mode XKB sends 'state' in key events without 'group info' > (keyboard map layout) (#4469-4470, Ivan Pascal). > ===
blizzard suggested we watch for the Mode_switch key and when grab occurs we turn on the Mode_switch bit in the event field.
Whiteboard: [nsbeta1+] fix ready; waiting for review/super-review → [nsbeta1+] working on patch.
I stumbled onto the same Gdk-CRITICAL message in bug 82697. Its because GDK is posting a "XdndAware" PROPERTY_NOTIFY event without a window.
does anyone know a correct way to determine the Mode_switch bit value?
Whiteboard: [nsbeta1+] working on patch. → wanted for 0.9.1 [nsbeta1+] working on patch.
in bstell's 05/30/01 10:52 working patch: simulates Mode_switch the following line is hard coded . Can some one help us to find a public well-documented way to get this value ? + Mode_switch_bit = 0x2000; bstell have already look at X.h, but he only found masks for shift, control, alt, lock, mod1 to mod5 . There are no mask for Mode_switch
0x2000 looks strange to me.. I understand the state value should be combinations of ShiftMask(1<<0), LockMask(1<<1), ... and Mod5Mask(1<<7). Actually, on my Solaris environment, xmodmap -pm output shows Mode_switch is used for mod2: ... mod2 Mode_switch (0x14) ... and state value for "AltGraph.." has Mod2Mask(1<<4).
I agree. Bit 13 is not even defined. From X.h: /* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, state in various key-, mouse-, and button-related events. */ #define ShiftMask (1<<0) #define LockMask (1<<1) #define ControlMask (1<<2) #define Mod1Mask (1<<3) #define Mod2Mask (1<<4) #define Mod3Mask (1<<5) #define Mod4Mask (1<<6) #define Mod5Mask (1<<7) /* modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above. */ #define ShiftMapIndex 0 #define LockMapIndex 1 #define ControlMapIndex 2 #define Mod1MapIndex 3 #define Mod2MapIndex 4 #define Mod3MapIndex 5 #define Mod4MapIndex 6 #define Mod5MapIndex 7 /* button masks. Used in same manner as Key masks above. Not to be confused with button names below. */ #define Button1Mask (1<<8) #define Button2Mask (1<<9) #define Button3Mask (1<<10) #define Button4Mask (1<<11) #define Button5Mask (1<<12) #define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
from Owen Taylor via email > If XKB is in use, then you can construct a munged event > field for a particular group as: > > XkbBuildCoreState(xkev->state,group); > > (include/X11/extensions/XKB.h) > > When XKB isn't in use, then the appropriate bit is probably > the one you get from XkbKeysymToModifiers, though I haven't > tested this. > > Now, there is no guarantee at all that Mode_switch will > switch into group 1, but it probably true almost all > the time. > > You can find code for determining whether the XKB extension > is in place in the devel version of GTK+ - see: > > ftp://ftp.gtk.org/pub/gtk/v1.3/ > > gtk+/gdk/x11/gdkmain-x11.c:_gdk_windowing_init_check(). > > > Regards, > Owen
Whiteboard: wanted for 0.9.1 [nsbeta1+] working on patch. → wanted for 0.9.1 [nsbeta1+] cleaning up patch.
this is where bit 13 (0x2000) comes from: /usr/X11R6/include/X11/extensions/XKB.h > /* > * BuildCoreState: Given a keyboard group and a modifier state, > * construct the value to be reported an event. > * GroupForCoreState: Given the state reported in an event, > * determine the keyboard group. > * IsLegalGroup: Returns TRUE if 'g' is a valid group index. > */ > #define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) > #define XkbGroupForCoreState(s) (((s)>>13)&0x3) > #define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
> the user work around is to hit "ESC" when they are in the auto complete mode to > disengage autocomplete first and then hit AltGR+q to produce @ characters. another workaround is to type fast :). The menu need a 100ms or so to come up. Just be faster than that to type "@" after the username.
another workaround is to backup (not erase) one character this disable autocomplete.
Whiteboard: wanted for 0.9.1 [nsbeta1+] cleaning up patch. → wanted for 0.9.1 [nsbeta1+] patch ready, waiting for review
can someone kindly review this? thanks
the other work around is to turn off the menu drop down in mail autocomplete. Bstell, is that another choice ? hewitt- is that possible to turn off the autocomplete menu drop down for mail composition? I don't want to go there, but we should have a plan B in case people feel bstell's last patch is too risky for moz0.9.1 Of course, I won't propose that unless people tell me bstell's last patch is too risky and I will definitely get buy in from putterman and other mailnews folks first.
OK, first of all I think that the style of the names of the files and functions is pretty jarring: +#include "x_keyboard_mode_switch.h" The location of the files is also a problem. They really shouldn't in the gtksuperwin directory since they are all about even translation of the event for mozilla. This isn't something that's part of the superwin structure. If we have to we can add some extra callbacks from superwin that the widget code can register callbacks for doing all of the translation but I really don't want the translation itself in the superwin directory. This isn't going to be perfect, either. Since we're only getting the X events for the superwin windows we're only going to be able to translate events for those windows. This means that this is going to be a problem when we're embedded. Hopefully we won't run into this situation there, though. We almost never native grab in those cases. +#define STR_MATCH(str1,str2) (strcmp((str1),(str2))==0) This seems silly to me and is over-obfuscating. Why not use use !strcmp() like everywhere else? + are_grabbing_keyboard = grabbing ? TRUE : FALSE; if (a) then a or b? You can just assign that safely. :) + if (env_str) + enable_xkt_ksym_to_modifiers = atoi(env_str); You should be able to use use if (env_str) enable...= PR_TRUE; That way you don't have to worry about the value, only that it's set at all. +/* Xlib should define this! */ +#define MODIFIERMAP_ROW_SIZE 8 Where is this magic constant coming from, anyway? keysymName = XKeysymToString(keysym); Is that static or does it need to be freed later? There's a lot of XKB code that isn't in the header ifdef.
> +/* Xlib should define this! */ > +#define MODIFIERMAP_ROW_SIZE 8 > > Where is this magic constant coming from, anyway? from Xlib.h typedef struct { int max_keypermod; /* The server's max # of keys per modifier */ KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */ } XModifierKeymap; > keysymName = XKeysymToString(keysym); > > Is that static or does it need to be freed later? http://tronche.com/gui/x/xlib/utilities/keyboard/XKeysymToString.html XKeysymToString ... Description The returned string is in a static area and must not be modified.
> There's a lot of XKB code that isn't in the header ifdef. The only thing I know of that needs to be "#ifdef HAVE_X11_EXTENSIONS_XKB_H" is XkbBuildCoreState() (its a macro!)
looking at all the tinderbox *nix systems I see either: X11/XKBlib.h and X11/extensions/XKB.h exist or neither exist
can I get a review please?
No longer depends on: 27463
OK, one last concern. You've declared the files in widget/src/gtk/nsKeyboardUtils.h as extern "C" but then you create them in a C++ file. I'm concerned that we're going to have linkage problems on some systems. Personally, I would prefer it if you moved the utils to a C++ class that had all static members ( including the 'globals' ) but you could also just make that file a .c file and the linkage problems would be all good. It's also possible that since you declared them as having C linkage that they will be compiled and linked as C functions but I'm not sure.
good catch!
I have reworked the code but right now I can not get mozilla to work (even a fresh pull/build).
kindly review (and thanks in advance for helping with this last minute ordeal)
the patch makes a new build define so be sure to run autoconf and rebuild (sadly the whole tree)
> I have reworked the code but right now I can not get mozilla to work > (even a fresh pull/build). This was not related to my patch. It was 'fixed' with a new profile.
Brian, please contact your reviewers directly if you haven't done so. (Not sure bugmail is sufficient, don't know if you've tried other means yet.)
Testing updates : * Pulled MOZILLA_0_9_1_BRANCH tree * Applied brian's patch * Built the tree Scenario 1 : 1. Created a new profile 'foo'. 2. Started mozilla. Encountered bug 83759. So, I had to kill that session and run mozilla again. Brian told me that he saw this behavior prior to his patch also. 3. Started Mozilla 4. Opened a new URl. Opened fine. 5. Triggered mailnews app. 6. Created an IMAP account. Opened compose window. Typed entire address including @ symbol. Sent mail successfully. 7. Sent another mail successfully using autocomplete to fill in the receipient address. 8. Created a POP account. Opened compose window. Sent mail succesfully. 9. Sent another mail successfully using autocomplete Scenario 2 : 1. Started with command xmodmap /usr/share/xmodmap/xmodmap.us.old to restore US keyboard mappings later. 2. To get german keyboard-mappings typed xmodmap /usr/share/xmodmap/xmodmap.de 3. Started mozilla with profile 'foo'. 4. Typed RightAltKey+q in the url bar to check whether or not we get '@'. '@' did show up. 5. Created a new IMAP mail account. Opened compose window. Started typing new address and used RightAltKey+q to type '@' symbol needed in the email address. '@' symbol did showup as expected as I was able to type in the complete address and send the mail successfully. 6. Sent another new message with IMAP account, this time just using the autocomplete. Works fine. 7. Created a new POP account and repeated the steps in 5 & 6. Mail sent successfully. Scenaraio 3 : 1. Get back to US keyboard-mappings using xmodmap /usr/share/xmodmap/xmodmap.us.old 2. Repeat Scenario 1 successfully. In all scenarios, all sent mail has been received on the other end. Thanks to Brian in helping me with keyboard mapping switching issues. bhuvan
errata : Scenario 3 : 2. Repeat Scenario 1 successfully. -> 2. Repeated Scenario 1 successfully. btw, scenario 3 is done just to make sure that I can get back (US mapping) and still do things as expected after the german (de) mode switch.
Who are the reviewers for this bug?
Whiteboard: wanted for 0.9.1 [nsbeta1+] patch ready, waiting for review → [nsbeta1+] MUST HAVE; patch; r=?; sr=?
I built with the patch after clobbering. Had to edit it in by hand but i don't believe i missed anything. AFAIK: Norwegian, Danish and Swedish keyboards trigger the @ by using "AltGr 2" On a norwegian keyboard this still doesn't work for me. Can someone verify?
Steve, This bug is a particularly difficult bug: just look at how many people have worked-on/contributed to this bug report. The bug is actually in the X server (been there over 10 years!) but it never bothered us until we did autocomplete (ie: editing) with a menu posted (the autocomplete popup). The correct fix would go in the X server (I've heard that the fix is now in the X server's cvs repositiory but not in any released version). People understand this is a high priority bug (I for example worked Saturday and Sunday on Memorial Day weekend). Because the bug is deep in the core system (the X server) it is hard to find someone with enough experience to understand it. Blizzard, one of our over-worked super-reviewers, has stepped in and is helping review and suggest improvements even though many people are demanding his time for super-reviews. I have asked other developers to help review but it's my impression that because this is deep in the core code they don't feel they have enough experience to be a good reviewer (this should not be surprising since we do not generally work at this level). Ftang did email him after the latest patch: 4:22 PDT / 7:22 Boston (blizzards) time on Friday.
R.K.Aa: If the you had difficulty with the Makefile.in part of the patch that is expected. Patch does not like diffs where an added line ends with a backslash '\' as was the case for the change to Makefile.in. If it was something else that required hand patching please let me know.
R.K.Aa: patch also has difficulty with new files (nsKeyboardUtils.cpp / nsKeyboardUtils.h) These are problems with the patch command not the patch itself.
(and I'm assuming you set the environment variable POSIXLY_CORRECT to make the patch command work correctly)
Steve: it's possible that even if blizzard was working late Friday (and did not already have other responsibilities (eg: super-reviews) queued ahead of this review) he may be waiting on input from others. I know he has been working with Owen Taylor on this.
+ if (env_str) + PR_sscanf(env_str, "%lX", &gUserDefinedModeSwitchBit); Why are you using scanf on that? If it's set it should be enough. if (env_str) gUserDefinedModeSwitchBit = PR_TRUE; +extern "C" { +#include <gdk/gdk.h> +struct XKeyEvent; +} You could just include <gdk/gdkx.h> of course, then you can't use KeyPress and KeyRelease in your function names because of more X lameness so I guess it's OK. :) fix the first nit and you have an r/sr=blizzard
> + if (env_str) > + PR_sscanf(env_str, "%lX", &gUserDefinedModeSwitchBit); > > Why are you using scanf on that? If it's set it should be enough. > > if (env_str) > gUserDefinedModeSwitchBit = PR_TRUE; This lets the user set the _particular_ bit hence a scanf (or similar) is required. Would you recommend removing gUserDefinedModeSwitchBit entirely or leaving it?
Leave it. sr=blizzard
Blocks: 83989
Whiteboard: [nsbeta1+] MUST HAVE; patch; r=?; sr=? → [nsbeta1+] MUST HAVE; patch; r/sr=blizzard
a= asa@mozilla.org for checkin to the 0.9.1 branch and trunk. (on behalf of drivers)
I will checkin to both trees this evening.
r=pavlov
checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
there was a crash (bug 83961) which i believe was caused by fixes to this bug, but with latest checkins, it is gone.
cleaned up, pulled & clobbered: Works fine w/norwegian keyb. now.
Changing QA to international. Marina if you are not the right person please re-assign to the right international QA. Thanks
QA Contact: esther → marina
I'm not sure if everything really works OK; the same bug plagued autocompletition in browser URL bar, and when I tested build 2001060508, I noticed that while entering @ in urlbar works like a charm, several other characters do not work properly when using Finnish keymap and RH7.1. For example, if try to write http://www.lut.fi/~myrjola/ , everything works OK until the tilde, which is usually typed as alt gr, ~ and space with this keymap. However, in this case, the final result in URL bar is http://www.lut.fi/"µ?®j??ª÷ , which is not quite the desired result... Even worse, everything typed after that to the URL bar is messed up in similar way. For example, http://www.mozilla.org/ becomes hþþþ÷÷???·µ?«???ª·?®?÷ (actually, some characters do not survive the paste and become ?s, but this should make the point clear). This might be something entirely different, but can't help suspecting that it is related to this bug, because I didn't notice similar effect in day or so old build. My apologies if this _is_ unrelated ;)
Are you using xmodmap.fi ? > the tilde, which is usually typed as alt gr, ~ and space with this keymap Is tilde a 3 key operation? Can you try disabling the mode_switch workaround? eg: change in dist/bin/defaults/pref/unix.js pref("keyboard.mode_switch.enable_workaround", true); to pref("keyboard.mode_switch.enable_workaround", false);
with keyboard mapped to xmodmap.fi I see that the 3 key sequence AltGr ] <space> produces a '~' when the autocomplete is not posted but produces a '"' when the autocomplete menu is posted. Mika: before the patch was '~' working in the URL bar when the autocomplete menu was posted?
in the URL bar I tried the following with keyboard mapping = xmodmap.fi Redhat 6.2 - my debug build Redhat 7.0 - my debug build Redhat 7.1 - my debug build Redhat 7.1 - netscape 2001-06-05-08 For these combinations I saw the "AltGr ] space" enter a '~' if no autocomplete popup enter a '"' when autocomplete popup up In all of these I observed that the patch did not fix the dead key combinations. In none of these did I see other characters. Anyone have any thoughts on how I might reproduce Mika's results so I can debug it?
OK, some answers coming up: Changing the mode switch workaround pref line to pref("keyboard.mode_switch.enable_workaround", false); does remove the effect. Before the patch (or with workaround disabled now) ~ (as entered by pressing alt gr, the key with ^ " and ~ symbols engraved left from Enter, space) didn't work in URL bar; it produced just ", which is the same as pressing the corresponding key and space without alt gr. As for the keymap, I guess this line in my XF86Config-4 (XFree86 version 4.0.3 in use) sets the keyboard mode: Option "XkbLayout" "fi" In /etc/X11/xinitrc there is a comment that says that xmodmap and xkb do not like each other, so I wonder if the Xkblayout setting is actually the relevant one? (I haven't had need to modify keyboard settings, so this isn't very familiar territory to me - if I make misassumptions, feel free to correct them as soon as possible) A finnish friend of mine experienced the same effect with same build when I asked him to try, so it probably affects many finnish users who run Mozilla on Linux.
and you are still seeing the spurious characters when the workaround is enabled?
When the workaround prefs item is set to false, dead keys do not work properly, but no spurious characters appear anymore. When it is again set to true, the spurious characters do appear again. However, this does not happen in mail - alt gr seems to work there properly. (But when I try to enter something after that to the URL bar at browser, spurious characters start appearing even without using alt gr at any point, so the effect seems to be triggered on when in mail, even though it does not manifest itself there.)
/etc/X11/xinit/xinitrc: # merge in keymaps if [ -f "$sysxkbmap" ]; then setxkbmap `cat "$sysxkbmap"` XKB_IN_USE=yes ... if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config` if [ -n "$xkbsymbols" ]; then setxkbmap -symbols "$xkbsymbols" XKB_IN_USE=yes ... # xkb and xmodmap don't play nice together if [ -z "$XKB_IN_USE" ]; then if [ -f "$oldsysmodmap" ]; then xmodmap "$oldsysmodmap" ...
the new xlib demo program shows (Redhat 6.2/xmodmap.fi) for "dead" keys: releasing the Mode_switch key generates a 2nd dead key keyrelease not a Mode_switch keyrelease
I believe that the patch in the last attachment should fix the problem Mika (http://bugzilla.mozilla.org/createattachment.cgi?id=61439) is reporting but since it does not happen on my system I cannot verify this. I will try to reproduce this condition by using setxkbmap.
reopening since this is clearly not fully done
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [nsbeta1+] MUST HAVE; patch; r/sr=blizzard → [nsbeta1+] MUST HAVE; patch;
091 can't wait for this -> 092
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Including X11/XKBlib.h break builds under Tru64 because one of the header files it includes contains a structure with a field named explicit which seems to be a reserved word in c++. I can get things to compile be changing the code to look like this: #define explicit Explicit #include <X11/XKBlib.h> #undef explicit Ill clean this up so we only do it conditionally and attach a patch
*** Bug 84627 has been marked as a duplicate of this bug. ***
I experienced Mika Yrjölä's problem on Linux with moz 2001060721. A workaround seems to let the mouse pointer on the completion window while entering a web address. When I move it away, I got wrong characters. Quite weird ...
this bug also affects URL field since the new autocomplete dropdown was introduced. See bug 84804 and bug 85119. I believe they are in effect dups of this one.
*** Bug 85119 has been marked as a duplicate of this bug. ***
*** Bug 84804 has been marked as a duplicate of this bug. ***
pdt+ base on 6/11 pdt meeting.
Whiteboard: [nsbeta1+] MUST HAVE; patch; → [PDT+] MUST HAVE; patch;
*** Bug 85416 has been marked as a duplicate of this bug. ***
*** Bug 85544 has been marked as a duplicate of this bug. ***
here is the key activity from Mika's entering a '~' (AltGr ] space) on his system: keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x2000, "dead_tilde" keyevent 4: type = keyrelease, state = 0x2000, "dead_tilde" keyevent 5: type = keyrelease, state = 0x0000, "dead_tilde" keyevent 6: type = keypress , state = 0x0000, "space" keyevent 7: type = keyrelease, state = 0x0000, "space"
that was without the key grab this is with the key grab keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" button press, test_AltGr_XGrabKeyboard_xlib.c 83 keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x0020, "dead_diaeresis" keyevent 4: type = keyrelease, state = 0x0020, "dead_diaeresis" keyevent 5: type = keyrelease, state = 0x0000, "dead_diaeresis" keyevent 6: type = keypress , state = 0x0000, "space" keyevent 7: type = keyrelease, state = 0x0000, "space"
before using the demo program one may want to turn off key-autorepeat: xset r off to re-enable it: xset r on
more keypress/release info (I'm usin shorthand "p/AltGr" to mean press (and hold) altgr and "r/AltGr" to mean release) p/AltGr p/~ r/~ r/AltGr p/space r/space no keyboard grab keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x2000, "dead_tilde" keyevent 4: type = keyrelease, state = 0x2000, "dead_tilde" keyevent 5: type = keyrelease, state = 0x2000, "dead_tilde" keyevent 6: type = keypress , state = 0x0000, "space" keyevent 7: type = keyrelease, state = 0x0000, "space" with keyboard grab keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" button press, test_AltGr_XGrabKeyboard_xlib.c 83 keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x0020, "dead_diaeresis" keyevent 4: type = keyrelease, state = 0x0020, "dead_diaeresis" keyevent 5: type = keyrelease, state = 0x0000, "dead_diaeresis" keyevent 6: type = keypress , state = 0x0000, "space" keyevent 7: type = keyrelease, state = 0x0000, "space"
p/AltGr p/~ r/~ p/space r/space r/AltGr without grab: keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x2000, "dead_tilde" keyevent 4: type = keyrelease, state = 0x2000, "dead_tilde" keyevent 5: type = keypress , state = 0x2000, "nobreakspace" keyevent 6: type = keyrelease, state = 0x2000, "nobreakspace" keyevent 7: type = keyrelease, state = 0x2000, "nobreakspace" and with grab: keyevent 1: type = keyrelease, state = 0x0000, "U0077FF8E" button press, test_AltGr_XGrabKeyboard_xlib.c 83 keyevent 2: type = keypress , state = 0x0000, "Mode_switch" keyevent 3: type = keypress , state = 0x0020, "dead_diaeresis" keyevent 4: type = keyrelease, state = 0x0020, "dead_diaeresis" keyevent 5: type = keypress , state = 0x0020, "space" keyevent 6: type = keyrelease, state = 0x0020, "space" keyevent 7: type = keyrelease, state = 0x0020, "space"
keyevent 1: type = keyrelease, keycode = 36/0x24, state = 0x0000, "U0077FF8E" keyevent 2: type = keypress , keycode = 113/0x71, state = 0x0000, "Mode_switch" keyevent 3: type = keypress , keycode = 35/0x23, state = 0x2000, "dead_tilde" keyevent 4: type = keyrelease, keycode = 35/0x23, state = 0x2000, "dead_tilde" keyevent 5: type = keypress , keycode = 65/0x41, state = 0x2000, "nobreakspace" keyevent 6: type = keyrelease, keycode = 65/0x41, state = 0x2000, "nobreakspace" keyevent 7: type = keyrelease, keycode = 113/0x71, state = 0x2000, "nobreakspace" and with grab: keyevent 1: type = keyrelease, keycode = 36/0x24, state = 0x0000, "U0077FF8E" grab keyboard, test_AltGr_XGrabKeyboard_xlib.c 141 keyevent 2: type = keypress , keycode = 113/0x71, state = 0x0000, "Mode_switch" keyevent 3: type = keypress , keycode = 35/0x23, state = 0x0020, "dead_diaeresis" keyevent 4: type = keyrelease, keycode = 35/0x23, state = 0x0020, "dead_diaeresis" keyevent 5: type = keypress , keycode = 65/0x41, state = 0x0020, "space" keyevent 6: type = keyrelease, keycode = 65/0x41, state = 0x0020, "space" keyevent 7: type = keyrelease, keycode = 113/0x71, state = 0x0020, "space"
without grab: keyevent 1: type = keyrelease, keycode = 36/0x24, state = 0x0000, "U0077FF8E" keyevent 2: type = keypress , keycode = 113/0x71, state = 0x0000, "Mode_switch" keyevent 3: type = keypress , keycode = 35/0x23, state = 0x2000, "dead_tilde" keyevent 4: type = keyrelease, keycode = 35/0x23, state = 0x2000, "dead_tilde" keyevent 5: type = keyrelease, keycode = 113/0x71, state = 0x2000, "dead_tilde" keyevent 6: type = keypress , keycode = 65/0x41, state = 0x0000, "space" keyevent 7: type = keyrelease, keycode = 65/0x41, state = 0x0000, "space" with grab: keyevent 1: type = keyrelease, keycode = 36/0x24, state = 0x0000, "U0077FF8E" grab keyboard, test_AltGr_XGrabKeyboard_xlib.c 141 keyevent 2: type = keypress , keycode = 113/0x71, state = 0x0000, "Mode_switch" keyevent 3: type = keypress , keycode = 35/0x23, state = 0x0020, "dead_diaeresis" keyevent 4: type = keyrelease, keycode = 35/0x23, state = 0x0020, "dead_diaeresis" keyevent 5: type = keyrelease, keycode = 113/0x71, state = 0x0020, "dead_diaeresis" keyevent 6: type = keypress , keycode = 65/0x41, state = 0x0000, "space" keyevent 7: type = keyrelease, keycode = 65/0x41, state = 0x0000, "space"
My experience with that bug is even worst than all yours: When I type an URL or an email address, as soon as the autocomplete popup appears, the typed characters appear as if the "Alt Gr" was always pressed. For example, when I type "www.mozilla.org" in the URL bar, I get: "w??·µø«???æ·ø¶?" (the first "w" is OK because it was typed just before the popup appeared). The proposed workaround (to let the mouse pointer onto the popup) works. You can imagine how disturbing it is (I didn't the workaround before reading fully this bug report)! My Mozilla is: Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; rv:0.9.1+) Gecko/20010613, build 2001061306 My keyboard is an english one and my xmodmap table is: shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x6d) mod1 Alt_L (0x40) mod2 Num_Lock (0x4d) mod3 Mode_switch (0x71) mod4 mod5 Scroll_Lock (0x4e) My KDE 2.1 desktop says that my keyboard is "Generic 104-key PC" and the layout is "U.S. English".
a=dbaron for trunk checkin for attachment 37595 [details] [diff] [review] ( tru64 bustage ) However, it would be nice to see this as an autoconf test so that we don't have to continue doing it once the header is fixed and so that any other platforms that have the busted X11/extensions/XKBstr.h also benefit (if any others exist). (I'd also prefer that since, IIRC, it's illegal according to the C++ standard to define a macro whose name is a reserved word.)
Mosfreq added at 10 dups.
Keywords: mostfreq
I've spent a lot of time now researching the X server's problem of not setting the Mode_switch bit in the XKeyEvent.state during a XGrabKeyboard. For keyboard mappings that use STATELESS combinations like the German mapping for '@', AltGr-Q, we see all the XKeyEvent|s and can manually set Mode_switch bit (0x2000) as needed. For keyboard mappings that use STATEFULL (aka: dead_key) combinations like like the Finnish mapping for '~', AltGr-]-space, we do not see all the XKeyEvent|s. I tried manually setting the state field to the non-XGrabKeyboard value (Mode_switch on, alt off) on the XKeyEvent|s we do see but it did not produce the non-XGrabKeyboard result of '~'.
Here are some possible options for dealing with the XGrabKeyboard / dead_key problem: 1) don't do anything The user will not be able to type dead key combinations when the autocomplete popup is up. The tilde key is a dead_key on bd, ch, de, dk, fi, fr, la, nl, no, pt, sf, and sg keyboard mappings meaning these will not be able to enter user home page URLs like http://www.sys.com/~user 2) disable the autocomplete popup autocomplete can still work but the popup with a visual listing of the available choices will not appear 3) disable the keyboard grab the autocomplete popup will appear and dead_keys will work but keyboard switching to a different app (or a different virtual work space) will leave the popup showing. The user will have to click the mouse to remove the popup.
> ------- Additional Comments From David Baron 2001-06-14 09:44 ------- > ... However, it would be nice to see this as an autoconf test ... David: I'm unsure how to test for an illegal define in a header file. Could you provide an example? thanks
on my system 27 of 39 the xmodmap's have dead keys which indicates to me that the current strategy of simulating the mode_switch bit is of somewhat limited value.
German keyboards have a dead_tilde mapped just like the Finnish keyboard in the 3rd position. Dead_keys in the 1st/2nd modifier position seem to work okay regardless of a keyboard grab (with/without simulating the mode_switch bit). Dead_keys in the 3rd position do not work during a keyboard grab (with/without simulating the mode_switch bit). Non-dead_keys in the 3rd position do work during a keyboard grab when the mode_switch bit is simulated.
I note that for German keyboards if I ungrab the keyboard when I see the mode_switch key the '@' and '~' work correctly. humm...
this new attachment is a much simpler and robust fix: ungrab the keyboard when the Mode_switch is pressed regrab the keyboard when the Mode_switch is released The autocomplete uses the keyboard grab most of the time and only ungrabs when the user is actively pressing the Mode_switch key. Because the keyboard grab is used the user cannot Alt-Tab (keyboard switch apps) or Alt-F1 (keyboard switch virtual desktops) and leave the popup hanging. I checked this with German and Finnish keyboard. I had Mika try this.
I've verified the latest patch, there is no regression for japanese input and japanese keyboard (which uses Mode_Switch for ascii and kana switching). (I could not test for the exact problem of '@' becase I don't have German and Finnish kbds)
I verified patch 38893 in a CVS Win32 build. Polish, Czech (both qwerty and "programmers") and Russian keyboards work with no problems in autocomplete.
i just tried the latest patch. it didn't fix the following problem: when i switch to cyrillic layout with Xkb and begin to type in URL bar or e-mail address, the letters appear cyrillic until autocomplete pop ups. after that, the letters appear as latin, as if i switched to latin keymap. if i close autocomplete window, i can type another cyrillic letter before autocomplete pops up. unfortunately, i didn't test this in earlier build (i don't use messenger), but latest attached patch didn't help. my setup: XFree86 4.0.3, RH 6.2, XKb turned on with following options: Option "XkbLayout" "ru" Option "XkbOptions" "grp:alt_shift_toggle"
Applied patch, using Norwegian keyb: All altgr characters come through OK but there seems to be a problem with how it all interacts with autocomplete: If i have someone in AB with addie abcde@some.com and type enough of it to become unique, let's say "abc" - so rest is filled in but still appears as selected in adress field: if i then type one MORE letter - the "d", all that was filled in gets deleted and only the last character "d" now remains in address field.
My previous comment is partly irrelevant: the "overwriting" exists without the latest patch as well.
Applied patch, though discovered the problem partially remains unchanged. Using Keyb='be'. When The mouse cursor is NOT in the autocompletion pop-up window, all is working perfect. Only when the cursos is located inside the autocompletion popup, the problem remains (i.e. é in stead of @). This without using/clicking the mousebuttons. The position of the cursor invokes automatically a selection inside the popup, causing the AltGr not to work.
(Thanks Brian for your build). I have tried the patched build today and I didn't get any trouble at all. What I reported on 2001-06-14 06:30 no longer occurs.
I worked with kmike, the Mode_Switch key on his keyboard is AltL+shift. XGetModifierMapping on his system reports Mode_switch as AltGr. Thus the patch has no effect (good or bad). I don't know how to fix this yet and there is very little time so I will at least provide a control to disable the grab. I will also try to provide a control to disable the popup. Time allowing I will try to figure out how to detect this Mode_switch key setting.
knackaerts: interesting, if I have the pointer in the text field or the application then I see the Mode_switch chars. If the pointer is in the popup it self then the Mode_switch is ignored. Of course without the patch whenever the popup is up the mode switch is ignored.
okay, the newest patch has a preference that completely disables the keyboard grab. This does fix the behavior seen by knackaerts but also means a user can Alt-Tab or Alt-F1 and leave the popup hanging.
From: Andreas Hasenack <andreas@conectiva.com.br> That binary fixed my issue, although I wasn't able to do ldap lookups anymore, I'm not sure why. From: "Kris Nackaerts" <knackaerts@gmx.net> I'm at home now, running WinNT. I tried to check it over VNC, though, when working over VNC I have no problem with the é@ in both versions. For me, popup on demand would be most optimal. Let it popup on pressing the tab key for example seems much more efficient.
Status: REOPENED → ASSIGNED
Whiteboard: [PDT+] MUST HAVE; patch; → [PDT+] MUST HAVE; have patch;
blizzard please review http://bugzilla.mozilla.org/showattachment.cgi?attach_id=39132 we will ask kin to do the sr if you r= here.
Whiteboard: [PDT+] MUST HAVE; have patch; → [PDT+]Need r= from blizzard
+#define DEBUG_X_KEYBOARD_MODE_SWITCH 1 You probably don't want that in there. +PRBool nsXKBModeSwitch::gAreGrabbingKeyboard = PR_FALSE; +GdkWindow *nsXKBModeSwitch::GrabWindow; I already track these in nsWindow.h/nsWindow.cpp. // are we grabbing? PRBool nsWindow::sIsGrabbing = PR_FALSE; nsWindow *nsWindow::sGrabWindow = NULL; Please find a way to use the same variable to indicate if we are grabbing and what is being grabbed. I would prefer that you use the ones in nsWindow.cpp since there's a lot of event code that already uses it.
do I need to create a function like this to get the GdkWindow from the nsWindow? + +/* static */ +GdkWindow * +nsWindow::GetGdkGrabWindow(void) +{ + if (!nsWindow::sIsGrabbing) + { + return nsnull; + } + if (sGrabWindow->mTransientParent) + return GTK_WIDGET(sGrabWindow->mTransientParent)->window; + else + return sGrabWindow->mSuperWin->bin_window; + }
Whiteboard: [PDT+]Need r= from blizzard → [PDT+]Need r= ; waiting on blizzard since 16:21
s/blizzar/blizzard/
I'd like to point out that AltL+ShiftL which I use for switching to cyrillic layout with Xkb isn't Mode_switch, but ISO_Prev_Group, according to xev and test_AltGr_XGrabKeyboard_xlib program.
kmike: can you paste in the output from test_ALtGr_XGrabKeyboard_xlib when you press/release your mode_switch combo?
From: Kris Nackaerts <knackaerts@gmx.net> OK, am at work now and tested your patch against the non-patch build. Yours is definitly doing better: without the patch, wherever my mouse cursor is located, I cannot get the @ when the autocompletion popup is visible. With the patch, it's just a matter of locating the mouse cursos somewhere outside the popup. Regards, Kris
Whiteboard: [PDT+]Need r= ; waiting on blizzard since 16:21 → [PDT+]Need r= ; waiting on blizzard since 16:21 6/19
+ if (NS_SUCCEEDED(rv)) { + //dont_popup + } huh? I don't like the use of negatives for variables. It makes you have to think when you are passing in arguments since when you pass in PR_TRUE you actually mean 'don't do something' instead of 'do something' which would make the most sense. But I'll let this slide for now since you already have the code and I know how important this is. Man, this bug still gives me the willies. r=blizzard assuming you remove that unused chunk of code above.
here we go, output from test_AltGr_XGrabKeyboard_xlib: (pressing first AltL, then ShiftL, then releasing both) keyevent 1: type = keypress , state = 0x0000, "Alt_L" keyevent 2: type = keypress , state = 0x0008, "ISO_Prev_Group" keyevent 3: type = keyrelease, state = 0x2008, "ISO_Prev_Group" keyevent 4: type = keyrelease, state = 0x2000, "ISO_Prev_Group" (pressing first ShiftL, then AltL, then releasing both) keyevent 5: type = keypress , state = 0x2000, "Shift_L" keyevent 6: type = keypress , state = 0x2001, "ISO_Prev_Group" keyevent 7: type = keyrelease, state = 0x0001, "ISO_Prev_Group" keyevent 8: type = keyrelease, state = 0x0000, "ISO_Prev_Group"
thanks for your time reviewing this. This fix is a much safer fix than the current code. If somehow it fails nothing bad happens. Text input works normally. If this were to fail and the user were to (unusual activity) Alt-Tab or Alt-F1 instead of clicking the mouse or hitting return (usual activity) this would leave the popup hanging until they clicked the mouse.If and when the X server is fixed there will be no bad side effects. + if (NS_SUCCEEDED(rv)) { + //dont_popup + } Since we do not have a fix that handles all cases I suspect that some users will prefer to configure it such that the popup never popups. This is where we should put code to record that a user would prefer that the autocomplete popup not popup thus bypassing the whole problem. I can change this to a comment to that effect. --- I use the "don't" in the same manor as the "stop" in a stop sign: it is there to indicate that this a request to deviate from normal activity (eg: stop signs are on corners where one has to stop; as opposed to not having stop signs and instead having "keep going" signs on all other corners). I could change "dont_grab_during_mode_switch" to "ungrab_during_mode_switch". Would that be better? I do not want to use "do_grab_during_mode_switch" as that would imply that not grabbing is the normal activity where the action requested is to not grab during mode_switches. I have no thoughts on how to invert "dont_grab_at_all". Something like "do_grab_during_popup" would imply that normally we do not grab when in fact we do normally grab. The users that will set this will be saying "I don't like the way this is working; don't do that".
*** Bug 87031 has been marked as a duplicate of this bug. ***
Whiteboard: [PDT+]Need r= ; waiting on blizzard since 16:21 6/19 → [PDT+] patched & reviewed
'never_grab' would work. But, anyway, I disagree with you about using negatives in prefs. 'always_grab' is perfectly valid IMHO. Don't worry about fixing that stuff in your patch. Like I said, you get a free pass this time. :)
Whiteboard: [PDT+] patched & reviewed → [PDT+] r=blizzard. ask alecf to sr= 7:58 6/21
You know that you didn't have to do that, right? In any case you should be all set to go as far as I'm concerned.
Adding alecf to the CC since he's doing sr=. Alec, is anything standing in the way of doing this review? Let me know if I can help.
ok, talked with bstell and ftang in person for a bit - between blizzards review, their description of the problem, and the coverage that this seems to be getting, I'm rs=alecf'ing this.
Whiteboard: [PDT+] r=blizzard. ask alecf to sr= 7:58 6/21 → [PDT+] r=blizzard, rs=alecf, need a=
*** Bug 87130 has been marked as a duplicate of this bug. ***
Whiteboard: [PDT+] r=blizzard, rs=alecf, need a= → [PDT+] r=blizzard, rs=alecf, ask a= since 13:29 6/21
a=chofmann
Whiteboard: [PDT+] r=blizzard, rs=alecf, ask a= since 13:29 6/21 → [PDT+] r=blizzard, rs=alecf, a=chofmann
Whiteboard: [PDT+] r=blizzard, rs=alecf, a=chofmann → [PDT+] r=blizzard, rs=alecf, a=chofmann critical for 0.9.2
Checked in. I opened a new bug re: fix Mode_switch for X Keyboard Extension: http://bugzilla.mozilla.org/show_bug.cgi?id=87240
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
The keyboard mess up has been fixed in build 2001062306 See bug 84804 for more info I'm a happy camper
Xianglan, can you verify this on Linux? Thanks
This is fixed for me on Linux, X4.10 and trunk build 2001070208 (and has been fixed for about a week in the nightlies).
Christian, was this affecting the URL bar only or mail autocomplete was also broken? Peter, you've reported this bug, do you still have a problem? Thanks.
Since I don't use mailnews I can't really say if it was horked on Linux at the time: it WFM now at any rate (just verified). The URL bar was definitely broken and it is now fixed.
Christian, thanks a lot. I'll mark it as verified. Peter, if you'll have a problem please reopen.
Status: RESOLVED → VERIFIED
I have seen this bug after it has been marked fixed, but not as constantly as I once did when it was still open. At the moment, I cannot reproduce it.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: