From: Rémi Bernon rbernon@codeweavers.com
Avoids losing monitor information when explorer is shutdown.
The info is still cached in the registry and we will only inform wineserver about display monitors when invalidating the cache. --- server/winstation.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/server/winstation.c b/server/winstation.c index e5f4bfec357..109715d77b3 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -154,6 +154,11 @@ static struct winstation *create_winstation( struct object *root, const struct u release_object( winstation ); return NULL; } + if (flags & WSF_VISIBLE) + { + grab_object( winstation ); + make_object_permanent( &winstation->obj ); + } } else clear_error(); } @@ -862,7 +867,15 @@ DECL_HANDLER(set_user_object_info) struct winstation *winstation = (struct winstation *)obj; reply->is_desktop = 0; reply->old_obj_flags = winstation->flags; - if (req->flags & SET_USER_OBJECT_SET_FLAGS) winstation->flags = req->obj_flags; + if (req->flags & SET_USER_OBJECT_SET_FLAGS) + { + if (!(winstation->flags & WSF_VISIBLE) && (req->obj_flags & WSF_VISIBLE)) + { + grab_object( winstation ); + make_object_permanent( &winstation->obj ); + } + winstation->flags = req->obj_flags; + } } else {