Hi,

Moving to 2014-SEP-09 snapshot (amd64)[1] I started to notice
something strange with my wm (blackbox) and window focus
events. I have it set to "sloppy" focus, where focus follows the
mouse, but doesn't leave the last visited window, until the mouse
enters a new window.

Every so often moving the mouse from one window to another,
the latter does not get focus.

I tried to capture the condition with xev. Here the first sequence
of EnterNotify -> KeymapNotify -> FocusIn -> LeaveNotify ->
FocusOut shows an expected behavior where mouse moved
from xterm to xev window, xev window:

1. EnterNotify (mouse moved from xterm -> xev window)
2. FocusIn (xev window got focus)
3. bunch of MotionNotify events as mouse moved around
4. LeaveNotify (mouse left xev window)
5. FocusOut (mouse entered xterm window)

EnterNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741873, (13,137), root:(960,467),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus NO, state 0

KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  4294967224 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741877, (13,137), root:(960,467),
    state 0x0, is_hint 0, same_screen YES

FocusIn event, serial 35, synthetic NO, window 0x1c00001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  4294967224 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741889, (47,139), root:(994,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741903, (72,139), root:(1019,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741913, (82,139), root:(1029,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741926, (84,139), root:(1031,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82741937, (84,139), root:(1031,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742392, (79,139), root:(1026,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742404, (67,138), root:(1014,468),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742416, (41,134), root:(988,464),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742428, (10,133), root:(957,463),
    state 0x0, is_hint 0, same_screen YES

LeaveNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742433, (-22,131), root:(925,461),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

FocusOut event, serial 35, synthetic NO, window 0x1c00001,
    mode NotifyNormal, detail NotifyNonlinear


This next sequence shows the problem:

1. EnterNotify (mouse moved from xterm -> xev window)
2. FocusIn (xev window got focus - briefly?)
3. FocusOut (mouse still in xev window, but window w/o focus)
    XXX What happened here?
4. bunch of MotionNotify events as mouse moved around
5. LeaveNotify (mouse left xev window)

Notice no FocusOut event at the end of the sequence. Why
did the FocusOut event happen early? What causes this?


EnterNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742834, (23,139), root:(970,469),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus NO, state 0

KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  4294967224 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742837, (23,139), root:(970,469),
    state 0x0, is_hint 0, same_screen YES

FocusIn event, serial 35, synthetic NO, window 0x1c00001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  4294967224 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

FocusOut event, serial 35, synthetic NO, window 0x1c00001,
    mode NotifyNormal, detail NotifyNonlinear

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742850, (66,139), root:(1013,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742862, (101,139), root:(1048,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742874, (126,139), root:(1073,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82742886, (132,139), root:(1079,469),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752228, (132,143), root:(1079,473),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752240, (132,144), root:(1079,474),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752252, (132,149), root:(1079,479),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752264, (132,154), root:(1079,484),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752275, (132,159), root:(1079,489),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752288, (132,170), root:(1079,500),
    state 0x0, is_hint 0, same_screen YES

LeaveNotify event, serial 35, synthetic NO, window 0x1c00001,
    root 0x2b8, subw 0x0, time 82752294, (132,185), root:(1079,515),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus NO, state 0


Anyone else seeing this behavior, possibly with other WMs?
Thoughts as to the cause? or when this might have been
introduced? My last snapshot was pretty old (2014-MAR-21)
and didn't display this issue.

--patrick

[1] dmesg:
OpenBSD 5.6-current (GENERIC.MP) #368: Tue Sep  9 00:28:20 MDT 2014
    t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3850960896 (3672MB)
avail mem = 3739717632 (3566MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf9ba0 (60 entries)
bios0: vendor LENOVO version "8FET32WW (1.16 )" date 11/03/2011
bios0: LENOVO 06112EU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC HPET APIC MCFG UEFI UEFI SSDT SSDT UEFI
acpi0: wakeup devices PB4_(S4) PB5_(S4) PB6_(S4) PB7_(S4) OHC1(S3)
OHC2(S3) EHC2(S3) OHC3(S3) EHC3(S3) OHC4(S3) SBAZ(S4) GEC_(S4)
P2P_(S5) SPB0(S4) SPB1(S4) SPB2(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD E-350 Processor, 20916.72 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.0.0.0.0, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD E-350 Processor, 1596.60 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-31
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PB4_)
acpiprt2 at acpi0: bus -1 (PB5_)
acpiprt3 at acpi0: bus 1 (PB6_)
acpiprt4 at acpi0: bus -1 (PB7_)
acpiprt5 at acpi0: bus 2 (P2P_)
acpiprt6 at acpi0: bus 3 (SPB0)
acpiprt7 at acpi0: bus 4 (SPB1)
acpiprt8 at acpi0: bus -1 (SPB2)
acpiprt9 at acpi0: bus -1 (SPB3)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, PSS
acpicpu1 at acpi0: C2, PSS
acpitz0 at acpi0: critical temperature is 92 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpithinkpad0 at acpi0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "42T4785" serial  3355 type LION oem "SANYO"
acpibtn2 at acpi0: LID_
cpu0: 20916 MHz: speeds: 1600 1280 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
radeondrm0 at pci0 dev 1 function 0 "ATI Radeon HD 6310" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD 6310 HD Audio" rev 0x00: msi
azalia0: no supported codecs
ppb0 at pci0 dev 6 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D
(0x2800), msi, address e8:9a:8f:66:06:38
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: apic 2 int
19, AHCI 1.2
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, TOSHIBA MK2555GS, FG00> SCSI3
0/direct fixed naa.50000391c6887a53
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x42: polling
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x51: 2GB DDR3 SDRAM PC3-10600 SO-DIMM
azalia1 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x40: apic 2 int 16
azalia1: codecs: Conexant/0x5066
audio0 at azalia1
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x40
ppb1 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x40
pci2 at ppb1 bus 2
ppb2 at pci0 dev 21 function 0 "ATI SB800 PCIE" rev 0x00
pci3 at ppb2 bus 3
ppb3 at pci0 dev 21 function 1 "ATI SB800 PCIE" rev 0x00: msi
pci4 at ppb3 bus 4
"Realtek 8188CE" rev 0x01 at pci4 dev 0 function 0 not configured
pchb1 at pci0 dev 24 function 0 "AMD AMD64 14h Link Cfg" rev 0x43
pchb2 at pci0 dev 24 function 1 "AMD AMD64 14h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 14h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 14h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 14h CPU Power" rev 0x00
pchb5 at pci0 dev 24 function 5 "AMD AMD64 14h Reserved" rev 0x00
pchb6 at pci0 dev 24 function 6 "AMD AMD64 14h NB Power" rev 0x00
pchb7 at pci0 dev 24 function 7 "AMD AMD64 14h Reserved" rev 0x00
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.5
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
umass0 at uhub0 port 2 configuration 1 interface 0 "JMicron USB to
ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
cd0 at scsibus2 targ 1 lun 0: <HL-DT-ST, DVDRAM GH24NSB0, LN01> SCSI0
5/cdrom removable serial.152d2338988E49835560
umass1 at uhub1 port 2 configuration 1 interface 0 "Generic
USB2.0-CRW" rev 2.00/58.88 addr 2
umass1: using SCSI over Bulk-Only
scsibus3 at umass1: 2 targets, initiator 0
sd1 at scsibus3 targ 1 lun 0: <Generic-, Multi-Card, 1.00> SCSI0
0/direct removable serial.0bda0158114173400000
uvideo0 at uhub1 port 5 configuration 1 interface 0 "Image Processor
Integrated Camera" rev 2.00/0.29 addr 3
video0 at uvideo0
vscsi0 at root
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
root on sd0a (3be80d641a0b9637.a) swap on sd0b dump on sd0b
drm: initializing kernel modesetting (PALM 0x1002:0x9802 0x17AA:0x21DF).
radeondrm0: VRAM: 384M 0x0000000000000000 - 0x0000000017FFFFFF (384M used)
radeondrm0: GTT: 512M 0x0000000018000000 - 0x0000000037FFFFFF
drm: PCIE GART of 512M enabled (table at 0x0000000000040000).
drm: Internal thermal controller without fan control
radeondrm0: 1366x768
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Reply via email to