unbreak build by removing obsolete patches

This commit is contained in:
robert 2020-08-21 14:40:44 +00:00
parent dac30d08de
commit c21d46af6a
10 changed files with 0 additions and 470 deletions

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_compositor_compositor-private_h,v 1.1 2020/04/25 10:49:43 robert Exp $
From 5dc180ef7308b44f19f61ffb39e1c2df507731e2 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 29 Feb 2020 13:01:36 +0000
Subject: [PATCH 2/4] compositor: fix possible crash closing/destroying window
. Fixes to previous commit.
Index: src/compositor/compositor-private.h
--- src/compositor/compositor-private.h.orig
+++ src/compositor/compositor-private.h
@@ -50,6 +50,9 @@ struct _MetaCompositor
MetaScreen *screen,
MetaWindow *window);
+ void (*free_window) (MetaCompositor *compositor,
+ MetaWindow *window);
+
void (*maximize_window) (MetaCompositor *compositor,
MetaWindow *window);
void (*unmaximize_window) (MetaCompositor *compositor,

View File

@ -1,91 +0,0 @@
$OpenBSD: patch-src_compositor_compositor-xrender_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From 1748fcb3c74836c8f59453f8a1689bb7c612f035 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Mon, 24 Feb 2020 10:42:20 +0000
Subject: [PATCH 2/3] Guard against null changes introduced by previous commit
From 5dc180ef7308b44f19f61ffb39e1c2df507731e2 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 29 Feb 2020 13:01:36 +0000
Subject: [PATCH 2/4] compositor: fix possible crash closing/destroying window
. Fixes to previous commit.
Index: src/compositor/compositor-xrender.c
--- src/compositor/compositor-xrender.c.orig
+++ src/compositor/compositor-xrender.c
@@ -645,7 +645,7 @@ shadow_picture_clip (Display *xdisplay,
visible_region = meta_window_get_frame_bounds (cw->window);
- if (!visible_region)
+ if (visible_region == NULL)
return;
shadow_dx = -1 * (int) shadow_offsets_x [cw->shadow_type] - borders.invisible.left;
@@ -1153,7 +1153,7 @@ border_size (MetaCompWindow *cw)
{
visible_region = meta_window_get_frame_bounds (cw->window);
- if (visible_region)
+ if (visible_region != NULL)
visible = cairo_region_to_xserver_region (xdisplay, visible_region);
}
@@ -3041,23 +3041,40 @@ xrender_end_move (MetaCompositor *compositor,
#endif
}
+#endif /* 0 */
+
static void
xrender_free_window (MetaCompositor *compositor,
MetaWindow *window)
{
#ifdef HAVE_COMPOSITE_EXTENSIONS
- /* FIXME: When an undecorated window is hidden this is called,
- but the window does not get readded if it is subsequentally shown again
- See http://bugzilla.gnome.org/show_bug.cgi?id=504876
+ MetaCompositorXRender *xrc;
+ MetaFrame *frame;
+ Window xwindow;
- I don't *think* theres any need for this call anyway, leaving it out
- does not seem to cause any side effects so far, but I should check with
- someone who understands more. */
- /* destroy_win (compositor->display, window->xwindow, FALSE); */
+ xrc = (MetaCompositorXRender *) compositor;
+ frame = meta_window_get_frame (window);
+ xwindow = None;
+
+ if (frame)
+ {
+ xwindow = meta_frame_get_xwindow (frame);
+ }
+ else
+ {
+ /* FIXME: When an undecorated window is hidden this is called, but the
+ * window does not get readded if it is subsequentally shown again. See:
+ * http://bugzilla.gnome.org/show_bug.cgi?id=504876
+ */
+ /* xwindow = meta_window_get_xwindow (window); */
+ }
+
+ if (xwindow != None)
+ destroy_win (xrc->display, xwindow, FALSE);
#endif
}
-#endif /* 0 */
+
static void
xrender_process_event (MetaCompositor *compositor,
XEvent *event,
@@ -3360,6 +3377,7 @@ static MetaCompositor comp_info = {
xrender_process_event,
xrender_get_window_surface,
xrender_set_active_window,
+ xrender_free_window,
xrender_maximize_window,
xrender_unmaximize_window,
};

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-src_compositor_compositor_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From 5dc180ef7308b44f19f61ffb39e1c2df507731e2 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 29 Feb 2020 13:01:36 +0000
Subject: [PATCH 2/4] compositor: fix possible crash closing/destroying window
. Fixes to previous commit.
Index: src/compositor/compositor.c
--- src/compositor/compositor.c.orig
+++ src/compositor/compositor.c
@@ -156,6 +156,10 @@ void meta_compositor_end_move (MetaCompositor *composi
void meta_compositor_free_window (MetaCompositor *compositor,
MetaWindow *window)
{
+ #ifdef HAVE_COMPOSITE_EXTENSIONS
+ if (compositor && compositor->free_window)
+ compositor->free_window (compositor, window);
+ #endif
}
void

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-src_core_frame_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From c0a61756c01f5d8fa1e58fe97d0cb3a9d42c9871 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 22 Feb 2020 11:59:45 +0000
Subject: [PATCH 1/3] Introduce nullpointer checks and return null if
validation fails
Index: src/core/frame.c
--- src/core/frame.c.orig
+++ src/core/frame.c
@@ -407,10 +407,14 @@ meta_frame_sync_to_window (MetaFrame *frame,
cairo_region_t *
meta_frame_get_frame_bounds (MetaFrame *frame)
{
- return meta_ui_get_frame_bounds (frame->window->screen->ui,
- frame->xwindow,
- frame->rect.width,
- frame->rect.height);
+ if (frame->xwindow && frame->window != NULL && frame->window->screen != NULL && frame->window->screen->ui != NULL)
+ {
+ return meta_ui_get_frame_bounds (frame->window->screen->ui,
+ frame->xwindow,
+ frame->rect.width,
+ frame->rect.height);
+ }
+ return NULL;
}
void

View File

@ -1,76 +0,0 @@
$OpenBSD: patch-src_core_stack_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From 5716fe12e40368141aec92b99bd8e76a963225fb Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Tue, 3 Mar 2020 20:05:27 +0000
Subject: [PATCH 3/4] stack: make meta_window_raise() and meta_window_lower()
smarter
Index: src/core/stack.c
--- src/core/stack.c.orig
+++ src/core/stack.c
@@ -181,9 +181,26 @@ void
meta_stack_raise (MetaStack *stack,
MetaWindow *window)
{
- meta_window_set_stack_position_no_sync (window,
- stack->n_positions - 1);
+ GList *l;
+ int max_stack_position = window->stack_position;
+ MetaWorkspace *workspace;
+ g_assert (stack->added == NULL);
+
+ workspace = meta_window_get_workspace (window);
+ for (l = stack->sorted; l; l = l->next)
+ {
+ MetaWindow *w = (MetaWindow *) l->data;
+ if (meta_window_located_on_workspace (w, workspace) &&
+ w->stack_position > max_stack_position)
+ max_stack_position = w->stack_position;
+ }
+
+ if (max_stack_position == window->stack_position)
+ return;
+
+ meta_window_set_stack_position_no_sync (window, max_stack_position);
+
stack_sync_to_server (stack);
}
@@ -191,8 +208,26 @@ void
meta_stack_lower (MetaStack *stack,
MetaWindow *window)
{
- meta_window_set_stack_position_no_sync (window, 0);
+ GList *l;
+ int min_stack_position = window->stack_position;
+ MetaWorkspace *workspace;
+ g_assert (stack->added == NULL);
+
+ workspace = meta_window_get_workspace (window);
+ for (l = stack->sorted; l; l = l->next)
+ {
+ MetaWindow *w = (MetaWindow *) l->data;
+ if (meta_window_located_on_workspace (w, workspace) &&
+ w->stack_position < min_stack_position)
+ min_stack_position = w->stack_position;
+ }
+
+ if (min_stack_position == window->stack_position)
+ return;
+
+ meta_window_set_stack_position_no_sync (window, min_stack_position);
+
stack_sync_to_server (stack);
}
@@ -201,6 +236,7 @@ meta_stack_freeze (MetaStack *stack)
{
stack->freeze_count += 1;
}
+
void
meta_stack_thaw (MetaStack *stack)

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_core_window-private_h,v 1.1 2020/04/25 10:49:43 robert Exp $
From 5dc180ef7308b44f19f61ffb39e1c2df507731e2 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 29 Feb 2020 13:01:36 +0000
Subject: [PATCH 2/4] compositor: fix possible crash closing/destroying window
. Fixes to previous commit.
Index: src/core/window-private.h
--- src/core/window-private.h.orig
+++ src/core/window-private.h
@@ -618,6 +618,9 @@ void meta_window_set_gravity (MetaWindow *window,
void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
XEvent *event);
+MetaWorkspace *
+meta_window_get_workspace (MetaWindow *window);
+
GList* meta_window_get_workspaces (MetaWindow *window);
gboolean meta_window_located_on_workspace (MetaWindow *window,

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-src_core_window_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From 5dc180ef7308b44f19f61ffb39e1c2df507731e2 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Sat, 29 Feb 2020 13:01:36 +0000
Subject: [PATCH 2/4] compositor: fix possible crash closing/destroying window
. Fixes to previous commit.
Index: src/core/window.c
--- src/core/window.c.orig
+++ src/core/window.c
@@ -2099,9 +2099,10 @@ windows_overlap (const MetaWindow *w1, const MetaWindo
static gboolean
window_would_be_covered (const MetaWindow *newbie)
{
- MetaWorkspace *workspace = newbie->workspace;
+ MetaWorkspace *workspace;
GList *tmp, *windows;
+ workspace = meta_window_get_workspace ((MetaWindow *) newbie);
windows = meta_workspace_list_windows (workspace);
tmp = windows;
@@ -6214,6 +6215,17 @@ idle_update_icon (gpointer data)
return FALSE;
}
+
+
+MetaWorkspace *
+meta_window_get_workspace (MetaWindow *window)
+{
+ if (window->on_all_workspaces)
+ return window->screen->active_workspace;
+ else
+ return window->workspace;
+}
+
GList*
meta_window_get_workspaces (MetaWindow *window)

View File

@ -1,92 +0,0 @@
$OpenBSD: patch-src_core_workspace_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From e403dabd35b7cd9420bedc1f2d73182bea81aaad Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Tue, 3 Mar 2020 20:51:17 +0000
Subject: [PATCH 4/4] workspace: Don't try to use per-workspace MRU lists as a
hint for focusing
Index: src/core/workspace.c
--- src/core/workspace.c.orig
+++ src/core/workspace.c
@@ -33,7 +33,7 @@
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
static void set_active_space_hint (MetaScreen *screen);
-static void focus_ancestor_or_mru_window (MetaWorkspace *workspace,
+static void focus_ancestor_or_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,
guint32 timestamp);
static void free_this (gpointer candidate,
@@ -971,7 +971,7 @@ meta_workspace_focus_default_window (MetaWorkspace *wo
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
!workspace->screen->display->mouse_mode)
- focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
+ focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
else
{
MetaWindow * window;
@@ -1008,7 +1008,7 @@ meta_workspace_focus_default_window (MetaWorkspace *wo
}
}
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
- focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
+ focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE)
{
meta_topic (META_DEBUG_FOCUS,
@@ -1035,13 +1035,11 @@ record_ancestor (MetaWindow *window,
* window on active workspace
*/
static void
-focus_ancestor_or_mru_window (MetaWorkspace *workspace,
+focus_ancestor_or_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,
guint32 timestamp)
{
MetaWindow *window = NULL;
- MetaWindow *desktop_window = NULL;
- GList *tmp;
if (not_this_one)
meta_topic (META_DEBUG_FOCUS,
@@ -1072,36 +1070,8 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace
}
}
- /* No ancestor, look for the MRU window */
- tmp = workspace->mru_list;
-
- while (tmp)
- {
- MetaWindow* tmp_window;
- tmp_window = ((MetaWindow*) tmp->data);
- if (tmp_window != not_this_one &&
- meta_window_showing_on_its_workspace (tmp_window) &&
- tmp_window->type != META_WINDOW_DOCK &&
- tmp_window->type != META_WINDOW_DESKTOP)
- {
- window = tmp->data;
- break;
- }
- else if (tmp_window != not_this_one &&
- desktop_window == NULL &&
- meta_window_showing_on_its_workspace (tmp_window) &&
- tmp_window->type == META_WINDOW_DESKTOP)
- {
- /* Found the most recently used desktop window */
- desktop_window = tmp_window;
- }
-
- tmp = tmp->next;
- }
-
- /* If no window was found, default to the MRU desktop-window */
- if (window == NULL)
- window = desktop_window;
+ window = meta_stack_get_default_focus_window (workspace->screen->stack,
+ workspace, NULL);
if (window)
{

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-src_core_workspace_h,v 1.1 2020/04/25 10:49:43 robert Exp $
From e403dabd35b7cd9420bedc1f2d73182bea81aaad Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Tue, 3 Mar 2020 20:51:17 +0000
Subject: [PATCH 4/4] workspace: Don't try to use per-workspace MRU lists as a
hint for focusing
Index: src/core/workspace.h
--- src/core/workspace.h.orig
+++ src/core/workspace.h
@@ -52,6 +52,17 @@ struct _MetaWorkspace
MetaScreen *screen;
GList *windows;
+
+ /* The "MRU list", or "most recently used" list, is a list of
+ * MetaWindows ordered based on the time the the user interacted
+ * with the window most recently.
+ *
+ * For historical reasons, we keep an MRU list per workspace.
+ * It used to be used to calculate the default focused window,
+ * but isn't anymore, as the window next in the stacking order
+ * can sometimes be not the window the user interacted with last,
+ */
+
GList *mru_list;
GList *list_containing_self;

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-src_ui_frames_c,v 1.1 2020/04/25 10:49:43 robert Exp $
From 28e586a4d9b75e6a9bd2439f1bcf2441251dfda5 Mon Sep 17 00:00:00 2001
From: rcaridade145 <rcaridade145@gmail.com>
Date: Thu, 6 Feb 2020 19:59:51 +0000
Subject: [PATCH 1/2] frames: don't bother painting the background
Index: src/ui/frames.c
--- src/ui/frames.c.orig
+++ src/ui/frames.c
@@ -2261,28 +2261,6 @@ meta_frames_destroy_event (GtkWidget
return TRUE;
}
-static void
-setup_bg_cr (cairo_t *cr, GdkWindow *window, int x_offset, int y_offset)
-{
- GdkWindow *parent = gdk_window_get_parent (window);
- cairo_pattern_t *bg_pattern;
-
- bg_pattern = gdk_window_get_background_pattern (window);
- if (bg_pattern == NULL && parent)
- {
- gint window_x, window_y;
-
- gdk_window_get_position (window, &window_x, &window_y);
- setup_bg_cr (cr, parent, x_offset + window_x, y_offset + window_y);
- }
- else if (bg_pattern)
- {
- cairo_translate (cr, - x_offset, - y_offset);
- cairo_set_source (cr, bg_pattern);
- cairo_translate (cr, x_offset, y_offset);
- }
-}
-
/* Returns a pixmap with a piece of the windows frame painted on it.
*/
static cairo_surface_t *
@@ -2304,7 +2282,6 @@ generate_pixmap (MetaFrames *frames,
cr = cairo_create (result);
cairo_translate (cr, -rect->x, -rect->y);
- setup_bg_cr (cr, frame->window, 0, 0);
cairo_paint (cr);
meta_frames_paint_to_drawable (frames, frame, cr);