[marco] 01/03: debian/changelog: New upstream release.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Thu Jan 25 17:03:39 UTC 2018
This is an automated email from the git hooks/post-receive script.
flexiondotorg-guest pushed a commit to branch ubuntu/bionic
in repository marco.
commit 74431e24265b3bd8238eaec357a5863b46ca55a8
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Thu Jan 25 16:25:01 2018 +0000
debian/changelog: New upstream release.
---
debian/changelog | 6 +
debian/patches/0000_no_scale.patch | 19 -
.../0002_tiled_windows_resized_horizontally.patch | 138 ------
debian/patches/0003_xpresent.patch | 521 ---------------------
debian/patches/series | 3 -
5 files changed, 6 insertions(+), 681 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index fc12cc5..f7d486e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+marco (1.19.2-0ubuntu1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Martin Wimpress <martin.wimpress at ubuntu.com> Tue, 23 Jan 2018 22:43:49 +0000
+
marco (1.18.2-1) unstable; urgency=medium
[ Martin Wimpress ]
diff --git a/debian/patches/0000_no_scale.patch b/debian/patches/0000_no_scale.patch
deleted file mode 100644
index b35df40..0000000
--- a/debian/patches/0000_no_scale.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Author: Martin Wimpress <martin.wimpress at ubuntu.com>
-Description: Disable the automatic scale handling, so that we can fully trust that window and monitor sizes reported by GDK and X11 always match.
-
-diff --git a/src/ui/ui.c b/src/ui/ui.c
-index 2c1747f..9ed9e8b 100644
---- a/src/ui/ui.c
-+++ b/src/ui/ui.c
-@@ -62,6 +62,11 @@ void meta_ui_init(int* argc, char*** argv)
- {
- meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL));
- }
-+
-+ /* We need to be able to fully trust that the window and monitor sizes
-+ * that GDK reports corresponds to the X ones, so we disable the automatic
-+ * scale handling */
-+ gdk_x11_display_set_window_scale (gdk_display_get_default (), 1);
- }
-
- Display* meta_ui_get_display(void)
diff --git a/debian/patches/0002_tiled_windows_resized_horizontally.patch b/debian/patches/0002_tiled_windows_resized_horizontally.patch
deleted file mode 100644
index c004493..0000000
--- a/debian/patches/0002_tiled_windows_resized_horizontally.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-Author: Victor Kareh <vkareh at vkareh.net>
-Description: Allow tiled windows to be resized horizontally
-.
-Determine whether the user is initiating a resize action on a tiled
-window. If the user is trying to grab the window for resizing
-horizontally from the edge that's farther away from the screen edge,
-allow the resize to occur. Otherwise maintain the current tile geometry.
-.
-Also modified the window hints to allow resizing from the window menu.
-
-diff --git a/src/core/constraints.c b/src/core/constraints.c
-index 69263a5..99b0aef 100644
---- a/src/core/constraints.c
-+++ b/src/core/constraints.c
-@@ -876,6 +876,7 @@ constrain_tiling (MetaWindow *window,
- gboolean hminbad, vminbad;
- gboolean horiz_equal, vert_equal;
- gboolean constraint_already_satisfied;
-+ gboolean allow_resize = FALSE;
-
- if (priority > PRIORITY_TILING)
- return TRUE;
-@@ -908,9 +909,43 @@ constrain_tiling (MetaWindow *window,
- if (check_only || constraint_already_satisfied)
- return constraint_already_satisfied;
-
-+ /* Allow the user to resize horizontally when tiled */
-+ if (info->is_user_action)
-+ {
-+ /* Only allow resizing from the window side farther from the screen edge */
-+ switch (info->resize_gravity)
-+ {
-+ case NorthEastGravity:
-+ case EastGravity:
-+ case SouthEastGravity:
-+ if (window->tile_mode == META_TILE_RIGHT)
-+ allow_resize = TRUE;
-+ break;
-+ case NorthWestGravity:
-+ case WestGravity:
-+ case SouthWestGravity:
-+ if (window->tile_mode == META_TILE_LEFT)
-+ allow_resize = TRUE;
-+ break;
-+ }
-+
-+ /* Mark window as being resized from a tiled state */
-+ window->tile_resized = TRUE;
-+ }
-+
-+ if (window->tile_resized)
-+ {
-+ /* Maintain current tile size for user-resized windows */
-+ target_size.x = info->orig.x;
-+ target_size.width = info->orig.width;
-+ }
-+
- /*** Enforce constraint ***/
-- info->current.x = target_size.x;
-- info->current.width = target_size.width;
-+ if (!allow_resize)
-+ {
-+ info->current.x = target_size.x;
-+ info->current.width = target_size.width;
-+ }
- info->current.y = target_size.y;
- info->current.height = target_size.height;
-
-diff --git a/src/core/keybindings.c b/src/core/keybindings.c
-index f4eb01b..fd17b49 100644
---- a/src/core/keybindings.c
-+++ b/src/core/keybindings.c
-@@ -3109,6 +3109,7 @@ handle_toggle_tiled (MetaDisplay *display,
- else if (meta_window_can_tile (window))
- {
- window->tile_mode = mode;
-+ window->tile_resized = FALSE;
- window->tile_monitor_number = meta_screen_get_xinerama_for_window (window->screen, window)->number;
- /* Maximization constraints beat tiling constraints, so if the window
- * is maximized, tiling won't have any effect unless we unmaximize it
-diff --git a/src/core/window-private.h b/src/core/window-private.h
-index b3871bb..e775a59 100644
---- a/src/core/window-private.h
-+++ b/src/core/window-private.h
-@@ -146,6 +146,7 @@ struct _MetaWindow
- * this is the current mode. If not, it is the mode which will be
- * requested after the window grab is released */
- guint tile_mode : 2;
-+ guint tile_resized : 1;
-
- /* The last "full" maximized/unmaximized state. We need to keep track of
- * that to toggle between normal/tiled or maximized/tiled states. */
-@@ -408,12 +409,12 @@ struct _MetaWindow
- #define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED(w) && \
- (w)->tile_mode == META_TILE_RIGHT)
- #define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
--#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED(w) && !(w)->fullscreen && !(w)->shaded)
-+#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
- #define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
- (((w)->size_hints.min_width < (w)->size_hints.max_width) || \
- ((w)->size_hints.min_height < (w)->size_hints.max_height)))
- #define META_WINDOW_ALLOWS_HORIZONTAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_width < (w)->size_hints.max_width)
--#define META_WINDOW_ALLOWS_VERTICAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_height < (w)->size_hints.max_height)
-+#define META_WINDOW_ALLOWS_VERTICAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && !META_WINDOW_TILED(w) && (w)->size_hints.min_height < (w)->size_hints.max_height)
-
- MetaWindow* meta_window_new (MetaDisplay *display,
- Window xwindow,
-diff --git a/src/core/window.c b/src/core/window.c
-index 1bb3bb7..546600d 100644
---- a/src/core/window.c
-+++ b/src/core/window.c
-@@ -476,6 +476,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
- window->require_titlebar_visible = TRUE;
- window->on_all_workspaces = FALSE;
- window->tile_mode = META_TILE_NONE;
-+ window->tile_resized = FALSE;
- window->tile_monitor_number = -1;
- window->shaded = FALSE;
- window->initially_iconic = FALSE;
-@@ -7032,6 +7033,7 @@ update_move (MetaWindow *window,
- /* Check if the cursor is in a position which triggers tiling
- * and set tile_mode accordingly.
- */
-+ MetaTileMode tile_mode = window->tile_mode;
- if (meta_window_can_tile (window) &&
- x >= monitor->rect.x && x < (work_area.x + shake_threshold))
- window->tile_mode = META_TILE_LEFT;
-@@ -7047,6 +7049,10 @@ update_move (MetaWindow *window,
-
- if (window->tile_mode != META_TILE_NONE)
- window->tile_monitor_number = monitor->number;
-+
-+ /* Reset resized flag when changing tile mode */
-+ if (tile_mode != window->tile_mode)
-+ window->tile_resized = FALSE;
- }
-
- /* shake loose (unmaximize) maximized or tiled window if dragged beyond
diff --git a/debian/patches/0003_xpresent.patch b/debian/patches/0003_xpresent.patch
deleted file mode 100644
index c85f682..0000000
--- a/debian/patches/0003_xpresent.patch
+++ /dev/null
@@ -1,521 +0,0 @@
-Author: Victor Kareh <vkareh at vkareh.net>
-Description: XPresent extension support
-
-diff --git a/configure.ac b/configure.ac
-index f2ac9ba..f2dd2ea 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -415,7 +415,19 @@ if test "x$found_xsync" = "xyes"; then
- AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
- fi
-
--MARCO_LIBS="$MARCO_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
-+XPRESENT_LIBS=
-+found_xpresent=no
-+AC_CHECK_LIB(Xpresent, XPresentPixmap,
-+ [AC_CHECK_HEADER(X11/extensions/Xpresent.h,
-+ XPRESENT_LIBS=-lXpresent found_xpresent=yes,,
-+ [#include <X11/Xlib.h>])],
-+ , $ALL_X_LIBS)
-+
-+if test "x$found_xpresent" = "xyes"; then
-+ AC_DEFINE(HAVE_PRESENT, , [Have the Xpresent extension library])
-+fi
-+
-+MARCO_LIBS="$MARCO_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $XPRESENT_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
- MARCO_MESSAGE_LIBS="$MARCO_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
- MARCO_WINDOW_DEMO_LIBS="$MARCO_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
- MARCO_PROPS_LIBS="$MARCO_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
-@@ -523,6 +535,7 @@ marco-$VERSION:
- Shape extension: ${found_shape}
- Resize-and-rotate: ${found_randr}
- Xsync: ${found_xsync}
-+ Xpresent: ${found_xpresent}
- Render: ${have_xrender}
- Xcursor: ${have_xcursor}
- "
-diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
-index 04e89f6..75171cb 100644
---- a/src/compositor/compositor-xrender.c
-+++ b/src/compositor/compositor-xrender.c
-@@ -39,6 +39,7 @@
- #include <cairo/cairo-xlib.h>
-
- #include "display.h"
-+#include "../core/display-private.h"
- #include "screen.h"
- #include "frame.h"
- #include "errors.h"
-@@ -53,6 +54,10 @@
- #include <X11/extensions/Xfixes.h>
- #include <X11/extensions/Xrender.h>
-
-+#ifdef HAVE_PRESENT
-+#include <X11/extensions/Xpresent.h>
-+#endif
-+
- #define USE_IDLE_REPAINT 1
-
- typedef enum _MetaCompWindowType
-@@ -103,6 +108,11 @@ typedef struct _MetaCompositorXRender
- guint enabled : 1;
- guint show_redraw : 1;
- guint debug : 1;
-+
-+#ifdef HAVE_PRESENT
-+ guint has_present : 1;
-+ int present_major;
-+#endif /* HAVE_PRESENT */
- } MetaCompositorXRender;
-
- typedef struct _conv
-@@ -118,6 +128,7 @@ typedef struct _shadow
- guchar *shadow_top;
- } shadow;
-
-+#define NUM_BUFFER 2
- typedef struct _MetaCompScreen
- {
- MetaScreen *screen;
-@@ -132,11 +143,20 @@ typedef struct _MetaCompScreen
- shadow *shadows[LAST_SHADOW_TYPE];
-
- Picture root_picture;
-- Picture root_buffer;
-+ Picture root_buffers[NUM_BUFFER];
-+ Pixmap root_pixmaps[NUM_BUFFER];
-+ int root_current;
- Picture black_picture;
- Picture trans_black_picture;
- Picture root_tile;
- XserverRegion all_damage;
-+#ifdef HAVE_PRESENT
-+ XserverRegion prev_damage;
-+
-+ XID present_eid;
-+ gboolean use_present;
-+ gboolean present_pending;
-+#endif /* HAVE_PRESENT */
-
- guint overlays;
- gboolean compositor_active;
-@@ -675,6 +695,26 @@ find_window_for_child_window_in_display (MetaDisplay *display,
- return NULL;
- }
-
-+#ifdef HAVE_PRESENT
-+static MetaScreen *
-+find_screen_from_output(MetaDisplay *display, Window output)
-+{
-+ int i;
-+ Display *xdisplay = meta_display_get_xdisplay(display);
-+
-+ for (i = 0; i < ScreenCount(xdisplay); i++)
-+ {
-+ MetaScreen *screen = meta_display_screen_for_x_screen(display,
-+ ScreenOfDisplay(xdisplay, i));
-+ MetaCompScreen *info = meta_screen_get_compositor_data(screen);
-+
-+ if (info->output == output)
-+ return screen;
-+ }
-+ return NULL;
-+}
-+#endif /* HAVE_PRESENT */
-+
- static Picture
- solid_picture (MetaDisplay *display,
- MetaScreen *screen,
-@@ -796,38 +836,56 @@ root_tile (MetaScreen *screen)
- return picture;
- }
-
-+static Pixmap
-+create_root_pixmap (MetaScreen *screen)
-+{
-+ MetaDisplay *display = meta_screen_get_display (screen);
-+ Display *xdisplay = meta_display_get_xdisplay (display);
-+ MetaCompScreen *info = meta_screen_get_compositor_data (screen);
-+ Window xroot = meta_screen_get_xroot (screen);
-+ Pixmap pixmap;
-+ int depth, screen_width, screen_height, screen_number;
-+
-+ if (info == NULL)
-+ {
-+ return None;
-+ }
-+
-+ meta_screen_get_size (screen, &screen_width, &screen_height);
-+ screen_number = meta_screen_get_screen_number (screen);
-+
-+ depth = DefaultDepth (xdisplay, screen_number);
-+ pixmap = XCreatePixmap (xdisplay, xroot,
-+ screen_width, screen_height,
-+ depth);
-+
-+ return pixmap;
-+}
-+
- static Picture
--create_root_buffer (MetaScreen *screen)
-+create_root_buffer (MetaScreen *screen, Pixmap root_pixmap)
- {
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
- MetaCompScreen *info = meta_screen_get_compositor_data (screen);
- Picture pict;
- XRenderPictFormat *format;
-- Pixmap root_pixmap;
- Visual *visual;
-- int depth, screen_width, screen_height, screen_number;
-+ int screen_number;
-
- if (info == NULL)
- {
- return None;
- }
-+ g_return_val_if_fail (root_pixmap != None, None);
-
-- meta_screen_get_size (screen, &screen_width, &screen_height);
- screen_number = meta_screen_get_screen_number (screen);
- visual = DefaultVisual (xdisplay, screen_number);
-- depth = DefaultDepth (xdisplay, screen_number);
-
- format = XRenderFindVisualFormat (xdisplay, visual);
- g_return_val_if_fail (format != NULL, None);
-
-- root_pixmap = XCreatePixmap (xdisplay, info->output,
-- screen_width, screen_height, depth);
-- g_return_val_if_fail (root_pixmap != None, None);
--
- pict = XRenderCreatePicture (xdisplay, root_pixmap, format, 0, NULL);
-- XFreePixmap (xdisplay, root_pixmap);
--
- return pict;
- }
-
-@@ -1106,10 +1164,57 @@ paint_dock_shadows (MetaScreen *screen,
- }
- }
-
-+#ifdef HAVE_PRESENT
-+static gboolean
-+present_flip (MetaScreen *screen, XserverRegion region, Pixmap pixmap)
-+{
-+ static uint32_t present_serial;
-+ gboolean debug;
-+
-+ MetaCompScreen *info = meta_screen_get_compositor_data (screen);
-+ MetaDisplay *display = meta_screen_get_display (screen);
-+ Display *xdisplay = meta_display_get_xdisplay (display);
-+
-+ meta_error_trap_push (display);
-+ XPresentPixmap(xdisplay,
-+ info->output,
-+ pixmap,
-+ present_serial,
-+ None,
-+ region,
-+ 0, 0,
-+ None, None, None, PresentOptionNone,
-+ 0, 1, 0, NULL, 0);
-+
-+ int error_code;
-+ error_code = meta_error_trap_pop_with_return (display, FALSE);
-+ if (error_code)
-+ {
-+ debug = DISPLAY_COMPOSITOR (display)->debug;
-+
-+ if (debug)
-+ fprintf (stderr, "XPresentPixmap window %p pixmap %p error: %i\n",
-+ (void *)info->output, (void *)pixmap, error_code);
-+
-+ if (error_code == BadWindow)
-+ g_warning ("XPresent is not compatible with your current system configuration.");
-+
-+ /* Disable the Present extension for this session to prevent frozen windows */
-+ info->use_present = FALSE;
-+ return FALSE;
-+ }
-+
-+ present_serial++;
-+
-+ return TRUE;
-+}
-+#endif /* HAVE_PRESENT */
-+
- static void
- paint_windows (MetaScreen *screen,
- GList *windows,
- Picture root_buffer,
-+ Pixmap root_pixmap,
- XserverRegion region)
- {
- MetaDisplay *display = meta_screen_get_display (screen);
-@@ -1301,21 +1406,35 @@ paint_windows (MetaScreen *screen,
- }
- }
-
-+
-+ XFixesSetPictureClipRegion (xdisplay, root_buffer, 0, 0, region);
-+
-+#ifdef HAVE_PRESENT
-+ if (info->use_present)
-+ info->present_pending = present_flip (screen, region, root_pixmap);
-+
-+ if (!info->use_present || !info->present_pending)
-+#endif /* HAVE_PRESENT */
-+ {
-+ XRenderComposite (xdisplay, PictOpSrc, root_buffer, None,
-+ info->root_picture, 0, 0, 0, 0, 0, 0,
-+ screen_width, screen_height);
-+ }
-+
-+ XFlush (xdisplay);
- XFixesDestroyRegion (xdisplay, paint_region);
- }
-
- static void
- paint_all (MetaScreen *screen,
-- XserverRegion region)
-+ XserverRegion region,
-+ int b)
- {
- MetaCompScreen *info = meta_screen_get_compositor_data (screen);
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
- int screen_width, screen_height;
-
-- /* Set clipping to the given region */
-- XFixesSetPictureClipRegion (xdisplay, info->root_picture, 0, 0, region);
--
- meta_screen_get_size (screen, &screen_width, &screen_height);
-
- if (DISPLAY_COMPOSITOR (display)->show_redraw)
-@@ -1330,6 +1449,9 @@ paint_all (MetaScreen *screen,
- ((double) (rand () % 100)) / 100.0,
- ((double) (rand () % 100)) / 100.0);
-
-+ /* Set clipping to the given region */
-+ XFixesSetPictureClipRegion (xdisplay, info->root_picture, 0, 0, region);
-+
- XRenderComposite (xdisplay, PictOpOver, overlay, None, info->root_picture,
- 0, 0, 0, 0, 0, 0, screen_width, screen_height);
- XRenderFreePicture (xdisplay, overlay);
-@@ -1337,15 +1459,13 @@ paint_all (MetaScreen *screen,
- usleep (100 * 1000);
- }
-
-- if (info->root_buffer == None)
-- info->root_buffer = create_root_buffer (screen);
-+ if (info->root_pixmaps[b] == None)
-+ info->root_pixmaps[b] = create_root_pixmap (screen);
-
-- paint_windows (screen, info->windows, info->root_buffer, region);
-+ if (info->root_buffers[b] == None)
-+ info->root_buffers[b] = create_root_buffer (screen, info->root_pixmaps[b]);
-
-- XFixesSetPictureClipRegion (xdisplay, info->root_buffer, 0, 0, region);
-- XRenderComposite (xdisplay, PictOpSrc, info->root_buffer, None,
-- info->root_picture, 0, 0, 0, 0, 0, 0,
-- screen_width, screen_height);
-+ paint_windows (screen, info->windows, info->root_buffers[b], info->root_pixmaps[b], region);
- }
-
- static void
-@@ -1355,14 +1475,47 @@ repair_screen (MetaScreen *screen)
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
-
-- if (info!=NULL && info->all_damage != None)
-+ g_return_if_fail(info != NULL);
-+
-+ if (info->all_damage != None)
- {
-- meta_error_trap_push (display);
-- paint_all (screen, info->all_damage);
-- XFixesDestroyRegion (xdisplay, info->all_damage);
-- info->all_damage = None;
-- info->clip_changed = FALSE;
-- meta_error_trap_pop (display, FALSE);
-+#ifdef HAVE_PRESENT
-+ if (info->use_present)
-+ {
-+ if (!info->present_pending)
-+ {
-+ XserverRegion damage = info->all_damage;
-+ meta_error_trap_push (display);
-+ if (info->prev_damage)
-+ {
-+ XFixesUnionRegion(xdisplay, info->prev_damage, info->prev_damage, damage);
-+ damage = info->prev_damage;
-+ }
-+
-+ paint_all (screen, damage, info->root_current);
-+
-+ if (++info->root_current >= NUM_BUFFER)
-+ info->root_current = 0;
-+
-+ if (info->prev_damage)
-+ XFixesDestroyRegion (xdisplay, info->prev_damage);
-+
-+ info->prev_damage = info->all_damage;
-+ info->all_damage = None;
-+ info->clip_changed = FALSE;
-+ meta_error_trap_pop (display, FALSE);
-+ }
-+ }
-+ else
-+#endif /* HAVE_PRESENT */
-+ {
-+ meta_error_trap_push (display);
-+ paint_all (screen, info->all_damage, info->root_current);
-+ XFixesDestroyRegion (xdisplay, info->all_damage);
-+ info->all_damage = None;
-+ info->clip_changed = FALSE;
-+ meta_error_trap_pop (display, FALSE);
-+ }
- }
- }
-
-@@ -2143,10 +2296,18 @@ process_configure_notify (MetaCompositorXRender *compositor,
- return;
-
- info = meta_screen_get_compositor_data (screen);
-- if (info != NULL && info->root_buffer)
-+ if (info != NULL)
- {
-- XRenderFreePicture (xdisplay, info->root_buffer);
-- info->root_buffer = None;
-+ int b;
-+ for (b = 0; b < NUM_BUFFER; b++)
-+ {
-+ if (info->root_buffers[b]) {
-+ XRenderFreePicture (xdisplay, info->root_buffers[b]);
-+ XFreePixmap (xdisplay, info->root_pixmaps[b]);
-+ info->root_buffers[b] = None;
-+ info->root_pixmaps[b] = None;
-+ }
-+ }
- }
-
- damage_screen (screen);
-@@ -2422,6 +2583,47 @@ process_shape (MetaCompositorXRender *compositor,
- }
- }
-
-+#ifdef HAVE_PRESENT
-+static void
-+xrender_present_complete(MetaScreen *screen,
-+ XPresentCompleteNotifyEvent *ce)
-+{
-+ MetaCompScreen *info = meta_screen_get_compositor_data (screen);
-+
-+ info->present_pending = False;
-+ repair_screen(screen);
-+}
-+#endif /* HAVE_PRESENT */
-+
-+static void
-+process_generic(MetaCompositorXRender *compositor,
-+ XGenericEvent *event)
-+{
-+ XGenericEventCookie *ge = (XGenericEventCookie *) event;
-+ Display *xdisplay = meta_display_get_xdisplay (compositor->display);
-+ XGetEventData(xdisplay, ge);
-+
-+ switch (ge->evtype)
-+ {
-+#ifdef HAVE_PRESENT
-+ case PresentConfigureNotify:
-+ break;
-+ case PresentCompleteNotify:
-+ {
-+ if (ge->extension == compositor->present_major)
-+ {
-+ XPresentCompleteNotifyEvent *ce = ge->data;
-+ MetaScreen *screen = find_screen_from_output(compositor->display, ce->window);
-+ if (screen)
-+ xrender_present_complete(screen, ce);
-+ }
-+ }
-+ break;
-+#endif /* HAVE_PRESENT */
-+ }
-+ XFreeEventData(xdisplay, ge);
-+}
-+
- static int
- timeout_debug (MetaCompositorXRender *compositor)
- {
-@@ -2506,6 +2708,7 @@ xrender_manage_screen (MetaCompositor *compositor,
- MetaScreen *screen)
- {
- #ifdef HAVE_COMPOSITE_EXTENSIONS
-+ MetaCompositorXRender *xrc = (MetaCompositorXRender *) compositor;
- MetaCompScreen *info;
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
-@@ -2513,6 +2716,7 @@ xrender_manage_screen (MetaCompositor *compositor,
- XRenderPictFormat *visual_format;
- int screen_number = meta_screen_get_screen_number (screen);
- Window xroot = meta_screen_get_xroot (screen);
-+ int b;
-
- /* Check if the screen is already managed */
- if (meta_screen_get_compositor_data (screen))
-@@ -2554,7 +2758,10 @@ xrender_manage_screen (MetaCompositor *compositor,
- return;
- }
-
-- info->root_buffer = None;
-+ for (b = 0; b < NUM_BUFFER; b++) {
-+ info->root_buffers[b] = None;
-+ info->root_pixmaps[b] = None;
-+ }
- info->black_picture = solid_picture (display, screen, TRUE, 1, 0, 0, 0);
-
- info->root_tile = None;
-@@ -2578,6 +2785,21 @@ xrender_manage_screen (MetaCompositor *compositor,
- else
- meta_verbose ("Disabling shadows\n");
-
-+#ifdef HAVE_PRESENT
-+ if (xrc->has_present)
-+ {
-+ info->present_eid = XPresentSelectInput(xdisplay, info->output,
-+ PresentCompleteNotifyMask);
-+ info->use_present = TRUE;
-+ info->present_pending = FALSE;
-+ }
-+ else
-+ {
-+ info->use_present = FALSE;
-+ g_warning ("XPresent not available");
-+ }
-+#endif /* HAVE_PRESENT */
-+
- XClearArea (xdisplay, info->output, 0, 0, 0, 0, TRUE);
-
- meta_screen_set_cm_selection (screen);
-@@ -2761,6 +2983,10 @@ xrender_process_event (MetaCompositor *compositor,
- process_destroy (xrc, (XDestroyWindowEvent *) event);
- break;
-
-+ case GenericEvent:
-+ process_generic (xrc, (XGenericEvent *) event);
-+ break;
-+
- default:
- if (event->type == meta_display_get_damage_event_base (xrc->display) + XDamageNotify)
- process_damage (xrc, (XDamageNotifyEvent *) event);
-@@ -3066,6 +3292,9 @@ meta_compositor_xrender_new (MetaDisplay *display)
- xrc->atom_net_wm_window_type_tooltip = atoms[14];
- xrc->show_redraw = FALSE;
- xrc->debug = FALSE;
-+#ifdef HAVE_PRESENT
-+ xrc->has_present = XPresentQueryExtension(xdisplay, &xrc->present_major, NULL, NULL);
-+#endif /* HAVE_PRESENT */
-
- #ifdef USE_IDLE_REPAINT
- meta_verbose ("Using idle repaint\n");
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index a1a4f18..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-0000_no_scale.patch
-0002_tiled_windows_resized_horizontally.patch
-0003_xpresent.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/marco.git
More information about the pkg-mate-commits
mailing list