3766
|
|
|
Sami Jaktholm |
11 years ago
|
|
|
3765
|
|
|
Sam Spilsbury |
11 years ago
|
|
|
3764
|
|
|
Sam Spilsbury |
11 years ago
|
|
|
3763
|
|
|
Sam Spilsbury |
11 years ago
|
|
|
3762
|
|
|
Brandon Schaefer |
11 years ago
|
|
|
3761
|
|
|
Andrea Azzarone |
11 years ago
|
|
|
3760
|
|
|
Sam Spilsbury |
11 years ago
|
|
|
3759
|
|
Thumbnail, cleanup:
Merged if condition checks. Declaration of variables when they are needed (C++ style). Removed redundant brackets. Removed useless "/* Could someone please explain how this works */" comment. Removed extern const unsigned short TEXT_DISTANCE, because this variable does not exist anymore (value is configurable already). Changed if (something > 0.0) to if (something), 10 times. Changed pointedWin = 0; to pointedWin = NULL;. Used centerX () and centerY () abstractions from compiz::window::Geometry to determine the icon center coordinates. Added and removed newlines, if appropriate. Fixed indentation.
Thumbnail, code speedup:
Return ASAP, do not calculate stuff you might not need. No need for WIN_W (w) and WIN_H (w) macros, removed those and replaced them with the local variables int winWidth, int winHeight, int dockWidth and int dockHeight. No need for WIN_X (w) and WIN_Y (w) macros, replaced those with int dockX and int dockY. Introduced int tHeight = thumb.height;, int tWidth = thumb.width;, int halfTWidth = tWidth / 2; and int halfTHeight = tHeight / 2; and used those variables in the following calculations. Use igMidPoint[0] and igMidPoint[1] as arguments in the screen->outputDeviceForPoint (arg1, arg2) function, instead of re- calculating the arguments again.
Thumbnail, GL speedup:
Introduced GLfloat wxPlusWidth = wx + width;, GLfloat wyPlusHeight = wy + height;, GLfloat wxPlusWPlusOff = wxPlusWidth + off;, GLfloat wyPlusHPlusOff = wyPlusHeight + off;, GLfloat wxMinusOff = wx - off; and GLfloat wyMinusOff = wy - off; and used those coordinates in the vertexData arrays. No need to re- calculate those values multiple times. Just query optionGetShowDelay () once and use int showDelay later. We just enable blending if it is currently disabled and disable blending only, if it was disabled before.
Approved by PS Jenkins bot, MC Return, Sami Jaktholm, Sam Spilsbury.
|
MC Return |
11 years ago
|
|
|
3758
|
|
|
Sami Jaktholm |
11 years ago
|
|
|
3757
|
|
|
Sami Jaktholm |
11 years ago
|
|
|
3756
|
|
|
Michail Bitzes |
11 years ago
|
|
|
3755
|
|
|
Sami Jaktholm |
11 years ago
|
|
|
3754
|
|
|
Sam Spilsbury |
11 years ago
|
|
|
3753
|
|
|
MC Return |
11 years ago
|
|
|
3752
|
|
|
MC Return |
11 years ago
|
|
|
3751
|
|
Unrevert 3728, fix failing tests.
Change the behaviour of undecorating windows.
Previously when a window was undecorated, we would shift it back to an appropriate position according to its gravity member. That behaviour was problematic because in the StaticGravity case the window has to just stay in the same place. But then if you had a window with StaticGravity which then did get a decoration and later removed it, it would be placed as though it was decorated and appear to be in the wrong place.
The correct behaviour is to place all windows as though they have decorations, and then when decorations are removed, to move the window back to the corner as indicated in its gravity and then expand its size to cover the obscured regions no longer hidden because the decorations went away.
(LP: #1165343).
1. Completely remove decorOffsetMove and other related code from decor.cpp. Put the logic to handle the window->input () - window->border () placement offset inside of setWindowFrameExtents instead. Now the window will always be offset from its original non-decorated position to the new decorated position, rather than having to guess between decoration sizes. 2. Make saveGeometry and restoreGeometry work relative to window->border () as opposed to including it in the saved geometry. It is possible that the border size might change during maximization, as such, we don't want to save the position with the border before maximizing. Instead save the position as if it were never decorated so that when the window is restored it can be restored to its original position and then adjusted for its new border size. 3. Fix a few typoes in the tests. 4. Moved some commonly used matchers into compiz::testing 5. Make COMPIZ_PLUGIN_DIR accept multiple directories and look in each one of them for the plugin 6. Set COMPIZ_PLUGIN_DIR appropriately for each plugin that we wish to load on startup so that we load locally built plugins as opposed to installed ones. 7. Uncomment compiz_discover_tests for the acceptance tests. Now they are run by default.
(LP: #1195522). Fixes: https://bugs.launchpad.net/bugs/1195522.
Approved by PS Jenkins bot, MC Return, Brandon Schaefer.
|
Sam Spilsbury |
11 years ago
|
|
|
3750
|
|
|
MC Return |
11 years ago
|
|
|
3749
|
|
|
MC Return |
11 years ago
|
|
|
3748
|
|
|
MC Return |
11 years ago
|
|
|
3747
|
|
|
MC Return |
11 years ago
|
|
|