[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][debian-mate-team/marco][master] debian/patches: Add 0001_no-shadows-for-side-tiled-windows.patch: Do not...



Title: GitLab

Martin Wimpress pushed to branch master at Debian and Ubuntu MATE Packaging Team / marco

Commits:

2 changed files:

Changes:

  • debian/patches/0001_no-shadows-for-side-tiled-windows.patch
    1
    +From d234198fbf32daa300ae73f12f9727b4dd8b6a57 Mon Sep 17 00:00:00 2001
    
    2
    +From: Martin Wimpress <code@flexion.org>
    
    3
    +Date: Sat, 30 Jan 2021 11:21:39 +0000
    
    4
    +Subject: [PATCH] window: Do not render shadows on left/right tiled windows
    
    5
    +
    
    6
    +This pull request prevents shadows being rendered for left and right side titled windows. This behaviour is consistent with maximised windows, which also do not render shadows.
    
    7
    +
    
    8
    +The rationale for this change is so that when two windows are titled along side each other, it prevents central shadows bleeding into the touching points of the windows.
    
    9
    +
    
    10
    +metacity-theme-x.xml has provision to style left/right titled windows. This patch makes it possible to to create window themes that present clean side-by-side tiled windows.
    
    11
    +---
    
    12
    + src/compositor/compositor-xrender.c | 13 +++++++++++++
    
    13
    + src/core/window.c                   | 12 ++++++++++++
    
    14
    + src/include/window.h                |  2 ++
    
    15
    + 3 files changed, 27 insertions(+)
    
    16
    +
    
    17
    +diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
    
    18
    +index 37440a79..0b706dfc 100644
    
    19
    +--- a/src/compositor/compositor-xrender.c
    
    20
    ++++ b/src/compositor/compositor-xrender.c
    
    21
    +@@ -1022,6 +1022,19 @@ window_has_shadow (MetaCompWindow *cw)
    
    22
    +           return FALSE;
    
    23
    +         }
    
    24
    + 
    
    25
    ++      /* Do not add shadows for left/right tiled windows */
    
    26
    ++      if (meta_window_is_tiled_left (cw->window))
    
    27
    ++        {
    
    28
    ++          meta_verbose ("Window has no shadow because it is tiled left\n");
    
    29
    ++          return FALSE;
    
    30
    ++        }
    
    31
    ++
    
    32
    ++      if (meta_window_is_tiled_right (cw->window))
    
    33
    ++        {
    
    34
    ++          meta_verbose ("Window has no shadow because it is tiled right\n");
    
    35
    ++          return FALSE;
    
    36
    ++        }
    
    37
    ++
    
    38
    +       if (meta_window_get_frame (cw->window)) {
    
    39
    +         meta_verbose ("Window has shadow because it has a frame\n");
    
    40
    +         return TRUE;
    
    41
    +diff --git a/src/core/window.c b/src/core/window.c
    
    42
    +index 5f75e901..e6ac62d0 100644
    
    43
    +--- a/src/core/window.c
    
    44
    ++++ b/src/core/window.c
    
    45
    +@@ -8851,6 +8851,18 @@ meta_window_is_maximized (MetaWindow *window)
    
    46
    +   return META_WINDOW_MAXIMIZED (window);
    
    47
    + }
    
    48
    + 
    
    49
    ++gboolean
    
    50
    ++meta_window_is_tiled_left (MetaWindow *window)
    
    51
    ++{
    
    52
    ++  return META_WINDOW_TILED_LEFT (window);
    
    53
    ++}
    
    54
    ++
    
    55
    ++gboolean
    
    56
    ++meta_window_is_tiled_right (MetaWindow *window)
    
    57
    ++{
    
    58
    ++  return META_WINDOW_TILED_RIGHT (window);
    
    59
    ++}
    
    60
    ++
    
    61
    + /**
    
    62
    +  * meta_window_is_client_decorated:
    
    63
    +  *
    
    64
    +diff --git a/src/include/window.h b/src/include/window.h
    
    65
    +index 0aa208e4..c668f240 100644
    
    66
    +--- a/src/include/window.h
    
    67
    ++++ b/src/include/window.h
    
    68
    +@@ -39,5 +39,7 @@ Window meta_window_get_xwindow (MetaWindow *window);
    
    69
    + MetaWindow *meta_window_get_transient_for (MetaWindow *window);
    
    70
    + gboolean meta_window_is_maximized (MetaWindow *window);
    
    71
    + cairo_region_t *meta_window_get_frame_bounds (MetaWindow *window);
    
    72
    ++gboolean meta_window_is_tiled_left (MetaWindow *window);
    
    73
    ++gboolean meta_window_is_tiled_right (MetaWindow *window);
    
    74
    + 
    
    75
    + #endif

  • debian/patches/series
    1
    +0001_no-shadows-for-side-tiled-windows.patch


  • Reply to: