[project @ 2004-06-10 13:05:43 by bursa]

Fix focus for new windows without URL bar.

svn path=/import/netsurf/; revision=948
This commit is contained in:
James Bursa 2004-06-10 13:05:43 +00:00
parent 3d1ea647c8
commit 18ea7c459c

View File

@ -160,9 +160,14 @@ gui_window *gui_create_browser_window(struct browser_window *bw,
/* Set the caret position to the URL bar
*/
error = xwimp_set_caret_position(
g->data.browser.toolbar->toolbar_handle,
ICON_TOOLBAR_URL, -1, -1, -1, 0);
if (g->data.browser.toolbar && g->data.browser.toolbar->url_bar)
error = xwimp_set_caret_position(
g->data.browser.toolbar->toolbar_handle,
ICON_TOOLBAR_URL, -1, -1, -1, 0);
else
error = xwimp_set_caret_position(g->window,
wimp_ICON_WINDOW, -100, -100, 32, -1);
if (error) {
LOG(("xwimp_set_caret_position: 0x%x: %s",
error->errnum, error->errmess));