home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / 15380 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  5.7 KB

  1. Path: sparky!uunet!gossip.pyramid.com!olivea!hal.com!hal!brennan
  2. From: brennan@hal.com (Dave Brennan)
  3. Newsgroups: comp.windows.x
  4. Subject: Focus event weirdness
  5. Message-ID: <BRENNAN.92Aug18164915@yosemite.hal.com>
  6. Date: 18 Aug 92 22:49:15 GMT
  7. Organization: HaL Computer Systems, Austin, TX
  8. Lines: 104
  9. NNTP-Posting-Host: yosemite.hal.com
  10.  
  11. Whilst writing a widget I noticed that in some cases when I move the
  12. pointer into my window (using a WM with focus follows pointer) some
  13. times I get one FocusIn event, and other times I get FocusOut events
  14. followed by FocusIn events (one each for the toplevel window and
  15. widget window).  Here's the two cases from an xmon point of view
  16. with the window manager (twm) and the client program routed through
  17. xmon.  Window 04800013 is the toplevel window, and window 04800014 is
  18. the widget's window.  While the net result is the same, the extra events
  19. result in a bunch of extra drawing request from the widget which gives
  20. creates some ugly flashing, or worse if you're on a slow X Terminal.
  21.  
  22. Can anyone tell me what's going on here?  For some reason the server
  23. has decided to send a different set of focus events, seemingly based on
  24. the speed that that the pointer moved, as the SetInputFocus requests
  25. from the window manager look the same in each case.
  26.  
  27. Case 1:
  28.  
  29. Move the pointer into the window nice and slowly, and get once FocusIn event.
  30.  
  31.  
  32.          ............REQUEST: SetInputFocus
  33.              sequence number: 13679
  34.                    revert-to: PointerRoot
  35.               request length: 0003
  36.                        focus: WIN 04800013
  37.                         time: TIM 4794d7f1
  38.          ............REQUEST: GetInputFocus
  39.              sequence number: 13680
  40.               request length: 0001
  41.                                          ..............REPLY: GetInputFocus
  42.                                                    revert-to: PointerRoot
  43.                                              sequence number: 3570
  44.                                                 reply length: 00000000
  45.                                                        focus: WIN 04800013
  46.                                          ..............EVENT: FocusIn
  47.                                                       detail: Nonlinear
  48.                                              sequence number: 0eb8
  49.                                                        event: WIN 04800013
  50.                                                         mode: Normal
  51.          ............REQUEST: GetInputFocus
  52.              sequence number: 13685
  53.               request length: 0001
  54.                                          ..............REPLY: GetInputFocus
  55.                                                    revert-to: PointerRoot
  56.                                              sequence number: 3575
  57.                                                 reply length: 00000000
  58.                                                        focus: WIN 04800013
  59.  
  60.  
  61.  
  62. Case 2:
  63.  
  64. Move the pointer into the window quickly and get this mess of events:
  65.  
  66.          ............REQUEST: SetInputFocus
  67.              sequence number: 13816
  68.                    revert-to: PointerRoot
  69.               request length: 0003
  70.                        focus: WIN 04800013
  71.                         time: TIM 479615e2
  72.          ............REQUEST: GetInputFocus
  73.              sequence number: 13817
  74.               request length: 0001
  75.                                          ..............REPLY: GetInputFocus
  76.                                                    revert-to: PointerRoot
  77.                                              sequence number: 35f9
  78.                                                 reply length: 00000000
  79.                                                        focus: WIN 04800013
  80.          ............REQUEST: GetInputFocus
  81.              sequence number: 13822
  82.               request length: 0001
  83.                                          ..............EVENT: FocusOut
  84.                                                       detail: Pointer
  85.                                              sequence number: 0ec4
  86.                                                        event: WIN 04800014
  87.                                                         mode: Normal
  88.                                          ..............EVENT: FocusOut
  89.                                                       detail: Pointer
  90.                                              sequence number: 0ec4
  91.                                                        event: WIN 04800013
  92.                                                         mode: Normal
  93.                                          ..............EVENT: FocusIn
  94.                                                       detail: Nonlinear
  95.                                              sequence number: 0ec4
  96.                                                        event: WIN 04800013
  97.                                                         mode: Normal
  98.                                          ..............EVENT: FocusIn
  99.                                                       detail: Pointer
  100.                                              sequence number: 0ec4
  101.                                                        event: WIN 04800014
  102.                                                         mode: Normal
  103.                                          ..............REPLY: GetInputFocus
  104.                                                    revert-to: PointerRoot
  105.                                              sequence number: 35fe
  106.                                                 reply length: 00000000
  107.                                                        focus: WIN 04800013
  108.  
  109.  
  110. --
  111. Dave Brennan                                      HaL Computer Systems
  112. brennan@hal.com                                         (512) 794-2855
  113.  
  114. Visit the Emacs Lisp Archive: archive.cis.ohio-state.edu:pub/gnu/emacs
  115.