[Xfce4-commits] [apps/xfce4-screensaver] 03/17: Remove unnecessary background draw to speed up locking (2nd try)
noreply at xfce.org
noreply at xfce.org
Sat Mar 9 22:23:38 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 4bf8372e2b3051cff98285774599d75aaab35c7f
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Tue Feb 5 22:52:50 2019 -0400
Remove unnecessary background draw to speed up locking (2nd try)
---
src/gs-lock-plug.c | 3 +--
src/gs-manager.c | 35 -----------------------------------
2 files changed, 1 insertion(+), 37 deletions(-)
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 03fff95..f4b14fb 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -65,7 +65,6 @@ enum {
#define DIALOG_TIMEOUT_MSEC 60000
static void gs_lock_plug_finalize (GObject *object);
-static void redraw_background (GSLockPlug *plug);
struct GSLockPlugPrivate {
GtkWidget *vbox;
@@ -717,7 +716,6 @@ gs_lock_plug_set_monitor_index (GSLockPlug *plug,
plug->priv->monitor_index = monitor_index;
g_object_notify (G_OBJECT (plug), "monitor-index");
- redraw_background (plug);
}
static void
@@ -1483,6 +1481,7 @@ redraw_background (GSLockPlug *plug) {
GdkPixbuf *pixbuf;
gint screen_width, screen_height, monitor_width, monitor_height;
+ gs_debug ("Redrawing background");
bg = xfce_bg_new();
get_draw_dimensions(plug, bg, &screen_width, &screen_height, &monitor_width, &monitor_height);
pixbuf = xfce_bg_get_pixbuf(bg, screen_width, screen_height, monitor_width, monitor_height);
diff --git a/src/gs-manager.c b/src/gs-manager.c
index 4cee1a1..18a5ff7 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1218,40 +1218,6 @@ window_unmap_cb (GSWindow *window,
}
static void
-apply_background_to_window (GSManager *manager,
- GSWindow *window) {
- cairo_surface_t *surface;
- GdkMonitor *monitor;
- GdkRectangle geometry;
- int width, m_width;
- int height, m_height;
-
- monitor = gs_window_get_monitor (window);
-
- xfce_bg_load_from_preferences (manager->priv->bg, monitor);
-
- if (manager->priv->bg == NULL) {
- gs_debug ("No background available");
- gs_window_set_background_surface (window, NULL);
- }
-
- gdk_monitor_get_geometry (monitor, &geometry);
- m_width = geometry.width;
- m_height = geometry.height;
- gtk_widget_get_preferred_width (GTK_WIDGET (window), &width, NULL);
- gtk_widget_get_preferred_height (GTK_WIDGET (window), &height, NULL);
- gs_debug ("Creating background (Screen: w:%d h:%d, Monitor: w:%d h: %d)", width, height, m_width, m_height);
- surface = xfce_bg_create_surface (manager->priv->bg,
- gs_window_get_gdk_window (window),
- width,
- height,
- m_width,
- m_height);
- gs_window_set_background_surface (window, surface);
- cairo_surface_destroy (surface);
-}
-
-static void
manager_show_window (GSManager *manager,
GSWindow *window) {
GSJob *job;
@@ -1870,7 +1836,6 @@ gs_manager_request_unlock (GSManager *manager) {
/* Find the GSWindow that contains the pointer */
window = find_window_at_pointer (manager);
- apply_background_to_window (manager, window);
gs_window_request_unlock (window);
return TRUE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list