Skip to content
Permalink
Browse files

Don't override focus_in_event to undelay tabs

This seems to cause high CPU spikes while the view has focus.

Fixes: midori-browser#323
  • Loading branch information...
kalikiana committed Jun 10, 2019
1 parent 8291366 commit 58260793bff0fc0717f49cbe17a8308e94744449
Showing with 3 additions and 8 deletions.
  1. +3 −0 core/browser.vala
  2. +0 −8 core/tab.vala
@@ -312,6 +312,9 @@ namespace Midori {
focus_timeout = Timeout.add (500, () => {
focus_timeout = 0;
tab.grab_focus ();
if (tab.display_uri != tab.uri) {
tab.load_uri (tab.display_uri);
}
search_entry.text = tab.get_find_controller ().get_search_text () ?? "";
search.visible = search_entry.text != "";
search.search_mode_enabled = search.visible;
@@ -114,14 +114,6 @@ namespace Midori {
}
}

public override bool focus_in_event (Gdk.EventFocus event) {
// Delayed load on focus
if (display_uri != uri) {
load_uri (display_uri);
}
return base.focus_in_event (event);
}

void update_progress (ParamSpec pspec) {
// Update back/ forward state here since there's no signal
can_go_back = base.can_go_back ();

0 comments on commit 5826079

Please sign in to comment.
You can’t perform that action at this time.