summaryrefslogtreecommitdiff
path: root/src/ui.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-07-28 04:28:37 +0000
committercorvid <corvid@lavabit.com>2012-07-28 04:28:37 +0000
commit23e3d41203f2b343945a9b13b05243977837a987 (patch)
tree421e6692d0e5c45fc10c088caf7a737be259b8e3 /src/ui.cc
parente02ec1bd1405715f050a71d40a9e3c212dd43123 (diff)
when location bar is given focus, temporarily show panels if hidden
Bug #1093 reports that "Opening a new tab in fullscreen mode, the address bar is hidden, even if you press CTRL+L." focus_location() is called from: 1. location's clear button callback (the location bar has to be visible already in order to have a clear button to trigger) 2. UI::handle when it gets KEYS_GOTO, i.e., CTRL-L (the current code will temporarily show the panels) 3. filemenu_cb() when "Open URL" is selected (the user specifically asks to type into location) 4. a_UIcmd_open_url and UIcmd_open_url_nbw when no url given (a window/tab without a url to open is of little use without a visible location bar to type into) ...so it seems good to move the code that temporarily shows panels in case 2 to focus_location().
Diffstat (limited to 'src/ui.cc')
-rw-r--r--src/ui.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui.cc b/src/ui.cc
index afa88073..ce7a2a8a 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -739,10 +739,6 @@ int UI::handle(int event)
a_UIcmd_search_dialog(a_UIcmd_get_bw_by_widget(this));
ret = 1;
} else if (cmd == KEYS_GOTO) {
- if (Panelmode == UI_HIDDEN) {
- panels_toggle();
- temporaryPanels(true);
- }
focus_location();
ret = 1;
} else if (cmd == KEYS_HIDE_PANELS) {
@@ -819,6 +815,10 @@ void UI::set_location(const char *str)
*/
void UI::focus_location()
{
+ if (Panelmode == UI_HIDDEN) {
+ panels_toggle();
+ temporaryPanels(true);
+ }
Location->take_focus();
// Make text selected when already focused.
Location->position(Location->size(), 0);