mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-04 09:45:18 +00:00
Return existing window in app_window_new()
Since the returned window is weak, it can already returns existing windows (instead of creating one and failing to insert). This allows the following set_kiosk() function to create a main window before the app constructor is called.
This commit is contained in:
parent
563067341c
commit
cd7b5761af
@ -658,6 +658,10 @@ virt_viewer_app_window_new(VirtViewerApp *self, gint nth)
|
||||
VirtViewerWindow* window;
|
||||
GtkWindow *w;
|
||||
|
||||
window = virt_viewer_app_get_nth_window(self, nth);
|
||||
if (window)
|
||||
return window;
|
||||
|
||||
window = g_object_new(VIRT_VIEWER_TYPE_WINDOW, "app", self, NULL);
|
||||
if (self->priv->main_window)
|
||||
virt_viewer_window_set_zoom_level(window, virt_viewer_window_get_zoom_level(self->priv->main_window));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user