Skip to content

Commit 4177c46

Browse files
rmaderfossfreedom
authored andcommitted
Remove support for window shading
It's been broken for an unknown time and was never supported on Wayland. Thus let's remove the leftovers. Helpful command: `rg 'shade(?!r)' --pcre2` Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2884>
1 parent 0b81a53 commit 4177c46

File tree

13 files changed

+18
-232
lines changed

13 files changed

+18
-232
lines changed

src/core/frame.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,6 @@ meta_frame_get_flags (MetaFrame *frame)
266266
if (frame->window->has_minimize_func)
267267
flags |= META_FRAME_ALLOWS_MINIMIZE;
268268

269-
if (frame->window->has_shade_func)
270-
flags |= META_FRAME_ALLOWS_SHADE;
271269
}
272270

273271
if (META_WINDOW_ALLOWS_MOVE (frame->window))
@@ -282,9 +280,6 @@ meta_frame_get_flags (MetaFrame *frame)
282280
if (meta_window_appears_focused (frame->window))
283281
flags |= META_FRAME_HAS_FOCUS;
284282

285-
if (frame->window->shaded)
286-
flags |= META_FRAME_SHADED;
287-
288283
if (frame->window->on_all_workspaces_requested)
289284
flags |= META_FRAME_STUCK;
290285

src/core/keybindings.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3311,19 +3311,6 @@ handle_unmaximize (MetaDisplay *display,
33113311
meta_window_unmaximize (window, META_MAXIMIZE_BOTH);
33123312
}
33133313

3314-
static void
3315-
handle_toggle_shaded (MetaDisplay *display,
3316-
MetaWindow *window,
3317-
ClutterKeyEvent *event,
3318-
MetaKeyBinding *binding,
3319-
gpointer dummy)
3320-
{
3321-
if (window->shaded)
3322-
meta_window_unshade (window, event->time);
3323-
else if (window->has_shade_func)
3324-
meta_window_shade (window, event->time);
3325-
}
3326-
33273314
static void
33283315
handle_close (MetaDisplay *display,
33293316
MetaWindow *window,
@@ -4112,14 +4099,6 @@ init_builtin_key_bindings (MetaDisplay *display)
41124099
META_KEYBINDING_ACTION_UNMAXIMIZE,
41134100
handle_unmaximize, 0);
41144101

4115-
add_builtin_keybinding (display,
4116-
"toggle-shaded",
4117-
common_keybindings,
4118-
META_KEY_BINDING_PER_WINDOW |
4119-
META_KEY_BINDING_IGNORE_AUTOREPEAT,
4120-
META_KEYBINDING_ACTION_TOGGLE_SHADED,
4121-
handle_toggle_shaded, 0);
4122-
41234102
add_builtin_keybinding (display,
41244103
"minimize",
41254104
common_keybindings,

src/core/place.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,7 @@ meta_window_place (MetaWindow *window,
825825
}
826826

827827
/* Find windows that matter (not minimized, on same workspace
828-
* as placed window, may be shaded - if shaded we pretend it isn't
829-
* for placement purposes)
828+
* as placed window)
830829
*/
831830
{
832831
GSList *all_windows;

src/core/window-private.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ struct _MetaWindow
387387
* that to toggle between normal/tiled or maximized/tiled states. */
388388
guint saved_maximize : 1;
389389

390-
/* Whether we're shaded */
391-
guint shaded : 1;
392-
393390
/* Whether we're fullscreen */
394391
guint fullscreen : 1;
395392

@@ -487,7 +484,6 @@ struct _MetaWindow
487484
guint has_close_func : 1;
488485
guint has_minimize_func : 1;
489486
guint has_maximize_func : 1;
490-
guint has_shade_func : 1;
491487
guint has_move_func : 1;
492488
guint has_resize_func : 1;
493489
guint has_fullscreen_func : 1;
@@ -644,7 +640,7 @@ struct _MetaWindowClass
644640
#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \
645641
(w)->tile_mode == META_TILE_MAXIMIZED)
646642
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
647-
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
643+
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen)
648644
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
649645
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
650646
((w)->size_hints.min_height < (w)->size_hints.max_height)))

0 commit comments

Comments
 (0)