mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 22:41:30 +03:00
Browser: Add FOREGROUND flag to window creation
To better support new-tab / new-window operations as well as GUIs which want to allow tabs to open in the background by default, add a flag to request a new browser window be foregrounded. This will allow us to simplify at least the GTK frontend a little. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
d25fada8cf
commit
f3bdee255d
@ -3042,6 +3042,8 @@ browser_window_create(enum browser_window_create_flags flags,
|
||||
gw_flags |= GW_CREATE_TAB;
|
||||
if (flags & BW_CREATE_CLONE)
|
||||
gw_flags |= GW_CREATE_CLONE;
|
||||
if (flags & BW_CREATE_FOREGROUND)
|
||||
gw_flags |= GW_CREATE_FOREGROUND;
|
||||
|
||||
ret->window = guit->window->create(ret,
|
||||
(existing != NULL) ? existing->window : NULL,
|
||||
|
@ -109,6 +109,9 @@ enum browser_window_create_flags {
|
||||
* have that option.
|
||||
*/
|
||||
BW_CREATE_UNVERIFIABLE = (1 << 3),
|
||||
|
||||
/** Request foreground opening. */
|
||||
BW_CREATE_FOREGROUND = (1 << 4),
|
||||
};
|
||||
|
||||
/** flags to browser_window_navigate */
|
||||
|
@ -66,7 +66,8 @@ typedef enum {
|
||||
typedef enum {
|
||||
GW_CREATE_NONE = 0, /**< New window */
|
||||
GW_CREATE_CLONE = (1 << 0), /**< Clone existing window */
|
||||
GW_CREATE_TAB = (1 << 1) /**< Create tab in same window as existing */
|
||||
GW_CREATE_TAB = (1 << 1), /**< Create tab in same window as existing */
|
||||
GW_CREATE_FOREGROUND = (1 << 2), /**< Request this window/tab is foregrounded */
|
||||
} gui_window_create_flags;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user