djreep81 / gnome-shell-wobbly-windows Goto Github PK
View Code? Open in Web Editor NEWThis project forked from magcius/gnome-shell-wobbly-windows
This project forked from magcius/gnome-shell-wobbly-windows
Move any window partially beyond the edges of your screen, and then click and hold on the titlebar. The window should shrink in size and distort considerably until you let go of the left mouse button.
Screen capture:
https://www.dropbox.com/s/r8oqi1gzbv6y2mb/Off-screen%20Window%20Bug.webm
The source of the problem is in this bit of _getActorDimensions():
let [success, box] = this.actor.get_paint_box();
// SNIP
if (success) {
[x, y] = [box.x1, box.y1];
[width, height] = [box.x2 - x, box.y2 - y];
} else {
[width, height] = this.actor.get_size();
}
// SNIP
The distortion occurs because this.actor.get_paint_box() does not take into account any part of the window that is off-screen. Using the following instead:
let box = this.actor.get_allocation_box();
// SNIP
[x, y] = [box.x1, box.y1];
[width, height] = [box.x2 - x, box.y2 - y]; // Could try using: this.actor.get_size();
// SNIP
completely fixes this problem. However, the window's allocation box seems to always be a few pixels smaller than the actual window, causing it to shrink ever so slightly when the 'wobbly' effect is applied. I could just add:
// Doing number magic here...
width += 15;
height += 15;
after [width, height] = [box.x2 - x, box.y2 - y]; to mitigate this quirk, but such an approach would be resolution-dependent and possibly GTK+ theme-dependent. Any ideas on how to proceed?
If you drag a small terminal to the top of the screen + maximize it, then the window gets bigger, but has an enlarged image of the smaller window which looks odd.
Ideally, content would be updated during dragging - at the very least it should be when then window is maximized or restored.
After installing this extension from extensions.gnome.org the effect when dragging looked awful.
But the worse thing is that it still remains even after I uninstalled the extension. I even tried to reinstall GNOME Shell and X.org, but it didn't help.
I recorded a video with my phone so you can see what's happening. - https://photos.app.goo.gl/zq9WWfW5zmpow2tF7
If you uncomment _paintDebug everything goes slow enough to see whats happening.
Once that's uncommented, restart gnome-shell (alt-f2 then enter r) and drag a window downwards quickly.
You see the 'back' of the window - some of the tiles in the window have a negative size.
What should happen is each tile has a minimum size, and the springs get more resistant as height or width heads down to it.
Check out a zoom of the screen shot on extensions.gnome.org http://imgur.com/ymdfmYP
The menubar and titlebar of gnome-terminal are overlapping.
It looks like some of the squares in the grid are overlapping - or where each square is a triangle, the points are in the wrong order..
To start debug this, we need a way to draw the grid the window is divided into then see what it looks like when dragging.
A possible solution for the maximize/restore problem: when the current window is maximized (Gdk.WindowState.MAXIMIZED) and grabbed by the user, the variable "immobile" is false. This should allow the deformation effect to remain active even while the actual logical window it is stationary.
I'm trying to achieve something like this (https://www.youtube.com/watch?v=USedxVrU2Ko#t=15s) to occur, albeit with standard GNOME Shell "aero snapping."
Is something like this reasonable? Thank you!
Updating /etc/environment causes major breakage in the gnome environment on Ubuntu.
Still seeing major tearing and unusable interface. I'd be happy to help debug this one.
Drawing the lines of the grid over the windows in a debug mode would make debugging the motion and other issues a lot easier.
I can't screenshot the hall of mirrors (because screenshotting erases it) but I can show how dragging a maximized window looks overly enlarged
nVidia Driver: 396.24
$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.