AUTHORS | 114 CMakeLists.txt | 22 ChangeLog |19315 +++++++++- NEWS | 501 VERSION | 1 cmake/CompizCommon.cmake | 340 cmake/CompizPlugin.cmake | 18 debian/changelog | 8 debian/control | 4 debian/patches/085_add_grid_plugin.patch | 1461 debian/patches/086_new_grid_defaults.patch | 49 debian/patches/series | 2 debian/watch | 2 gtk/window-decorator/actionmenu.c | 3 gtk/window-decorator/cairo.c | 7 gtk/window-decorator/decorator.c | 297 gtk/window-decorator/decorprops.c | 34 gtk/window-decorator/frames.c | 2 gtk/window-decorator/gtk-window-decorator.c | 26 gtk/window-decorator/gtk-window-decorator.h | 25 gtk/window-decorator/metacity.c | 36 gtk/window-decorator/wnck.c | 19 include/compiz-common.h.in | 6 include/compiz.h | 7 include/core/CMakeLists.txt | 3 include/core/core.h | 3 include/core/option.h | 1 include/core/plugin.h | 24 include/core/pluginclasshandler.h | 122 include/core/privateunion.h | 36 include/core/rect.h | 2 include/core/screen.h | 1 include/core/timeouthandler.h | 57 include/core/timer.h | 34 include/core/valueholder.h | 53 include/core/window.h | 9 include/decoration.h | 69 kde/window-decorator-kde4/decorator.cpp | 23 kde/window-decorator-kde4/decorator.h | 21 kde/window-decorator-kde4/switcher.cpp | 15 kde/window-decorator-kde4/utils.cpp | 2 kde/window-decorator-kde4/window.cpp | 122 kde/window-decorator-kde4/window.h | 2 libdecoration/decoration.c | 188 plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h | 6 plugins/compiztoolbox/src/compiztoolbox.cpp | 17 plugins/composite/CMakeLists.txt | 2 plugins/composite/include/composite/composite.h | 8 plugins/composite/src/privates.h | 1 plugins/composite/src/window.cpp | 20 plugins/copytex/src/copytex.cpp | 62 plugins/copytex/src/copytex.h | 29 plugins/dbus/src/dbus.cpp | 1 plugins/decor/src/decor.cpp | 554 plugins/decor/src/decor.h | 43 plugins/fade/fade.xml.in | 2 plugins/fade/src/fade.cpp | 67 plugins/fade/src/fade.h | 1 plugins/move/src/move.cpp | 32 plugins/opengl/src/paint.cpp | 8 plugins/opengl/src/window.cpp | 13 plugins/place/src/place.cpp | 147 plugins/place/src/place.h | 6 plugins/resize/resize.xml.in | 263 plugins/resize/src/resize.cpp | 167 plugins/scale/src/scale.cpp | 3 plugins/switcher/src/switcher.cpp | 10 plugins/switcher/switcher.xml.in | 4 plugins/water/src/water.cpp | 6 plugins/wobbly/src/wobbly.cpp | 50 src/CMakeLists.txt | 5 src/event.cpp | 233 src/logmessage.cpp | 85 src/privateeventsource.h | 56 src/privateiosource.h | 55 src/privatescreen.h | 97 src/privatetimeouthandler.h | 36 src/privatetimeoutsource.h | 57 src/privatetimer.h | 48 src/privatewindow.h | 28 src/rect.cpp | 2 src/screen.cpp | 203 src/session.cpp | 2 src/timeouthandler.cpp | 94 src/timer.cpp | 185 src/valueholder.cpp | 110 src/valueholder.h | 41 src/window.cpp | 454 src/windowgeometry.cpp | 63 tests/CMakeLists.txt | 2 tests/pluginclasshandler/CMakeLists.txt | 6 tests/pluginclasshandler/construct/CMakeLists.txt | 25 tests/pluginclasshandler/construct/test-pch-construct.cpp | 64 tests/pluginclasshandler/get/CMakeLists.txt | 25 tests/pluginclasshandler/get/test-pch-get.cpp | 64 tests/pluginclasshandler/indexes/CMakeLists.txt | 28 tests/pluginclasshandler/indexes/test-pch-indexes.cpp | 434 tests/pluginclasshandler/test-pluginclasshandler.cpp | 101 tests/pluginclasshandler/test-pluginclasshandler.h | 114 tests/pluginclasshandler/typenames/CMakeLists.txt | 25 tests/pluginclasshandler/typenames/test-pch-typenames.cpp | 83 tests/timer/CMakeLists.txt | 15 tests/timer/callbacks/CMakeLists.txt | 23 tests/timer/callbacks/test-timer-callbacks.cpp | 106 tests/timer/diffs/CMakeLists.txt | 23 tests/timer/diffs/test-timer-diffs.cpp | 82 tests/timer/set-values/CMakeLists.txt | 23 tests/timer/set-values/test-timer-set-values.cpp | 139 tests/timer/test-timer.cpp | 61 tests/timer/test-timer.h | 89 tests/timer/while-calling/CMakeLists.txt | 23 tests/timer/while-calling/test-timer-set-times-while-calling.cpp | 124 xslt/bcop.xslt | 2 113 files changed, 23391 insertions(+), 4752 deletions(-)
New commits: commit 9f9188e26727ea648fb49015462ca9c61fcaf529 Author: Janos Guljas <ja...@resenje.org> Date: Wed Aug 3 23:08:30 2011 +0200 Prepare changelog, bump Standards-Version and remove grid plugin. diff --git a/debian/changelog b/debian/changelog index 077696e..d4cfb67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +compiz (0.9.5.0-0.1) experimental; urgency=low + + * Non-maintainer upload. + * New upstream release. + * Remove 085_add_grid_plugin.patch and 086_new_grid_defaults.patch. + + -- Janos Guljas <ja...@resenje.org> Tue, 02 Aug 2011 04:11:24 +0200 + compiz (0.9.4-1) experimental; urgency=low * Non-maintainer upload. diff --git a/debian/control b/debian/control index e461fc4..a718b41 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: cmake (>= 2.6), debhelper (>= 7.0.50~), intltool, libtool, libcairo2-dev, libdbus-glib-1-dev, libgconf2-dev, libgl1-mesa-dev (>= 6.5.1) | libgl-dev, libglib2.0-dev, libgnome-desktop-dev, - libboost1.42-dev, libboost-serialization1.42-dev, + libboost-dev, libboost-serialization-dev, libglibmm-2.4-dev, libgnomeui-dev, libgnome-window-settings-dev, libgtk2.0-dev, libice-dev (>= 1:1.0.1), @@ -22,7 +22,7 @@ Build-Depends: cmake (>= 2.6), debhelper (>= 7.0.50~), intltool, libtool, libglu1-mesa-dev, kdebase-workspace-dev, kdelibs5-dev (>= 4:4.2.2), metacity-common, libx11-xcb-dev -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Homepage: http://www.compiz.org/ Vcs-Git: git://git.debian.org/git/pkg-xorg/app/compiz.git Vcs-Browser: http://git.debian.org/?p=pkg-xorg/app/compiz.git diff --git a/debian/patches/085_add_grid_plugin.patch b/debian/patches/085_add_grid_plugin.patch deleted file mode 100644 index 54cd027..0000000 --- a/debian/patches/085_add_grid_plugin.patch +++ /dev/null @@ -1,1461 +0,0 @@ -Index: compiz-0.9.4/plugins/grid/CMakeLists.txt -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ compiz-0.9.4/plugins/grid/CMakeLists.txt 2011-02-24 12:12:42.000000000 +0100 -@@ -0,0 +1,5 @@ -+find_package (Compiz REQUIRED) -+ -+include (CompizPlugin) -+ -+compiz_plugin(grid PLUGINDEPS composite opengl) -Index: compiz-0.9.4/plugins/grid/grid.xml.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ compiz-0.9.4/plugins/grid/grid.xml.in 2011-02-24 12:12:42.000000000 +0100 -@@ -0,0 +1,565 @@ -+<?xml version="1.0"?> -+<compiz> -+ <plugin name="grid" useBcop="true"> -+ <_short>Grid</_short> -+ <_long>Warp and resize windows to fit an imaginary grid.</_long> -+ <category>Window Management</category> -+ <deps> -+ <requirement> -+ <plugin>opengl</plugin> -+ </requirement> -+ <relation type="before"> -+ <plugin>wobbly</plugin> -+ </relation> -+ <relation type="after"> -+ <plugin>composite</plugin> -+ <plugin>opengl</plugin> -+ <plugin>decor</plugin> -+ </relation> -+ </deps> -+ <options> -+ <group> -+ <_short>Bindings</_short> -+ <option name="put_center_key" type="key"> -+ <_short>Put Center</_short> -+ <_long>Move window to the center</_long> -+ <default><Control><Alt>KP_5</default> -+ </option> -+ <option name="put_left_key" type="key"> -+ <_short>Put Left</_short> -+ <_long>Move window to the left edge</_long> -+ <default><Control><Alt>KP_4</default> -+ </option> -+ <option name="put_right_key" type="key"> -+ <_short>Put Right</_short> -+ <_long>Move window to the right edge</_long> -+ <default><Control><Alt>KP_6</default> -+ </option> -+ <option name="put_top_key" type="key"> -+ <_short>Put Top</_short> -+ <_long>Move window to the top edge</_long> -+ <default><Control><Alt>KP_8</default> -+ </option> -+ <option name="put_bottom_key" type="key"> -+ <_short>Put Bottom</_short> -+ <_long>Move window to the bottom edge</_long> -+ <default><Control><Alt>KP_2</default> -+ </option> -+ <option name="put_topleft_key" type="key"> -+ <_short>Put Top Left</_short> -+ <_long>Move window to the top left corner</_long> -+ <default><Control><Alt>KP_7</default> -+ </option> -+ <option name="put_topright_key" type="key"> -+ <_short>Put Top Right</_short> -+ <_long>Move window to the top right corner</_long> -+ <default><Control><Alt>KP_9</default> -+ </option> -+ <option name="put_bottomleft_key" type="key"> -+ <_short>Put Bottom Left</_short> -+ <_long>Move window to the bottom left corner</_long> -+ <default><Control><Alt>KP_1</default> -+ </option> -+ <option name="put_bottomright_key" type="key"> -+ <_short>Put Bottom Right</_short> -+ <_long>Move window to the bottom right corner</_long> -+ <default><Control><Alt>KP_3</default> -+ </option> -+ <option name="put_maximize_key" type="key"> -+ <_short>Maximize</_short> -+ <_long>Maximize window</_long> -+ <default><Control><Alt>KP_0</default> -+ </option> -+ <option name="put_restore_key" type="key"> -+ <_short>Restore</_short> -+ <_long>Restore window to it's original size</_long> -+ <default><Control><Alt>r</default> -+ </option> -+ </group> -+ <group> -+ <_short>Edges</_short> -+ <subgroup> -+ <_short>Resize Actions</_short> -+ <_long>Window resize action</_long> -+ <option name="top_left_corner_action" type="int"> -+ <_short>Upper Left Corner</_short> -+ <_long>Action to be performed when window is dropped on the top left corner</_long> -+ <default>7</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="top_edge_action" type="int"> -+ <_short>Top Edge</_short> -+ <_long>Action to be performed when window is dropped on the top edge</_long> -+ <default>10</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="top_right_corner_action" type="int"> -+ <_short>Upper Right Corner</_short> -+ <_long>Action to be performed when window is dropped on the top right corner</_long> -+ <default>9</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="left_edge_action" type="int"> -+ <_short>Left Edge</_short> -+ <_long>Action to be performed when window is dropped on the left edge</_long> -+ <default>4</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="right_edge_action" type="int"> -+ <_short>Right Edge</_short> -+ <_long>Action to be performed when window is dropped on the right edge</_long> -+ <default>6</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="bottom_left_corner_action" type="int"> -+ <_short>Bottom Left Corner</_short> -+ <_long>Action to be performed when window is dropped on the bottom left corner</_long> -+ <default>1</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="bottom_edge_action" type="int"> -+ <_short>Bottom Edge</_short> -+ <_long>Action to be performed when window is dropped on the bottom edge</_long> -+ <default>2</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="bottom_right_corner_action" type="int"> -+ <_short>Bottom Right Corner</_short> -+ <_long>Action to be performed when window is dropped on the bottom right corner</_long> -+ <default>3</default> -+ <min>0</min> -+ <max>10</max> -+ <desc> -+ <value>0</value> -+ <_name>None</_name> -+ </desc> -+ <desc> -+ <value>1</value> -+ <_name>Bottom Left Corner</_name> -+ </desc> -+ <desc> -+ <value>2</value> -+ <_name>Bottom Half</_name> -+ </desc> -+ <desc> -+ <value>3</value> -+ <_name>Bottom Right Corner</_name> -+ </desc> -+ <desc> -+ <value>4</value> -+ <_name>Left Half</_name> -+ </desc> -+ <desc> -+ <value>5</value> -+ <_name>Fill Screen</_name> -+ </desc> -+ <desc> -+ <value>6</value> -+ <_name>Right Half</_name> -+ </desc> -+ <desc> -+ <value>7</value> -+ <_name>Top Left Corner</_name> -+ </desc> -+ <desc> -+ <value>8</value> -+ <_name>Top Half</_name> -+ </desc> -+ <desc> -+ <value>9</value> -+ <_name>Top Right Corner</_name> -+ </desc> -+ <desc> -+ <value>10</value> -+ <_name>Maximize</_name> -+ </desc> -+ </option> -+ <option name="snapoff_maximized" type="bool"> -+ <_short>Snapoff maximized windows</_short> -+ <_long>Snapoff maximized windows when pulling to edge.</_long> -+ <default>false</default> -+ </option> -+ <option name="snapback_windows" type="bool"> -+ <_short>Snap windows back to original size</_short> -+ <_long>Snaps windows back to their original size if dragged away from their gridded position.</_long> -+ <default>true</default> -+ </option> -+ </subgroup> -+ <subgroup> -+ <_short>Thresholds</_short> -+ <option name="left_edge_threshold" type="int"> -+ <_short>Left Edge</_short> -+ <_long>Maximum number of pixels from the left edge a window can be dropped</_long> -+ <default>5</default> -+ <min>0</min> -+ <max>500</max> -+ </option> -+ <option name="right_edge_threshold" type="int"> -+ <_short>Right Edge</_short> -+ <_long>Maximum number of pixels from the right edge a window can be dropped</_long> -+ <default>5</default> -+ <min>0</min> -+ <max>500</max> -+ </option> -+ <option name="top_edge_threshold" type="int"> -+ <_short>Top Edge</_short> -+ <_long>Maximum number of pixels from the top edge a window can be dropped</_long> -+ <default>5</default> -+ <min>0</min> -+ <max>500</max> -+ </option> -+ <option name="bottom_edge_threshold" type="int"> -+ <_short>Bottom Edge</_short> -+ <_long>Maximum number of pixels from the Bottom edge a window can be dropped</_long> -+ <default>5</default> -+ <min>0</min> -+ <max>500</max> -+ </option> -+ </subgroup> -+ </group> -+ <group> -+ <_short>Appearance</_short> -+ <option name="draw_indicator" type="bool"> -+ <_short>Draw Indicator</_short> -+ <_long>Draw Window Resize Indicator</_long> -+ <default>true</default> -+ </option> -+ <option name="outline_color" type="color"> -+ <_short>Outline Color</_short> -+ <_long>Color of the resize indicator outline</_long> -+ <default> -+ <red>0x2f2f</red> -+ <green>0x2f2f</green> -+ <blue>0x4f4f</blue> -+ <alpha>0x9f9f</alpha> -+ </default> -+ </option> -+ <option name="fill_color" type="color"> -+ <_short>Fill Color</_short> -+ <_long>Fill color of the resize indicator</_long> -+ <default> -+ <red>0x2f2f</red> -+ <green>0x2f2f</green> -+ <blue>0x4f4f</blue> -+ <alpha>0x4f4f</alpha> -+ </default> -+ </option> -+ </group> -+ </options> -+ </plugin> -+</compiz> -Index: compiz-0.9.4/plugins/grid/src/grid.cpp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ compiz-0.9.4/plugins/grid/src/grid.cpp 2011-02-24 12:12:42.000000000 +0100 -@@ -0,0 +1,710 @@ -+/* -+ * Compiz Fusion Grid plugin -+ * -+ * Copyright (c) 2008 Stephen Kennedy <sua...@gmail.com> -+ * Copyright (c) 2010 Scott Moreau <ore...@gmail.com> -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Description: -+ * -+ * Plugin to act like winsplit revolution (http://www.winsplit-revolution.com/) -+ * use <Control><Alt>NUMPAD_KEY to move and tile your windows. -+ * -+ * Press the tiling keys several times to cycle through some tiling options. -+ */ -+ -+#include "grid.h" -+ -+static const GridProps gridProps[] = -+{ -+ {0,1, 1,1}, -+ -+ {0,1, 2,2}, -+ {0,1, 1,2}, -+ {1,1, 2,2}, -+ -+ {0,0, 2,1}, -+ {0,0, 1,1}, -+ {1,0, 2,1}, -+ -+ {0,0, 2,2}, -+ {0,0, 1,2}, -+ {1,0, 2,2}, -+ -+ {0,0, 1,1}, -+}; -+ -+CompRect -+GridScreen::slotToRect (CompWindow *w, -+ const CompRect& slot) -+{ -+ return CompRect (slot.x () + w->input ().left, -+ slot.y () + w->input ().top, -+ slot.width () - (w->input ().left + w->input ().right), -+ slot.height () - (w->input ().top + w->input ().bottom)); -+} -+ -+CompRect -+GridScreen::constrainSize (CompWindow *w, -+ const CompRect& slot) -+{ -+ CompRect result; -+ int cw, ch; -+ -+ result = slotToRect (w, slot); -+ -+ if (w->constrainNewWindowSize (result.width (), result.height (), &cw, &ch)) -+ { -+ /* constrained size may put window offscreen, adjust for that case */ -+ int dx = result.x () + cw - workarea.right () + w->input ().right; -+ int dy = result.y () + ch - workarea.bottom () + w->input ().bottom; -+ -+ if (dx > 0) -+ result.setX (result.x () - dx); -+ if (dy > 0) -+ result.setY (result.y () - dy); -+ -+ result.setWidth (cw); -+ result.setHeight (ch); -+ } -+ -+ return result; -+} -+ -+void -+GridScreen::getPaintRectangle (CompRect &cRect) -+{ -+ if (edgeToGridType () != GridUnknown && optionGetDrawIndicator ()) -+ cRect = desiredSlot; -+ else -+ cRect.setGeometry (0, 0, 0, 0); -+} -+ -+bool -+GridScreen::initiateCommon (CompAction *action, -+ CompAction::State state, -+ CompOption::Vector &option, -+ GridType where, -+ bool resize) -+{ -+ Window xid; -+ CompWindow *cw = 0; -+ -+ xid = CompOption::getIntOptionNamed (option, "window"); -+ cw = screen->findWindow (xid); -+ -+ if (where == GridUnknown || screen->otherGrabExist ("move", NULL)) -+ return false; -+ -+ if (cw) -+ { -+ XWindowChanges xwc; -+ -+ GRID_WINDOW (cw); -+ -+ if (gw->lastTarget != where) -+ gw->resizeCount = 0; -+ -+ props = gridProps[where]; -+ -+ /* get current available area */ -+ if (gw->grabIsMove) -+ workarea = screen->getWorkareaForOutput -+ (screen->outputDeviceForPoint (pointerX, pointerY)); -+ else -+ { -+ workarea = screen->getWorkareaForOutput (cw->outputDevice ()); -+ -+ if (props.numCellsX == 1) -+ centerCheck = true; -+ -+ if (!gw->isGridResized) -+ /* Store size not including borders when using a keybinding */ -+ gw->originalSize = slotToRect(cw, cw->serverInputRect ()); -+ } -+ -+ if ((cw->state () & MAXIMIZE_STATE) && -+ (resize || optionGetSnapoffMaximized ())) -+ { -+ /* maximized state interferes with us, clear it */ -+ cw->maximize (0); -+ } -+ -+ if (where == GridMaximize && resize) -+ { -+ /* move the window to the correct output */ -+ if (GridWindow::get (cw)->grabIsMove) -+ { -+ xwc.x = workarea.x () + 50; -+ xwc.y = workarea.y () + 50; -+ xwc.width = workarea.width (); -+ xwc.height = workarea.height (); -+ cw->configureXWindow (CWX | CWY, &xwc); -+ } -+ cw->maximize (MAXIMIZE_STATE); -+ gw->isGridResized = true; -+ gw->isGridMaximized = true; -+ return true; -+ } -+ -+ /* Convention: -+ * xxxSlot include decorations (it's the screen area occupied) -+ * xxxRect are undecorated (it's the constrained position -+ of the contents) -+ */ -+ -+ /* slice and dice to get desired slot - including decorations */ -+ desiredSlot.setY (workarea.y () + props.gravityDown * -+ (workarea.height () / props.numCellsY)); -+ desiredSlot.setHeight (workarea.height () / props.numCellsY); -+ desiredSlot.setX (workarea.x () + props.gravityRight * -+ (workarea.width () / props.numCellsX)); -+ desiredSlot.setWidth (workarea.width () / props.numCellsX); -+ -+ /* Adjust for constraints and decorations */ -+ desiredRect = constrainSize (cw, desiredSlot); -+ /* Get current rect not including decorations */ -+ currentRect.setGeometry (cw->serverX (), cw->serverY (), -+ cw->serverWidth (), -+ cw->serverHeight ()); -+ -+ if (desiredRect.y () == currentRect.y () && -+ desiredRect.height () == currentRect.height () && -+ where != GridMaximize && gw->lastTarget == where) -+ { -+ int slotWidth25 = workarea.width () / 4; -+ int slotWidth33 = (workarea.width () / 3) + cw->input ().left; -+ int slotWidth17 = slotWidth33 - slotWidth25; -+ int slotWidth66 = workarea.width () - slotWidth33; -+ int slotWidth75 = workarea.width () - slotWidth25; -+ -+ CompRect rect25, rect33, rect66, rect75, -+ slot25, slot33, slot66, slot75; -+ -+ slot25 = desiredSlot; -+ slot25.setX (workarea.x () + -+ props.gravityRight * slotWidth75); -+ slot25.setWidth (slotWidth25); -+ rect25 = constrainSize (cw, slot25); -+ -+ slot33 = desiredSlot; -+ slot33.setX (workarea.x () + -+ props.gravityRight * slotWidth66); -+ slot33.setWidth (slotWidth33); -+ rect33 = constrainSize (cw, slot33); -+ -+ slot66 = desiredSlot; -+ slot66.setX (workarea.x () + -+ props.gravityRight * slotWidth33); -+ slot66.setWidth (slotWidth66); -+ rect66 = constrainSize (cw, slot66); -+ -+ slot75 = desiredSlot; -+ slot75.setX (workarea.x () + -+ props.gravityRight * slotWidth25); -+ slot75.setWidth (slotWidth75); -+ rect75 = constrainSize (cw, slot75); -+ -+ if (props.numCellsX == 2) /* keys (1, 4, 7, 3, 6, 9) */ -+ { -+ if ((currentRect.width () == desiredRect.width () && -+ currentRect.x () == desiredRect.x ()) || -+ (gw->resizeCount < 1) || (gw->resizeCount > 5)) -+ gw->resizeCount = 3; -+ -+ /* tricky, have to allow for window constraints when -+ * computing what the 33% and 66% offsets would be -+ */ -+ switch (gw->resizeCount) -+ { -+ case 1: -+ desiredSlot.setWidth (slotWidth33); -+ desiredSlot.setX (workarea.x () + -+ props.gravityRight * slotWidth66); -+ gw->resizeCount++; -+ break; -+ case 2: -+ gw->resizeCount++; -+ break; -+ case 3: -+ desiredSlot.setWidth (slotWidth66); -+ desiredSlot.setX (workarea.x () + -+ props.gravityRight * slotWidth33); -+ gw->resizeCount++; -+ break; -+ case 4: -+ desiredSlot.setWidth (slotWidth75); -+ desiredSlot.setX (workarea.x () + -+ props.gravityRight * slotWidth25); -+ gw->resizeCount++; -+ break; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1qoih1-0004dq...@vasks.debian.org