[Xfce4-commits] [apps/xfce4-screensaver] 15/17: prevent auth window from disapearing on lid open
noreply at xfce.org
noreply at xfce.org
Sat Mar 9 22:23:50 CET 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit e80392dc370f6e1bc8f772c42e4b43e270acc51d
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Sat Feb 16 15:04:14 2019 -0400
prevent auth window from disapearing on lid open
---
src/gs-manager.c | 3 +++
src/gs-window-x11.c | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/gs-manager.c b/src/gs-manager.c
index a7cb27d..1c733ca 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1510,8 +1510,11 @@ on_display_monitor_added (GdkDisplay *display,
this_display = gs_window_get_display (GS_WINDOW (l->data));
this_monitor_model = gs_window_get_monitor_model (GS_WINDOW (l->data));
if (this_display == display && g_strcmp0 (this_monitor_model, gdk_monitor_get_model(monitor)) == 0) {
+ gint tmp;
+
gs_debug ("Found window for this Monitor");
gs_window_set_monitor (GS_WINDOW (l->data), monitor);
+ gtk_widget_get_preferred_width (l->data, &tmp, &tmp);
should_create = FALSE;
}
}
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index b579102..c33963f 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -1621,7 +1621,6 @@ void
gs_window_request_unlock (GSWindow *window) {
g_return_if_fail (GS_IS_WINDOW (window));
- gs_debug ("Requesting unlock");
if (!gtk_widget_get_visible (GTK_WIDGET (window))) {
gs_debug ("Request unlock but window is not visible!");
@@ -1637,10 +1636,10 @@ gs_window_request_unlock (GSWindow *window) {
return;
}
+ gs_debug ("Requesting unlock for display %s", window->priv->monitor_model);
if (window->priv->popup_dialog_idle_id == 0) {
add_popup_dialog_idle (window);
}
-
window_set_dialog_up (window, TRUE);
}
@@ -1791,6 +1790,8 @@ gs_window_set_status_message (GSWindow *window,
void
gs_window_set_monitor (GSWindow *window,
GdkMonitor *monitor) {
+ gint tmp;
+
g_return_if_fail (GS_IS_WINDOW (window));
if (window->priv->monitor == monitor) {
@@ -1801,6 +1802,7 @@ gs_window_set_monitor (GSWindow *window,
window->priv->monitor_model = g_strdup(gdk_monitor_get_model(monitor));
gtk_widget_queue_resize (GTK_WIDGET (window));
+ gtk_widget_get_preferred_width (GTK_WIDGET (window), &tmp, &tmp);
g_object_notify (G_OBJECT (window), "monitor");
}
@@ -2047,6 +2049,10 @@ gs_window_real_size_request (GtkWidget *widget,
bin = GTK_BIN (widget);
child = gtk_bin_get_child (bin);
+ // monitor been removed, but we will return it later on
+ if (!GDK_IS_MONITOR (window->priv->monitor))
+ return;
+
if (child && gtk_widget_get_visible (child)) {
gtk_widget_get_preferred_size (child, requisition, NULL);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list