Codebase list gnome-shell-extensions / 7f6e631
Import Debian changes 3.38.2-1 gnome-shell-extensions (3.38.2-1) unstable; urgency=medium . * Team upload * New upstream release * Standards-Version: 4.5.1 (no changes required) * d/gbp.conf: Use upstream/3.38.x branch. Version 40~alpha was already released upstream. Simon McVittie authored 3 years ago Sophie Brun committed 3 years ago
13 changed file(s) with 207 addition(s) and 184 deletion(s). Raw diff Collapse all Expand all
0 3.38.2
1 ======
2 * window-list: Honor changes in skip-taskbar property [Sergio; !130]
3 * window-list, workspace-indicator: Improve previews in workspace thumbs
4 [Florian; #260, !142]
5 * window-list, workspace-indicator: Adjust to 3.38 changes [Florian; !133]
6 * auto-move: Improve behavior on multi-monitor setups [Florian; !135]
7 * windowNavigator: Adjust to 3.38 changes [Thun; #259]
8 * Misc. bug fixes [Ray; !145]
9
10 Contributors:
11 Sergio Costas, Florian Müllner, Thun Pin, Ray Strode
12
013 3.38.1
114 ======
215
77 column-spacing: $base_spacing * 6;
88 max-row-spacing: $base_spacing * 12;
99 max-column-spacing: $base_spacing * 12;
10 page-padding-top: $base_padding * 6;
11 page-padding-bottom: $base_padding * 6;
12 page-padding-left: $base_padding * 6;
13 page-padding-right: $base_padding * 6;
1014 }
1115
1216 /* App Icons */
7074 & .icon-grid {
7175 row-spacing: $base_spacing * 2;
7276 column-spacing: $base_spacing * 5;
77 page-padding-top: 0;
78 page-padding-bottom: 0;
79 page-padding-left: 0;
80 page-padding-right: 0;
7381 }
7482
7583 & .page-indicators {
134134 spacing: 8px;
135135 margin-bottom: 6px;
136136
137 .polkit-dialog-user-icon {
138 border-radius: 99px;
139 background-size: contain;
140 }
141137 .polkit-dialog-user-root-label { color: $warning_color; }
142138 }
143139
0 gnome-shell-extensions (3.38.2-1) unstable; urgency=medium
1
2 * Team upload
3 * New upstream release
4 * Standards-Version: 4.5.1 (no changes required)
5 * d/gbp.conf: Use upstream/3.38.x branch.
6 Version 40~alpha was already released upstream.
7
8 -- Simon McVittie <[email protected]> Thu, 03 Dec 2020 10:17:58 +0000
9
010 gnome-shell-extensions (3.38.1-1) unstable; urgency=medium
111
212 * New upstream release
1111 meson (>= 0.44.0),
1212 sassc
1313 Rules-Requires-Root: no
14 Standards-Version: 4.5.0
14 Standards-Version: 4.5.1
1515 Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
1616 Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
1717 Homepage: https://wiki.gnome.org/Projects/GnomeShell/Extensions
77 meson (>= 0.44.0),
88 sassc
99 Rules-Requires-Root: no
10 Standards-Version: 4.5.0
10 Standards-Version: 4.5.1
1111 Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
1212 Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
1313 Homepage: https://wiki.gnome.org/Projects/GnomeShell/Extensions
00 [DEFAULT]
11 pristine-tar = True
22 debian-branch = debian/master
3 upstream-branch = upstream/latest
3 upstream-branch = upstream/3.38.x
44 upstream-vcs-tag = %(version)s
55
66 [buildpackage]
115115 let keepAliveWorkspaces = [];
116116 let foundNonEmpty = false;
117117 for (let i = this._workspaces.length - 1; i >= 0; i--) {
118 if (!foundNonEmpty)
119 foundNonEmpty = this._workspaces[i].list_windows().length > 0;
120 else if (!this._workspaces[i]._keepAliveId)
118 if (!foundNonEmpty) {
119 foundNonEmpty = this._workspaces[i].list_windows().some(
120 w => !w.is_on_all_workspaces());
121 } else if (!this._workspaces[i]._keepAliveId) {
121122 keepAliveWorkspaces.push(this._workspaces[i]);
123 }
122124 }
123125
124126 // make sure the original method only removes empty workspaces at the end
351351 super._init(perMonitor, monitorIndex);
352352
353353 this.metaWindow = metaWindow;
354 this._skipTaskbarId = metaWindow.connect('notify::skip-taskbar', () => {
355 this._updateVisibility();
356 });
354357 this._updateVisibility();
355358
356359 this._windowTitle = new WindowTitle(this.metaWindow);
411414
412415 _onDestroy() {
413416 super._onDestroy();
417 this.metaWindow.disconnect(this._skipTaskbarId);
414418 this.metaWindow.disconnect(this._workspaceChangedId);
415419 global.display.disconnect(this._notifyFocusId);
416420 this._contextMenu.destroy();
782786 });
783787
784788 this._dragBeginId = Main.xdndHandler.connect('drag-begin',
785 this._onDragBegin.bind(this));
789 this._monitorDrag.bind(this));
786790 this._dragEndId = Main.xdndHandler.connect('drag-end',
787 this._onDragEnd.bind(this));
791 this._stopMonitoringDrag.bind(this));
788792 this._dragMonitor = {
789793 dragMotion: this._onDragMotion.bind(this),
790794 };
947951 }
948952
949953 _onWindowAdded(ws, win) {
950 if (win.skip_taskbar)
951 return;
952
953954 if (!this._grouped)
954955 this._checkGrouping();
955956
10151016 }
10161017 }
10171018
1018 _onDragBegin() {
1019 _monitorDrag() {
10191020 DND.addDragMonitor(this._dragMonitor);
10201021 }
10211022
1022 _onDragEnd() {
1023 _stopMonitoringDrag() {
10231024 DND.removeDragMonitor(this._dragMonitor);
10241025 this._removeActivateTimeout();
10251026 }
10931094
10941095 global.display.disconnect(this._fullscreenChangedId);
10951096
1097 this._stopMonitoringDrag();
10961098 Main.xdndHandler.disconnect(this._dragBeginId);
10971099 Main.xdndHandler.disconnect(this._dragEndId);
10981100
2323 this.connect('destroy', this._onDestroy.bind(this));
2424
2525 this._sizeChangedId = this._window.connect('size-changed',
26 this._relayout.bind(this));
26 () => this.queue_relayout());
2727 this._positionChangedId = this._window.connect('position-changed',
28 this._relayout.bind(this));
28 () => {
29 this._updateVisible();
30 this.queue_relayout();
31 });
2932 this._minimizedChangedId = this._window.connect('notify::minimized',
30 this._relayout.bind(this));
31 this._monitorEnteredId = global.display.connect('window-entered-monitor',
32 this._relayout.bind(this));
33 this._monitorLeftId = global.display.connect('window-left-monitor',
34 this._relayout.bind(this));
35
36 // Do initial layout when we get a parent
37 let id = this.connect('parent-set', () => {
38 this.disconnect(id);
39 if (!this.get_parent())
40 return;
41 this._laterId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
42 this._laterId = 0;
43 this._relayout();
44 return false;
45 });
46 });
33 this._updateVisible.bind(this));
4734
4835 this._focusChangedId = global.display.connect('notify::focus-window',
4936 this._onFocusChanged.bind(this));
5138 }
5239
5340 // needed for DND
54 get realWindow() {
55 return this._window.get_compositor_private();
41 get metaWindow() {
42 return this._window;
5643 }
5744
5845 _onDestroy() {
5946 this._window.disconnect(this._sizeChangedId);
6047 this._window.disconnect(this._positionChangedId);
6148 this._window.disconnect(this._minimizedChangedId);
62 global.display.disconnect(this._monitorEnteredId);
63 global.display.disconnect(this._monitorLeftId);
6449 global.display.disconnect(this._focusChangedId);
65 if (this._laterId)
66 Meta.later_remove(this._laterId);
6750 }
6851
6952 _onFocusChanged() {
7356 this.remove_style_class_name('active');
7457 }
7558
76 _relayout() {
77 let monitor = Main.layoutManager.findIndexForActor(this);
78 this.visible = monitor === this._window.get_monitor() &&
59 _updateVisible() {
60 const monitor = Main.layoutManager.findIndexForActor(this);
61 const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
62 this.visible = this._window.get_frame_rect().overlap(workArea) &&
7963 this._window.window_type !== Meta.WindowType.DESKTOP &&
8064 this._window.showing_on_its_workspace();
81
82 if (!this.visible)
83 return;
84
85 let workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
86 let hscale = this.get_parent().allocation.get_width() / workArea.width;
87 let vscale = this.get_parent().allocation.get_height() / workArea.height;
88
89 let frameRect = this._window.get_frame_rect();
90 this.set_size(
91 Math.round(Math.min(frameRect.width, workArea.width) * hscale),
92 Math.round(Math.min(frameRect.height, workArea.height) * vscale));
93 this.set_position(
94 Math.round(frameRect.x * hscale),
95 Math.round(frameRect.y * vscale));
65 }
66 });
67
68 let WorkspaceLayout = GObject.registerClass(
69 class WorkspaceLayout extends Clutter.LayoutManager {
70 vfunc_get_preferred_width() {
71 return [0, 0];
72 }
73
74 vfunc_get_preferred_height() {
75 return [0, 0];
76 }
77
78 vfunc_allocate(container, box) {
79 const monitor = Main.layoutManager.findIndexForActor(container);
80 const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
81 const hscale = box.get_width() / workArea.width;
82 const vscale = box.get_height() / workArea.height;
83
84 for (const child of container) {
85 const childBox = new Clutter.ActorBox();
86 const frameRect = child.metaWindow.get_frame_rect();
87 childBox.set_size(
88 Math.round(Math.min(frameRect.width, workArea.width) * hscale),
89 Math.round(Math.min(frameRect.height, workArea.height) * vscale));
90 childBox.set_origin(
91 Math.round((frameRect.x - workArea.x) * hscale),
92 Math.round((frameRect.y - workArea.y) * vscale));
93 child.allocate(childBox);
94 }
9695 }
9796 });
9897
102101 super._init({
103102 style_class: 'workspace',
104103 child: new Clutter.Actor({
105 layout_manager: new Clutter.BinLayout(),
104 layout_manager: new WorkspaceLayout(),
106105 clip_to_allocation: true,
107106 }),
108107 });
133132 }
134133
135134 acceptDrop(source) {
136 if (!source.realWindow)
135 if (!source.metaWindow)
137136 return false;
138137
139 let window = source.realWindow.get_meta_window();
140 this._moveWindow(window);
138 this._moveWindow(source.metaWindow);
141139 return true;
142140 }
143141
144142 handleDragOver(source) {
145 if (source.realWindow)
143 if (source.metaWindow)
146144 return DND.DragMotionResult.MOVE_DROP;
147145 else
148146 return DND.DragMotionResult.CONTINUE;
00 /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
11 /* exported init */
2 const { Clutter, GObject, St } = imports.gi;
2 const { Clutter, Graphene, GObject, St } = imports.gi;
33
44 const Main = imports.ui.main;
55 const Workspace = imports.ui.workspace;
66 const WorkspacesView = imports.ui.workspacesView;
77
8 class MyWindowOverlay extends Workspace.WindowOverlay {
9 constructor(windowClone, parentActor) {
10 super(windowClone, parentActor);
11
12 this._id = null;
13 this._text = new St.Label({
14 style_class: 'extension-windowsNavigator-window-tooltip',
15 visible: false,
16 });
17 parentActor.add_actor(this._text);
18 }
19
20 showTooltip() {
21 this._parentActor.set_child_below_sibling(this._text, null);
22 this._text.show();
23 this._text.text = (this._windowClone.slotId + 1).toString();
24 }
25
26 hideTooltip() {
27 if (this._text && this._text.visible)
28 this._text.hide();
29 }
30
31 relayout(animate) {
32 super.relayout(animate);
33
34 let [cloneX, cloneY, cloneWidth_, cloneHeight_] = this._windowClone.slot;
35
36 let textX = cloneX - 2;
37 let textY = cloneY - 2;
38 this._text.set_position(Math.floor(textX) + 5, Math.floor(textY) + 5);
39 this._parentActor.set_child_below_sibling(this._text, null);
40 }
41 }
8 const WINDOW_SLOT = 4;
429
4310 var MyWorkspace = GObject.registerClass(
4411 class MyWorkspace extends Workspace.Workspace {
6027 }
6128 }
6229
30 vfunc_allocate(box) {
31 super.vfunc_allocate(box);
32
33 if (this._tip)
34 this._tip.allocate_preferred_size(0, 0);
35 }
36
6337 showTooltip() {
64 if (!this._tip || !this._actualGeometry)
38 if (!this._tip)
6539 return;
6640 this._tip.text = (this.metaWorkspace.index() + 1).toString();
67
68 // Hand code this instead of using _getSpacingAndPadding
69 // because that fails on empty workspaces
70 let node = this.get_theme_node();
71 let padding = {
72 left: node.get_padding(St.Side.LEFT),
73 top: node.get_padding(St.Side.TOP),
74 bottom: node.get_padding(St.Side.BOTTOM),
75 right: node.get_padding(St.Side.RIGHT),
76 };
77
78 let area = Workspace.padArea(this._actualGeometry, padding);
79 this._tip.x = area.x;
80 this._tip.y = area.y;
8141 this._tip.show();
8242 this.set_child_below_sibling(this._tip, null);
8343 }
8444
8545 hideTooltip() {
86 if (!this._tip)
87 return;
88 if (!this._tip.get_parent())
89 return;
90 this._tip.hide();
46 if (this._tip)
47 this._tip.hide();
9148 }
9249
9350 getWindowWithTooltip(id) {
94 for (let i = 0; i < this._windows.length; i++) {
95 if (this._windows[i].slotId + 1 === id)
96 return this._windows[i].metaWindow;
97 }
98 return null;
51 const slot = this.layout_manager._windowSlots[id - 1];
52 return slot ? slot[WINDOW_SLOT].metaWindow : null;
9953 }
10054
10155 showWindowsTooltips() {
102 for (let i in this._windowOverlays) {
103 if (this._windowOverlays[i])
104 this._windowOverlays[i].showTooltip();
56 for (let i = 0; i < this.layout_manager._windowSlots.length; i++) {
57 if (this.layout_manager._windowSlots[i])
58 this.layout_manager._windowSlots[i][WINDOW_SLOT].showTooltip(`${i + 1}`);
10559 }
10660 }
10761
10862 hideWindowsTooltips() {
109 for (let i in this._windowOverlays) {
110 if (this._windowOverlays[i])
111 this._windowOverlays[i].hideTooltip();
112 }
63 for (let i in this.layout_manager._windowSlots) {
64 if (this.layout_manager._windowSlots[i])
65 this.layout_manager._windowSlots[i][WINDOW_SLOT].hideTooltip();
66 }
67 }
68
69 // overriding _addWindowClone to apply the tooltip patch on the cloned
70 // windowPreview
71 _addWindowClone(metaWindow) {
72 const clone = super._addWindowClone(metaWindow);
73
74 // appling the tooltip patch
75 (function patchPreview() {
76 this._text = new St.Label({
77 style_class: 'extension-windowsNavigator-window-tooltip',
78 visible: false,
79 });
80
81 this._text.add_constraint(new Clutter.BindConstraint({
82 source: this._borderCenter,
83 coordinate: Clutter.BindCoordinate.POSITION,
84 }));
85 this._text.add_constraint(new Clutter.AlignConstraint({
86 source: this._borderCenter,
87 align_axis: Clutter.AlignAxis.X_AXIS,
88 pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
89 factor: this._closeButtonSide === St.Side.LEFT ? 1 : 0,
90 }));
91 this._text.add_constraint(new Clutter.AlignConstraint({
92 source: this._borderCenter,
93 align_axis: Clutter.AlignAxis.Y_AXIS,
94 pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
95 factor: 0,
96 }));
97
98 this.add_child(this._text);
99 }).call(clone);
100
101 clone.showTooltip = function (text) {
102 this._text.set({ text });
103 this._text.show();
104 };
105
106 clone.hideTooltip = function () {
107 if (this._text && this._text.visible)
108 this._text.hide();
109 };
110
111 return clone;
113112 }
114113 });
115114
243242
244243 class Extension {
245244 constructor() {
246 this._origWindowOverlay = Workspace.WindowOverlay;
247245 this._origWorkspace = Workspace.Workspace;
248246 this._origWorkspacesView = WorkspacesView.WorkspacesView;
249247 }
250248
251249 enable() {
252 Workspace.WindowOverlay = MyWindowOverlay;
253250 Workspace.Workspace = MyWorkspace;
254251 WorkspacesView.WorkspacesView = MyWorkspacesView;
255252 }
256253
257254 disable() {
258 Workspace.WindowOverlay = this._origWindowOverlay;
259255 Workspace.Workspace = this._origWorkspace;
260256 WorkspacesView.WorkspacesView = this._origWorkspacesView;
261257 }
2929 this.connect('destroy', this._onDestroy.bind(this));
3030
3131 this._sizeChangedId = this._window.connect('size-changed',
32 this._relayout.bind(this));
32 () => this.queue_relayout());
3333 this._positionChangedId = this._window.connect('position-changed',
34 this._relayout.bind(this));
34 () => {
35 this._updateVisible();
36 this.queue_relayout();
37 });
3538 this._minimizedChangedId = this._window.connect('notify::minimized',
36 this._relayout.bind(this));
37 this._monitorEnteredId = global.display.connect('window-entered-monitor',
38 this._relayout.bind(this));
39 this._monitorLeftId = global.display.connect('window-left-monitor',
40 this._relayout.bind(this));
41
42 // Do initial layout when we get a parent
43 let id = this.connect('parent-set', () => {
44 this.disconnect(id);
45 if (!this.get_parent())
46 return;
47 this._laterId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
48 this._laterId = 0;
49 this._relayout();
50 return false;
51 });
52 });
39 this._updateVisible.bind(this));
5340
5441 this._focusChangedId = global.display.connect('notify::focus-window',
5542 this._onFocusChanged.bind(this));
5744 }
5845
5946 // needed for DND
60 get realWindow() {
61 return this._window.get_compositor_private();
47 get metaWindow() {
48 return this._window;
6249 }
6350
6451 _onDestroy() {
6552 this._window.disconnect(this._sizeChangedId);
6653 this._window.disconnect(this._positionChangedId);
6754 this._window.disconnect(this._minimizedChangedId);
68 global.display.disconnect(this._monitorEnteredId);
69 global.display.disconnect(this._monitorLeftId);
7055 global.display.disconnect(this._focusChangedId);
71 if (this._laterId)
72 Meta.later_remove(this._laterId);
7356 }
7457
7558 _onFocusChanged() {
7962 this.remove_style_class_name('active');
8063 }
8164
82 _relayout() {
83 let monitor = Main.layoutManager.findIndexForActor(this);
84 this.visible = monitor === this._window.get_monitor() &&
65 _updateVisible() {
66 const monitor = Main.layoutManager.findIndexForActor(this);
67 const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
68 this.visible = this._window.get_frame_rect().overlap(workArea) &&
8569 this._window.window_type !== Meta.WindowType.DESKTOP &&
8670 this._window.showing_on_its_workspace();
87
88 if (!this.visible)
89 return;
90
91 let workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
92 let hscale = this.get_parent().allocation.get_width() / workArea.width;
93 let vscale = this.get_parent().allocation.get_height() / workArea.height;
94
95 let frameRect = this._window.get_frame_rect();
96 this.set_size(
97 Math.round(Math.min(frameRect.width, workArea.width) * hscale),
98 Math.round(Math.min(frameRect.height, workArea.height) * vscale));
99 this.set_position(
100 Math.round(frameRect.x * hscale),
101 Math.round(frameRect.y * vscale));
71 }
72 });
73
74 let WorkspaceLayout = GObject.registerClass(
75 class WorkspaceLayout extends Clutter.LayoutManager {
76 vfunc_get_preferred_width() {
77 return [0, 0];
78 }
79
80 vfunc_get_preferred_height() {
81 return [0, 0];
82 }
83
84 vfunc_allocate(container, box) {
85 const monitor = Main.layoutManager.findIndexForActor(container);
86 const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor);
87 const hscale = box.get_width() / workArea.width;
88 const vscale = box.get_height() / workArea.height;
89
90 for (const child of container) {
91 const childBox = new Clutter.ActorBox();
92 const frameRect = child.metaWindow.get_frame_rect();
93 childBox.set_size(
94 Math.round(Math.min(frameRect.width, workArea.width) * hscale),
95 Math.round(Math.min(frameRect.height, workArea.height) * vscale));
96 childBox.set_origin(
97 Math.round((frameRect.x - workArea.x) * hscale),
98 Math.round((frameRect.y - workArea.y) * vscale));
99 child.allocate(childBox);
100 }
102101 }
103102 });
104103
108107 super._init({
109108 style_class: 'workspace',
110109 child: new Clutter.Actor({
111 layout_manager: new Clutter.BinLayout(),
110 layout_manager: new WorkspaceLayout(),
112111 clip_to_allocation: true,
113112 }),
114113 });
139138 }
140139
141140 acceptDrop(source) {
142 if (!source.realWindow)
141 if (!source.metaWindow)
143142 return false;
144143
145 let window = source.realWindow.get_meta_window();
146 this._moveWindow(window);
144 this._moveWindow(source.metaWindow);
147145 return true;
148146 }
149147
150148 handleDragOver(source) {
151 if (source.realWindow)
149 if (source.metaWindow)
152150 return DND.DragMotionResult.MOVE_DROP;
153151 else
154152 return DND.DragMotionResult.CONTINUE;
00 project('gnome-shell-extensions',
1 version: '3.38.1',
1 version: '3.38.2',
22 meson_version: '>= 0.44.0',
33 license: 'GPL2+'
44 )