[Xfce4-commits] [apps/xfce4-screensaver] 12/17: do not recreate already created auth windows
noreply at xfce.org
noreply at xfce.org
Sat Mar 9 22:23:47 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 0fa525a0970e0c0db39d4d1c9bb351986642c8b9
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Sat Feb 9 14:55:37 2019 -0400
do not recreate already created auth windows
---
src/gs-manager.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/gs-manager.c b/src/gs-manager.c
index 5b9e508..d151fa9 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1092,7 +1092,7 @@ find_window_at_pointer (GSManager *manager) {
for (l = manager->priv->windows; l; l = l->next) {
GSWindow *win = GS_WINDOW (l->data);
if (gs_window_get_display (win) == display &&
- gs_window_get_monitor (win) == monitor) {
+ g_strcmp0 (gs_window_get_monitor_model (win), gdk_monitor_get_model (monitor)) == 0) {
window = win;
}
}
@@ -1419,6 +1419,20 @@ gs_manager_create_window_for_monitor (GSManager *manager,
GdkMonitor *monitor) {
GSWindow *window;
GdkRectangle rect;
+ GSList *l;
+ GdkDisplay *display = gdk_monitor_get_display (monitor);
+
+ for (l = manager->priv->windows; l; l = l->next) {
+ GdkDisplay *this_display;
+ const gchar *this_monitor_model;
+
+ 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) {
+ gs_debug ("Found already created window for this Monitor");
+ return;
+ }
+ }
gdk_monitor_get_geometry (monitor, &rect);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list