Wireshark-bugs: [Wireshark-bugs] [Bug 11890] Display filter textbox loses focus during live capt
Date: Mon, 12 Dec 2016 18:16:17 +0000

Comment # 9 on bug 11890 from
(In reply to daulis0 from comment #7)
> ui/qt/packet_list.cpp: packet_list_select_first_row() has these 2 lines:
>     gbl_cur_packet_list->goFirstPacket();
>     gbl_cur_packet_list->setFocus();
> 
> If you delete the setFocus() line the problem seems to go away. I don't know
> why you would need to set the focus to that row, as long as you properly
> scroll to the row with goFirstPacket().
> 
> I would just delete that line, but I don't know:
> 1. If there was some real reason to set the focus there

I'm pretty sure it's there because gtk/packet_list.c does the equivalent.

packet_list_select_first_row is called in file.c in several places, including
cf_continue_tail. In the GTK+ UI packet_list_select_first_row exits if there
are no visible packets. The Qt UI grabs focus unconditionally. Without having
done any testing I think this is the underlying problem.

It looks like there's another bug: packet_list_select_last_row doesn't grab
focus at all in the GTK+ UI but does so unconditionally in the Qt UI.


> 2. SearchFrame::setFocus() does more than just setting focus, so I'm not
> sure if that logic is OK to go away.

It resets the search direction. It might make more sense to do that in
MainWindow::on_actionEditFindPacket_triggered.


You are receiving this mail because:
  • You are watching all bug changes.