id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3766	add_widget() doesn't remove focus from the previously focused widget	mooffie	mooffie	"== The problem:

When adding a new widget to a dialog, at runtime, add_widget() sets WST_FOCUSED on the new widget, but doesn't clear it from the previously focused widget. The result is two (or more) widgets that think they're the focused ones.

== Seeing it:

Open the editor with some file. [You can use the mouse to carry out the following steps.] Turn off fullscreen for this WEdit and make is smaller. Now open another file in this same dialog (e.g., press **C-n** for a new file), and for this new WEdit too turn off fullscreen. Make this WEdit smaller so you can see the frames of both WEdits. You'll see that ''both frames have the color designated for a focused WEdit''. Play with the mouse in both frames and you'll see that the problem gets fixed.

== Note

The actual function is add_widget_autopos(), and that's how it's written in the commit message. For the ticket I wanted something ""easier"" in the title."	defect	closed	major	4.8.19	mc-core	master	fixed					merged	committed-master
