Bug 5500 - Crash when using monitor:mouse / primaryMonitor:mouse
Status: RESOLVED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: unspecified
Hardware: PC Linux
: P3 normal
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2012-04-22 16:52 EDT by Einar Lielmanis
Modified: 2012-10-06 22:50:04 EDT
0 users

See Also:



Description Einar Lielmanis 2012-04-22 16:52:47 EDT
I'm running a dual monitor setup (2×1200×1600 portraits, twinview), and tried out the obconf settings, which result in rc.xml settings <monitor>Mouse</monitor> and <primaryMonitor>Mouse</primaryMonitor>.

Everything looks ok-ish, until I try to run urxvt, when X closes (apparently by openbox crash).

Running openbox-git with debug enabled (--debug --sync), the last messages spewn out are:

Openbox-Debug: Setting client urxvt colormap: 0x20
Openbox-Debug: Window type: 7
Openbox-Debug: Window group: 0x1200009
Openbox-Debug: Window name: urxvt class: URxvt role:  title: urxvt
Openbox-Debug: Going to try activate new window? yes
Openbox-Debug: Want to focus window 0x1200009 at time 38673317 launched at 0 (last user interaction time 38669357) request from other, allow other desktop: no, desktop switch time 0
Openbox-Debug: Unknown launch time, using 38669357 - independent window
Openbox-Debug: Allowing focus stealing for urxvt at time 38673317 (last user interaction time 38669357)
Openbox-Debug: Positioned: no @ 0 0
Openbox-Debug: Sized: user specified @ 1122 597


I'm running a 64-bit Archlinux, and can observe the problem on both community/openbox (3.5.0) and the custom git master (5aad740) build.

With <monitor>Active</monitor> and <primaryMonitor>Active</primaryMonitor> (or Fixed) I've observed no problems at all.
Comment 1 Dana Jansens 2012-09-30 20:34:16 EDT
Addressed in git by https://github.com/danakj/openbox/commit/8811125436796f1be679649dfd35ff7ad446af39

Thanks for the report.
Comment 2 Dana Jansens 2012-10-06 22:50:04 EDT
Commit pushed to master at https://github.com/danakj/openbox

https://github.com/danakj/openbox/commit/01f62ded2fe289fe245f4f05b5825f4bdcbe1dc3
Use the nearest monitor when the search query rect does not intersect any monitor (Fix bug 5500)

Previously we would try to find the primary monitor and use that when the search
was outside any monitor. However, if the primary monitor is chosen by the mouse
position and the mouse is not inside any monitor, we enter infinite recursion
trying to find the primary monitor.

The nearest monitor is a better metric anyhow, and this ensures
screen_find_monitor() is never recursive as it always returns a value without
depending on other screen.c methods.