diff options
-rw-r--r-- | metadata/core.xml.in | 436 | ||||
-rw-r--r-- | plugins/cube/cube.xml.in | 234 | ||||
-rw-r--r-- | plugins/opengl/include/opengl/opengl.h | 7 | ||||
-rw-r--r-- | plugins/opengl/src/paint.cpp | 114 | ||||
-rw-r--r-- | plugins/opengl/src/vector.cpp | 2 | ||||
-rw-r--r-- | plugins/opengl/src/window.cpp | 7 | ||||
-rw-r--r-- | plugins/rotate/rotate.xml.in | 420 | ||||
-rw-r--r-- | plugins/scale/src/scale.cpp | 2 | ||||
-rw-r--r-- | plugins/wobbly/src/wobbly.cpp | 10 | ||||
-rw-r--r-- | plugins/wobbly/src/wobbly.h | 3 | ||||
-rw-r--r-- | src/region.cpp | 2 |
11 files changed, 682 insertions, 555 deletions
diff --git a/metadata/core.xml.in b/metadata/core.xml.in index 799e8e5..810f06c 100644 --- a/metadata/core.xml.in +++ b/metadata/core.xml.in @@ -9,144 +9,27 @@ <type>string</type> <default_plugins/> </option> - <option name="click_to_focus" type="bool"> - <_short>Click To Focus</_short> - <_long>Click on window moves input focus to it</_long> - <default>true</default> - </option> - <option name="autoraise" type="bool"> - <_short>Auto-Raise</_short> - <_long>Raise selected windows after interval</_long> - <default>true</default> - </option> - <option name="autoraise_delay" type="int"> - <_short>Auto-Raise Delay</_short> - <_long>Interval before raising selected windows</_long> - <default>1000</default> - <min>0</min> - <max>10000</max> - </option> - <option name="edge_delay" type="int"> - <_short>Edge Trigger Delay</_short> - <_long>Duration the pointer must rest in a screen edge before an edge action is taken.</_long> - <default>0</default> - <min>0</min> - <max>10000</max> - </option> - <option name="close_window_key" type="key"> - <_short>Close Window</_short> - <_long>Close active window</_long> - <default><Alt>F4</default> - </option> - <option name="close_window_button" type="button"> - <_short>Close Window</_short> - <_long>Close active window</_long> - </option> - <option name="raise_window_key" type="key"> - <_short>Raise Window</_short> - <_long>Raise window above other windows</_long> - </option> - <option name="raise_window_button" type="button"> - <_short>Raise Window</_short> - <_long>Raise window above other windows</_long> - <default><Control>Button6</default> - </option> - <option name="lower_window_key" type="key"> - <_short>Lower Window</_short> - <_long>Lower window beneath other windows</_long> - </option> - <option name="lower_window_button" type="button"> - <_short>Lower Window</_short> - <_long>Lower window beneath other windows</_long> - <default><Alt>Button6</default> - </option> - <option name="unmaximize_window_key" type="key"> - <_short>Unmaximize Window</_short> - <_long>Unmaximize active window</_long> - <default><Alt>F5</default> - </option> - <option name="minimize_window_key" type="key"> - <_short>Minimize Window</_short> - <_long>Minimize active window</_long> - <default><Alt>F9</default> - </option> - <option name="minimize_window_button" type="button"> - <_short>Minimize Window</_short> - <_long>Minimize active window</_long> - </option> - <option name="maximize_window_key" type="key"> - <_short>Maximize Window</_short> - <_long>Maximize active window</_long> - <default><Alt>F10</default> - </option> - <option name="maximize_window_horizontally_key" type="key"> - <_short>Maximize Window Horizontally</_short> - <_long>Maximize active window horizontally</_long> - </option> - <option name="maximize_window_vertically_key" type="key"> - <_short>Maximize Window Vertically</_short> - <_long>Maximize active window vertically</_long> - </option> - <option name="window_menu_button" type="button"> - <_short>Window Menu</_short> - <_long>Window menu button binding</_long> - <default><Alt>Button3</default> - </option> - <option name="window_menu_key" type="key"> - <_short>Window Menu</_short> - <_long>Window menu key binding</_long> - <default><Alt>space</default> - </option> - <option name="show_desktop_key" type="key"> - <_short>Show Desktop</_short> - <_long>Hide all windows and focus desktop</_long> - <default><Control><Alt>d</default> - </option> - <option name="show_desktop_edge" type="edge"> - <_short>Show Desktop</_short> - <_long>Hide all windows and focus desktop</_long> - <default/> - </option> - <option name="raise_on_click" type="bool"> - <_short>Raise On Click</_short> - <_long>Raise windows when clicked</_long> - <default>true</default> - </option> <option name="audible_bell" type="bool"> <_short>Audible Bell</_short> <_long>Audible system beep</_long> <default>true</default> </option> - <option name="toggle_window_maximized_key" type="key"> - <_short>Toggle Window Maximized</_short> - <_long>Toggle active window maximized</_long> - </option> - <option name="toggle_window_maximized_button" type="button"> - <_short>Toggle Window Maximized</_short> - <_long>Toggle active window maximized</_long> - </option> - <option name="toggle_window_maximized_horizontally_key" type="key"> - <_short>Toggle Window Maximized Horizontally</_short> - <_long>Toggle active window maximized horizontally</_long> - </option> - <option name="toggle_window_maximized_vertically_key" type="key"> - <_short>Toggle Window Maximized Vertically</_short> - <_long>Toggle active window maximized vertically</_long> + <option name="ignore_hints_when_maximized" type="bool"> + <_short>Ignore Hints When Maximized</_short> + <_long>Ignore size increment and aspect hints when window is maximized</_long> + <default>true</default> </option> <option name="hide_skip_taskbar_windows" type="bool"> <_short>Hide Skip Taskbar Windows</_short> <_long>Hide windows not in taskbar when entering show desktop mode</_long> <default>true</default> </option> - <option name="toggle_window_shaded_key" type="key"> - <_short>Toggle Window Shaded</_short> - <_long>Toggle active window shaded</_long> - <default><Control><Alt>s</default> - </option> - <option name="ignore_hints_when_maximized" type="bool"> - <_short>Ignore Hints When Maximized</_short> - <_long>Ignore size increment and aspect hints when window is maximized</_long> - <default>true</default> + <option name="edge_delay" type="int"> + <_short>Edge Trigger Delay</_short> + <_long>Duration the pointer must rest in a screen edge before an edge action is taken.</_long> + <default>0</default> + <min>0</min> + <max>10000</max> </option> <option name="ping_delay" type="int"> <_short>Ping Delay</_short> @@ -155,96 +38,225 @@ <min>1000</min> <max>30000</max> </option> - <option name="hsize" type="int"> - <_short>Horizontal Virtual Size</_short> - <_long>Screen size multiplier for horizontal virtual size</_long> - <default>4</default> - <min>1</min> - <max>32</max> - </option> - <option name="vsize" type="int"> - <_short>Vertical Virtual Size</_short> - <_long>Screen size multiplier for vertical virtual size</_long> - <default>1</default> - <min>1</min> - <max>32</max> - </option> <option name="default_icon" type="string"> <_short>Default Icon</_short> <_long>Default window icon image</_long> <default>icon</default> </option> - <option name="number_of_desktops" type="int"> - <_short>Number of Desktops</_short> - <_long>Number of virtual desktops</_long> - <default>1</default> - <min>1</min> - <max>36</max> - </option> - <option name="detect_outputs" type="bool"> - <_short>Detect Outputs</_short> - <_long>Automatic detection of output devices</_long> - <default>true</default> - </option> - <option name="outputs" type="list"> - <_short>Outputs</_short> - <_long>List of strings describing output devices</_long> - <type>string</type> - <default> - <value>640x480+0+0</value> - </default> - </option> - <option name="overlapping_outputs" type="int"> - <_short>Overlapping Output Handling</_short> - <_long>Which one of overlapping output devices should be preferred</_long> - <default>0</default> - <min>0</min> - <max>2</max> - <desc> - <value>0</value> - <_name>Smart mode</_name> - </desc> - <desc> - <value>1</value> - <_name>Prefer larger output</_name> - </desc> - <desc> - <value>2</value> - <_name>Prefer smaller output</_name> - </desc> - </option> - <option name="focus_prevention_level" type="int"> - <_short>Focus Prevention Level</_short> - <_long>Level of focus stealing prevention</_long> - <min>0</min> - <max>4</max> - <default>1</default> - <desc> - <value>0</value> - <_name>Off</_name> - </desc> - <desc> - <value>1</value> - <_name>Low</_name> - </desc> - <desc> - <value>2</value> - <_name>Normal</_name> - </desc> - <desc> - <value>3</value> - <_name>High</_name> - </desc> - <desc> - <value>4</value> - <_name>Very High</_name> - </desc> - </option> - <option name="focus_prevention_match" type="match"> - <_short>Focus Prevention Windows</_short> - <_long>Focus prevention windows</_long> - <default>any</default> - </option> + <group> + <_short>Display Settings</_short> + <option name="overlapping_outputs" type="int"> + <_short>Overlapping Output Handling</_short> + <_long>Which one of overlapping output devices should be preferred</_long> + <default>0</default> + <min>0</min> + <max>2</max> + <desc> + <value>0</value> + <_name>Smart mode</_name> + </desc> + <desc> + <value>1</value> + <_name>Prefer larger output</_name> + </desc> + <desc> + <value>2</value> + <_name>Prefer smaller output</_name> + </desc> + </option> + <option name="detect_outputs" type="bool"> + <_short>Detect Outputs</_short> + <_long>Automatic detection of output devices</_long> + <default>true</default> + </option> + <option name="outputs" type="list"> + <_short>Outputs</_short> + <_long>List of strings describing output devices</_long> + <type>string</type> + <default> + <value>640x480+0+0</value> + </default> + </option> + </group> + <group> + <_short>Focus & Raise Behaviour</_short> + <option name="click_to_focus" type="bool"> + <_short>Click To Focus</_short> + <_long>Click on window moves input focus to it</_long> + <default>true</default> + </option> + <option name="raise_on_click" type="bool"> + <_short>Raise On Click</_short> + <_long>Raise windows when clicked</_long> + <default>true</default> + </option> + <option name="autoraise" type="bool"> + <_short>Auto-Raise</_short> + <_long>Raise selected windows after interval</_long> + <default>true</default> + </option> + <option name="autoraise_delay" type="int"> + <_short>Auto-Raise Delay</_short> + <_long>Interval before raising selected windows</_long> + <default>1000</default> + <min>0</min> + <max>10000</max> + </option> + <option name="focus_prevention_level" type="int"> + <_short>Focus Prevention Level</_short> + <_long>Level of focus stealing prevention</_long> + <min>0</min> + <max>4</max> + <default>1</default> + <desc> + <value>0</value> + <_name>Off</_name> + </desc> + <desc> + <value>1</value> + <_name>Low</_name> + </desc> + <desc> + <value>2</value> + <_name>Normal</_name> + </desc> + <desc> + <value>3</value> + <_name>High</_name> + </desc> + <desc> + <value>4</value> + <_name>Very High</_name> + </desc> + </option> + <option name="focus_prevention_match" type="match"> + <_short>Focus Prevention Windows</_short> + <_long>Focus prevention windows</_long> + <default>any</default> + </option> + </group> + <group> + <_short>Key bindings</_short> + <option name="close_window_key" type="key"> + <_short>Close Window</_short> + <_long>Close active window</_long> + <default><Alt>F4</default> + </option> + <option name="close_window_button" type="button"> + <_short>Close Window</_short> + <_long>Close active window</_long> + </option> + <option name="raise_window_key" type="key"> + <_short>Raise Window</_short> + <_long>Raise window above other windows</_long> + </option> + <option name="raise_window_button" type="button"> + <_short>Raise Window</_short> + <_long>Raise window above other windows</_long> + <default><Control>Button6</default> + </option> + <option name="lower_window_key" type="key"> + <_short>Lower Window</_short> + <_long>Lower window beneath other windows</_long> + </option> + <option name="lower_window_button" type="button"> + <_short>Lower Window</_short> + <_long>Lower window beneath other windows</_long> + <default><Alt>Button6</default> + </option> + <option name="minimize_window_key" type="key"> + <_short>Minimize Window</_short> + <_long>Minimize active window</_long> + <default><Alt>F9</default> + </option> + <option name="minimize_window_button" type="button"> + <_short>Minimize Window</_short> + <_long>Minimize active window</_long> + </option> + <option name="maximize_window_key" type="key"> + <_short>Maximize Window</_short> + <_long>Maximize active window</_long> + <default><Alt>F10</default> + </option> + <option name="unmaximize_window_key" type="key"> + <_short>Unmaximize Window</_short> + <_long>Unmaximize active window</_long> + <default><Alt>F5</default> + </option> + <option name="maximize_window_horizontally_key" type="key"> + <_short>Maximize Window Horizontally</_short> + <_long>Maximize active window horizontally</_long> + </option> + <option name="maximize_window_vertically_key" type="key"> + <_short>Maximize Window Vertically</_short> + <_long>Maximize active window vertically</_long> + </option> + <option name="window_menu_key" type="key"> + <_short>Window Menu</_short> + <_long>Window menu key binding</_long> + <default><Alt>space</default> + </option> + <option name="window_menu_button" type="button"> + <_short>Window Menu</_short> + <_long>Window menu button binding</_long> + <default><Alt>Button3</default> + </option> + <option name="show_desktop_key" type="key"> + <_short>Show Desktop</_short> + <_long>Hide all windows and focus desktop</_long> + <default><Control><Alt>d</default> + </option> + <option name="show_desktop_edge" type="edge"> + <_short>Show Desktop</_short> + <_long>Hide all windows and focus desktop</_long> + <default/> + </option> + <option name="toggle_window_maximized_key" type="key"> + <_short>Toggle Window Maximized</_short> + <_long>Toggle active window maximized</_long> + </option> + <option name="toggle_window_maximized_button" type="button"> + <_short>Toggle Window Maximized</_short> + <_long>Toggle active window maximized</_long> + </option> + <option name="toggle_window_maximized_horizontally_key" type="key"> + <_short>Toggle Window Maximized Horizontally</_short> + <_long>Toggle active window maximized horizontally</_long> + </option> + <option name="toggle_window_maximized_vertically_key" type="key"> + <_short>Toggle Window Maximized Vertically</_short> + <_long>Toggle active window maximized vertically</_long> + </option> + <option name="toggle_window_shaded_key" type="key"> + <_short>Toggle Window Shaded</_short> + <_long>Toggle active window shaded</_long> + <default><Control><Alt>s</default> + </option> + </group> + <group> + <_short>Desktop Size</_short> + <option name="hsize" type="int"> + <_short>Horizontal Virtual Size</_short> + <_long>Screen size multiplier for horizontal virtual size</_long> + <default>4</default> + <min>1</min> + <max>32</max> + </option> + <option name="vsize" type="int"> + <_short>Vertical Virtual Size</_short> + <_long>Screen size multiplier for vertical virtual size</_long> + <default>1</default> + <min>1</min> + <max>32</max> + </option> + <option name="number_of_desktops" type="int"> + <_short>Number of Desktops</_short> + <_long>Number of virtual desktops</_long> + <default>1</default> + <min>1</min> + <max>36</max> + </option> + </group> </options> </plugin> </compiz> diff --git a/plugins/cube/cube.xml.in b/plugins/cube/cube.xml.in index d07f098..61cbd01 100644 --- a/plugins/cube/cube.xml.in +++ b/plugins/cube/cube.xml.in @@ -2,6 +2,7 @@ <plugin name="cube" useBcop="true"> <_short>Desktop Cube</_short> <_long>Place windows on cube</_long> + <category>Desktop</category> <feature>largedesktop</feature> <deps> <requirement> @@ -30,120 +31,11 @@ <default>Backspace</default> <passive_grab>false</passive_grab> </option> - <option name="color" type="color"> - <_short>Cube Color</_short> - <_long>Color of top and bottom sides of the cube</_long> - <default> - <red>0xfefe</red> - <green>0xffff</green> - <blue>0xc7c7</blue> - </default> - </option> - <option name="in" type="bool"> - <_short>Inside Cube</_short> - <_long>Inside cube</_long> - <default>false</default> - </option> - <option name="scale_image" type="bool"> - <_short>Scale image</_short> - <_long>Scale images to cover top face of cube</_long> - <default>false</default> - </option> - <option name="images" type="list"> - <_short>Image files</_short> - <_long>List of PNG and SVG files that should be rendered on top face of cube</_long> - <type>string</type> - <default> - <value>freedesktop</value> - </default> - </option> - <option name="skydome" type="bool"> - <_short>Skydome</_short> - <_long>Render skydome</_long> - <default>false</default> - </option> - <option name="skydome_image" type="string"> - <_short>Skydome Image</_short> - <_long>Image to use as texture for the skydome</_long> - </option> - <option name="skydome_animated" type="bool"> - <_short>Animate Skydome</_short> - <_long>Animate skydome when rotating cube</_long> - <default>false</default> - </option> - <option name="skydome_gradient_start_color" type="color"> - <_short>Skydome Gradient Start Color</_short> - <_long>Color to use for the top color-stop of the skydome-fallback gradient</_long> - <default> - <red>0x0d0d</red> - <green>0xb1b1</green> - <blue>0xfdfd</blue> - </default> - </option> - <option name="skydome_gradient_end_color" type="color"> - <_short>Skydome Gradient End Color</_short> - <_long>Color to use for the bottom color-stop of the skydome-fallback gradient</_long> - <default> - <red>0xfefe</red> - <green>0xffff</green> - <blue>0xc7c7</blue> - </default> - </option> - <option name="acceleration" type="float"> - <_short>Acceleration</_short> - <_long>Fold Acceleration</_long> - <default>4.0</default> - <min>1.0</min> - <max>20.0</max> - <precision>0.1</precision> - </option> - <option name="speed" type="float"> - <_short>Speed</_short> - <_long>Fold Speed</_long> - <default>1.5</default> - <min>0.1</min> - <max>50.0</max> - <precision>0.1</precision> - </option> - <option name="timestep" type="float"> - <_short>Timestep</_short> - <_long>Fold Timestep</_long> - <default>1.2</default> - <min>0.1</min> - <max>50.0</max> - <precision>0.1</precision> - </option> <option name="mipmap" type="bool"> <_short>Mipmap</_short> <_long>Generate mipmaps when possible for higher quality scaling</_long> <default>true</default> </option> - <option name="adjust_image" type="bool"> - <_short>Adjust Image</_short> - <_long>Adjust top face image to rotation</_long> - <default>false</default> - </option> - <option name="active_opacity" type="float"> - <_short>Opacity During Rotation</_short> - <_long>Opacity of desktop window during rotation.</_long> - <default>100.0</default> - <min>0.0</min> - <max>100.0</max> - <precision>1.0</precision> - </option> - <option name="inactive_opacity" type="float"> - <_short>Opacity When Not Rotating</_short> - <_long>Opacity of desktop window when not rotating.</_long> - <default>100.0</default> - <min>0.0</min> - <max>100.0</max> - <precision>1.0</precision> - </option> - <option name="transparent_manual_only" type="bool"> - <_short>Transparency Only on Mouse Rotate</_short> - <_long>Initiates Cube transparency only if rotation is mouse driven.</_long> - <default>true</default> - </option> <option name="multioutput_mode" type="int"> <_short>Multi Output Mode</_short> <_long>Selects how the cube is displayed if multiple output devices are used.</_long> @@ -163,6 +55,130 @@ <_name>One big cube</_name> </desc> </option> + <group> + <_short>Behaviour</_short> + <option name="in" type="bool"> + <_short>Inside Cube</_short> + <_long>Inside cube</_long> + <default>false</default> + </option> + <option name="acceleration" type="float"> + <_short>Acceleration</_short> + <_long>Fold Acceleration</_long> + <default>4.0</default> + <min>1.0</min> + <max>20.0</max> + <precision>0.1</precision> + </option> + <option name="speed" type="float"> + <_short>Speed</_short> + <_long>Fold Speed</_long> + <default>1.5</default> + <min>0.1</min> + <max>50.0</max> + <precision>0.1</precision> + </option> + <option name="timestep" type="float"> + <_short>Timestep</_short> + <_long>Fold Timestep</_long> + <default>1.2</default> + <min>0.1</min> + <max>50.0</max> + <precision>0.1</precision> + </option> + </group> + <group> + <_short>Appearance</_short> + <option name="color" type="color"> + <_short>Cube Color</_short> + <_long>Color of top and bottom sides of the cube</_long> + <default> + <red>0xfefe</red> + <green>0xffff</green> + <blue>0xc7c7</blue> + </default> + </option> + <subgroup> + <_short>Cube Caps</_short> + <option name="scale_image" type="bool"> + <_short>Scale image</_short> + <_long>Scale images to cover top face of cube</_long> + <default>false</default> + </option> + <option name="images" type="list"> + <_short>Image files</_short> + <_long>List of PNG and SVG files that should be rendered on top face of cube</_long> + <type>string</type> + <default> + <value>freedesktop</value> + </default> + </option> + <option name="adjust_image" type="bool"> + <_short>Adjust Image</_short> + <_long>Adjust top face image to rotation</_long> + <default>false</default> + </option> + </subgroup> + <subgroup> + <_short>Skydome</_short> + <option name="skydome" type="bool"> + <_short>Skydome</_short> + <_long>Render skydome</_long> + <default>false</default> + </option> + <option name="skydome_image" type="string"> + <_short>Skydome Image</_short> + <_long>Image to use as texture for the skydome</_long> + </option> + <option name="skydome_animated" type="bool"> + <_short>Animate Skydome</_short> + <_long>Animate skydome when rotating cube</_long> + <default>false</default> + </option> + <option name="skydome_gradient_start_color" type="color"> + <_short>Skydome Gradient Start Color</_short> + <_long>Color to use for the top color-stop of the skydome-fallback gradient</_long> + <default> + <red>0x0d0d</red> + <green>0xb1b1</green> + <blue>0xfdfd</blue> + </default> + </option> + <option name="skydome_gradient_end_color" type="color"> + <_short>Skydome Gradient End Color</_short> + <_long>Color to use for the bottom color-stop of the skydome-fallback gradient</_long> + <default> + <red>0xfefe</red> + <green>0xffff</green> + <blue>0xc7c7</blue> + </default> + </option> + </subgroup> + </group> + <group> + <_short>Transparent Cube</_short> + <option name="active_opacity" type="float"> + <_short>Opacity During Rotation</_short> + <_long>Opacity of desktop window during rotation.</_long> + <default>100.0</default> + <min>0.0</min> + <max>100.0</max> + <precision>1.0</precision> + </option> + <option name="inactive_opacity" type="float"> + <_short>Opacity When Not Rotating</_short> + <_long>Opacity of desktop window when not rotating.</_long> + <default>100.0</default> + <min>0.0</min> + <max>100.0</max> + <precision>1.0</precision> + </option> + <option name="transparent_manual_only" type="bool"> + <_short>Transparency Only on Mouse Rotate</_short> + <_long>Initiates Cube transparency only if rotation is mouse driven.</_long> + <default>true</default> + </option> + </group> </options> </plugin> </compiz> diff --git a/plugins/opengl/include/opengl/opengl.h b/plugins/opengl/include/opengl/opengl.h index 3fe84cc..033e384 100644 --- a/plugins/opengl/include/opengl/opengl.h +++ b/plugins/opengl/include/opengl/opengl.h @@ -337,7 +337,9 @@ class GLWindowInterface : virtual bool glDraw (const GLMatrix &, GLFragment::Attrib &, const CompRegion &, unsigned int); virtual void glAddGeometry (const GLTexture::MatrixList &, - const CompRegion &,const CompRegion &); + const CompRegion &,const CompRegion &, + unsigned int = MAXSHORT, + unsigned int = MAXSHORT); virtual void glDrawTexture (GLTexture *texture, GLFragment::Attrib &, unsigned int); virtual void glDrawGeometry (); @@ -403,7 +405,8 @@ class GLWindow : GLFragment::Attrib &, const CompRegion &, unsigned int); WRAPABLE_HND (2, GLWindowInterface, void, glAddGeometry, const GLTexture::MatrixList &, const CompRegion &, - const CompRegion &); + const CompRegion &, + unsigned int = MAXSHORT, unsigned int = MAXSHORT); WRAPABLE_HND (3, GLWindowInterface, void, glDrawTexture, GLTexture *texture, GLFragment::Attrib &, unsigned int); WRAPABLE_HND (4, GLWindowInterface, void, glDrawGeometry); diff --git a/plugins/opengl/src/paint.cpp b/plugins/opengl/src/paint.cpp index b1a833f..3d8dfe4 100644 --- a/plugins/opengl/src/paint.cpp +++ b/plugins/opengl/src/paint.cpp @@ -252,7 +252,7 @@ PrivateGLScreen::paintOutputRegion (const GLMatrix &transform, odMask = PAINT_WINDOW_OCCLUSION_DETECTION_MASK; if ((cScreen->windowPaintOffset ().x () != 0 || - cScreen->windowPaintOffset ().x () != 0) && + cScreen->windowPaintOffset ().y () != 0) && !w->onAllViewports ()) { withOffset = true; @@ -617,10 +617,90 @@ GLWindow::glDrawGeometry () } } +static inline void +addSingleQuad (GLfloat *&d, + const GLTexture::MatrixList &matrix, + unsigned int nMatrix, + int x1, + int y1, + int x2, + int y2, + int &n, + bool rect) +{ + unsigned int it; + + if (rect) + { + ADD_RECT (d, matrix, nMatrix, x1, y1, x2, y2); + } + else + { + ADD_QUAD (d, matrix, nMatrix, x1, y1, x2, y2); + } + n++; +} + +static inline void +addQuads (GLfloat *&d, + const GLTexture::MatrixList &matrix, + unsigned int nMatrix, + int x1, + int y1, + int x2, + int y2, + int &n, + int vSize, + bool rect, + GLWindow::Geometry &geometry, + unsigned int maxGridWidth, + unsigned int maxGridHeight) +{ + int nQuadsX = (maxGridWidth == MAXSHORT) ? 1 : + 1 + (x2 - x1 - 1) / (int) maxGridWidth; // ceil. division + int nQuadsY = (maxGridHeight == MAXSHORT) ? 1 : + 1 + (y2 - y1 - 1) / (int) maxGridHeight; + int newVertexSize = (n + nQuadsX * nQuadsY) * vSize * 4; + + // Make sure enough vertices are allocated for nQuadsX * nQuadsY more quads + if (newVertexSize > geometry.vertexSize) + { + if (!geometry.moreVertices (newVertexSize)) + return; + + d = geometry.vertices + (n * vSize * 4); + } + + if (nQuadsX == 1 && nQuadsY == 1) + { + addSingleQuad (d, matrix, nMatrix, x1, y1, x2, y2, n, rect); + } + else + { + int quadWidth = 1 + (x2 - x1 - 1) / nQuadsX; // ceil. division + int quadHeight = 1 + (y2 - y1 - 1) / nQuadsY; + int nx1, ny1, nx2, ny2; + + for (ny1 = y1; ny1 < y2; ny1 = ny2) + { + ny2 = MIN (ny1 + (int) quadHeight, y2); + + for (nx1 = x1; nx1 < x2; nx1 = nx2) + { + nx2 = MIN (nx1 + (int) quadWidth, x2); + + addSingleQuad (d, matrix, nMatrix, nx1, ny1, nx2, ny2, n, rect); + } + } + } +} + void GLWindow::glAddGeometry (const GLTexture::MatrixList &matrix, const CompRegion ®ion, - const CompRegion &clip) + const CompRegion &clip, + unsigned int maxGridWidth, + unsigned int maxGridHeight) { WRAPABLE_HND_FUNC (2, glAddGeometry, matrix, region, clip) @@ -699,16 +779,10 @@ GLWindow::glAddGeometry (const GLTexture::MatrixList &matrix, if (nClip == 1) { - if (rect) - { - ADD_RECT (d, matrix, nMatrix, x1, y1, x2, y2); - } - else - { - ADD_QUAD (d, matrix, nMatrix, x1, y1, x2, y2); - } - - n++; + addQuads (d, matrix, nMatrix, + x1, y1, x2, y2, + n, vSize, rect, priv->geometry, + maxGridWidth, maxGridHeight); } else { @@ -740,18 +814,10 @@ GLWindow::glAddGeometry (const GLTexture::MatrixList &matrix, if (cbox.x1 < cbox.x2 && cbox.y1 < cbox.y2) { - if (rect) - { - ADD_RECT (d, matrix, nMatrix, - cbox.x1, cbox.y1, cbox.x2, cbox.y2); - } - else - { - ADD_QUAD (d, matrix, nMatrix, - cbox.x1, cbox.y1, cbox.x2, cbox.y2); - } - - n++; + addQuads (d, matrix, nMatrix, + cbox.x1, cbox.y1, cbox.x2, cbox.y2, + n, vSize, rect, priv->geometry, + maxGridWidth, maxGridHeight); } } } diff --git a/plugins/opengl/src/vector.cpp b/plugins/opengl/src/vector.cpp index 429f3d9..28102aa 100644 --- a/plugins/opengl/src/vector.cpp +++ b/plugins/opengl/src/vector.cpp @@ -271,4 +271,6 @@ GLVector::homogenize () for (unsigned int i = 0; i < 4; i++) v[i] /= v[3]; + + return *this; } diff --git a/plugins/opengl/src/window.cpp b/plugins/opengl/src/window.cpp index bce8846..80d2bda 100644 --- a/plugins/opengl/src/window.cpp +++ b/plugins/opengl/src/window.cpp @@ -142,8 +142,11 @@ GLWindowInterface::glDraw (const GLMatrix &transform, void GLWindowInterface::glAddGeometry (const GLTexture::MatrixList &matrix, const CompRegion ®ion, - const CompRegion &clip) - WRAPABLE_DEF (glAddGeometry, matrix, region, clip) + const CompRegion &clip, + unsigned int maxGridWidth, + unsigned int maxGridHeight) + WRAPABLE_DEF (glAddGeometry, matrix, region, clip, + maxGridWidth, maxGridHeight) void GLWindowInterface::glDrawTexture (GLTexture *texture, diff --git a/plugins/rotate/rotate.xml.in b/plugins/rotate/rotate.xml.in index 40210a5..d866729 100644 --- a/plugins/rotate/rotate.xml.in +++ b/plugins/rotate/rotate.xml.in @@ -2,6 +2,7 @@ <plugin name="rotate" useBcop="true"> <_short>Rotate Cube</_short> <_long>Rotate desktop cube</_long> + <category>Desktop</category> <deps> <requirement> <plugin>cube</plugin> @@ -11,47 +12,6 @@ </relation> </deps> <options> - <option name="initiate_button" type="button"> - <_short>Initiate</_short> - <_long>Start Rotation</_long> - <default><Control><Alt>Button1</default> - </option> - <option name="rotate_left_key" type="key"> - <_short>Rotate Left</_short> - <_long>Rotate left</_long> - <default><Control><Alt>Left</default> - </option> - <option name="rotate_left_button" type="button"> - <_short>Rotate Left</_short> - <_long>Rotate left</_long> - </option> - <option name="rotate_right_key" type="key"> - <_short>Rotate Right</_short> - <_long>Rotate right</_long> - <default><Control><Alt>Right</default> - </option> - <option name="rotate_right_button" type="button"> - <_short>Rotate Right</_short> - <_long>Rotate right</_long> - </option> - <option name="rotate_left_window_key" type="key"> - <_short>Rotate Left with Window</_short> - <_long>Rotate left and bring active window along</_long> - <default><Control><Alt><Shift>Left</default> - </option> - <option name="rotate_left_window_button" type="button"> - <_short>Rotate Left with Window</_short> - <_long>Rotate left and bring active window along</_long> - </option> - <option name="rotate_right_window_key" type="key"> - <_short>Rotate Right with Window</_short> - <_long>Rotate right and bring active window along</_long> - <default><Control><Alt><Shift>Right</default> - </option> - <option name="rotate_right_window_button" type="button"> - <_short>Rotate Right with Window</_short> - <_long>Rotate right and bring active window along</_long> - </option> <option name="edge_flip_pointer" type="bool"> <_short>Edge Flip Pointer</_short> <_long>Flip to next viewport when moving pointer to screen edge</_long> @@ -67,135 +27,6 @@ <_long>Flip to next viewport when dragging object to screen edge</_long> <default>true</default> </option> - <option name="flip_time" type="int"> - <_short>Flip Time</_short> - <_long>Timeout before flipping viewport</_long> - <default>350</default> - <min>0</min> - <max>1000</max> - </option> - <option name="rotate_to_1_key" type="key"> - <_short>Rotate To Face 1</_short> - <_long>Rotate to face 1</_long> - </option> - <option name="rotate_to_2_key" type="key"> - <_short>Rotate To Face 2</_short> - <_long>Rotate to face 2</_long> - </option> - <option name="rotate_to_3_key" type="key"> - <_short>Rotate To Face 3</_short> - <_long>Rotate to face 3</_long> - </option> - <option name="rotate_to_4_key" type="key"> - <_short>Rotate To Face 4</_short> - <_long>Rotate to face 4</_long> - </option> - <option name="rotate_to_5_key" type="key"> - <_short>Rotate To Face 5</_short> - <_long>Rotate to face 5</_long> - </option> - <option name="rotate_to_6_key" type="key"> - <_short>Rotate To Face 6</_short> - <_long>Rotate to face 6</_long> - </option> - <option name="rotate_to_7_key" type="key"> - <_short>Rotate To Face 7</_short> - <_long>Rotate to face 7</_long> - </option> - <option name="rotate_to_8_key" type="key"> - <_short>Rotate To Face 8</_short> - <_long>Rotate to face 8</_long> - </option> - <option name="rotate_to_9_key" type="key"> - <_short>Rotate To Face 9</_short> - <_long>Rotate to face 9</_long> - </option> - <option name="rotate_to_10_key" type="key"> - <_short>Rotate To Face 10</_short> - <_long>Rotate to face 10</_long> - </option> - <option name="rotate_to_11_key" type="key"> - <_short>Rotate To Face 11</_short> - <_long>Rotate to face 11</_long> - </option> - <option name="rotate_to_12_key" type="key"> - <_short>Rotate To Face 12</_short> - <_long>Rotate to face 12</_long> - </option> - <option name="rotate_to_1_window_key" type="key"> - <_short>Rotate To Face 1 with Window</_short> - <_long>Rotate to face 1 and bring active window along</_long> - </option> - <option name="rotate_to_2_window_key" type="key"> - <_short>Rotate To Face 2 with Window</_short> - <_long>Rotate to face 2 and bring active window along</_long> - </option> - <option name="rotate_to_3_window_key" type="key"> - <_short>Rotate To Face 3 with Window</_short> - <_long>Rotate to face 3 and bring active window along</_long> - </option> - <option name="rotate_to_4_window_key" type="key"> - <_short>Rotate To Face 4 with Window</_short> - <_long>Rotate to face 4 and bring active window along</_long> - </option> - <option name="rotate_to_5_window_key" type="key"> - <_short>Rotate To Face 5 with Window</_short> - <_long>Rotate to face 5 and bring active window along</_long> - </option> - <option name="rotate_to_6_window_key" type="key"> - <_short>Rotate To Face 6 with Window</_short> - <_long>Rotate to face 6 and bring active window along</_long> - </option> - <option name="rotate_to_7_window_key" type="key"> - <_short>Rotate To Face 7 with Window</_short> - <_long>Rotate to face 7 and bring active window along</_long> - </option> - <option name="rotate_to_8_window_key" type="key"> - <_short>Rotate To Face 8 with Window</_short> - <_long>Rotate to face 8 and bring active window along</_long> - </option> - <option name="rotate_to_9_window_key" type="key"> - <_short>Rotate To Face 9 with Window</_short> - <_long>Rotate to face 9 and bring active window along</_long> - </option> - <option name="rotate_to_10_window_key" type="key"> - <_short>Rotate To Face 10 with Window</_short> - <_long>Rotate to face 10 and bring active window along</_long> - </option> - <option name="rotate_to_11_window_key" type="key"> - <_short>Rotate To Face 11 with Window</_short> - <_long>Rotate to face 11 and bring active window along</_long> - </option> - <option name="rotate_to_12_window_key" type="key"> - <_short>Rotate To Face 12 with Window</_short> - <_long>Rotate to face 12 and bring active window along</_long> - </option> - <option name="rotate_to_key" type="key"> - <_short>Rotate To</_short> - <_long>Rotate to viewport</_long> - </option> - <option name="rotate_window_key" type="key"> - <_short>Rotate window</_short> - <_long>Rotate with window</_long> - </option> - <option name="rotate_flip_left_edge" type="edge"> - <_short>Rotate Flip Left</_short> - <_long>Flip to left viewport and warp pointer</_long> - <nodelay>true</nodelay> - <allowed edgednd="true"/> - <default> - <edge name="Left"/> - </default> - </option> - <option name="rotate_flip_right_edge" type="edge"> - <_short>Rotate Flip Right</_short> - <_long>Flip to right viewport and warp pointer</_long> - <nodelay>true</nodelay> - <allowed edgednd="true"/> - <default> - <edge name="Right"/> - </default> - </option> <option name="raise_on_rotate" type="bool"> <_short>Raise on rotate</_short> <_long>Raise window when rotating</_long> @@ -206,22 +37,6 @@ <_long>Invert Y axis for pointer movement</_long> <default>false</default> </option> - <option name="sensitivity" type="float"> - <_short>Pointer Sensitivity</_short> - <_long>Sensitivity of pointer movement</_long> - <default>1.0</default> - <min>0.01</min> - <max>100.0</max> - <precision>0.01</precision> - </option> - <option name="acceleration" type="float"> - <_short>Acceleration</_short> - <_long>Rotation Acceleration</_long> - <default>4.0</default> - <min>1.0</min> - <max>20.0</max> - <precision>0.1</precision> - </option> <option name="snap_top" type="bool"> <_short>Snap To Top Face</_short> <_long>Snap Cube Rotation to Top Face</_long> @@ -232,22 +47,6 @@ <_long>Snap Cube Rotation to Bottom Face</_long> <default>false</default> </option> - <option name="speed" type="float"> - <_short>Speed</_short> - <_long>Rotation Speed</_long> - <default>2.0</default> - <min>0.1</min> - <max>50.0</max> - <precision>0.1</precision> - </option> - <option name="timestep" type="float"> - <_short>Timestep</_short> - <_long>Rotation Timestep</_long> - <default>1.0</default> - <min>0.1</min> - <max>50.0</max> - <precision>0.1</precision> - </option> <option name="zoom" type="float"> <_short>Zoom</_short> <_long>Rotation Zoom</_long> @@ -256,6 +55,223 @@ <max>2.0</max> <precision>0.1</precision> </option> + <subgroup> + <_short>Additional Settings</_short> + <option name="flip_time" type="int"> + <_short>Flip Time</_short> + <_long>Timeout before flipping viewport</_long> + <default>350</default> + <min>0</min> + <max>1000</max> + </option> + <option name="sensitivity" type="float"> + <_short>Pointer Sensitivity</_short> + <_long>Sensitivity of pointer movement</_long> + <default>1.0</default> + <min>0.01</min> + <max>100.0</max> + <precision>0.01</precision> + </option> + <option name="acceleration" type="float"> + <_short>Acceleration</_short> + <_long>Rotation Acceleration</_long> + <default>4.0</default> + <min>1.0</min> + <max>20.0</max> + <precision>0.1</precision> + </option> + <option name="speed" type="float"> + <_short>Speed</_short> + <_long>Rotation Speed</_long> + <default>2.0</default> + <min>0.1</min> + <max>50.0</max> + <precision>0.1</precision> + </option> + <option name="timestep" type="float"> + <_short>Timestep</_short> + <_long>Rotation Timestep</_long> + <default>1.0</default> + <min>0.1</min> + <max>50.0</max> + <precision>0.1</precision> + </option> + </subgroup> + <group> + <_short>Bindings</_short> + <subgroup> + <_short>Rotate cube</_short> + <option name="initiate_button" type="button"> + <_short>Initiate</_short> + <_long>Start Rotation</_long> + <default><Control><Alt>Button1</default> + </option> + <option name="rotate_left_key" type="key"> + <_short>Rotate Left</_short> + <_long>Rotate left</_long> + <default><Control><Alt>Left</default> + </option> + <option name="rotate_left_button" type="button"> + <_short>Rotate Left</_short> + <_long>Rotate left</_long> + </option> + <option name="rotate_right_key" type="key"> + <_short>Rotate Right</_short> + <_long>Rotate right</_long> + <default><Control><Alt>Right</default> + </option> + <option name="rotate_right_button" type="button"> + <_short>Rotate Right</_short> + <_long>Rotate right</_long> + </option> + <option name="rotate_left_window_key" type="key"> + <_short>Rotate Left with Window</_short> + <_long>Rotate left and bring active window along</_long> + <default><Control><Alt><Shift>Left</default> + </option> + <option name="rotate_left_window_button" type="button"> + <_short>Rotate Left with Window</_short> + <_long>Rotate left and bring active window along</_long> + </option> + <option name="rotate_right_window_key" type="key"> + <_short>Rotate Right with Window</_short> + <_long>Rotate right and bring active window along</_long> + <default><Control><Alt><Shift>Right</default> + </option> + <option name="rotate_right_window_button" type="button"> + <_short>Rotate Right with Window</_short> + <_long>Rotate right and bring active window along</_long> + </option> + <option name="rotate_to_key" type="key"> + <_short>Rotate To</_short> + <_long>Rotate to viewport</_long> + </option> + <option name="rotate_window_key" type="key"> + <_short>Rotate window</_short> + <_long>Rotate with window</_long> + </option> + <option name="rotate_flip_left_edge" type="edge"> + <_short>Rotate Flip Left</_short> + <_long>Flip to left viewport and warp pointer</_long> + <nodelay>true</nodelay> + <allowed edgednd="true"/> + <default> + <edge name="Left"/> + </default> + </option> + <option name="rotate_flip_right_edge" type="edge"> + <_short>Rotate Flip Right</_short> + <_long>Flip to right viewport and warp pointer</_long> + <nodelay>true</nodelay> + <allowed edgednd="true"/> + <default> + <edge name="Right"/> + </default> + </option> + </subgroup> + <subgroup> + <_short>Rotate to cube face</_short> + <option name="rotate_to_1_key" type="key"> + <_short>Rotate To Face 1</_short> + <_long>Rotate to face 1</_long> + </option> + <option name="rotate_to_2_key" type="key"> + <_short>Rotate To Face 2</_short> + <_long>Rotate to face 2</_long> + </option> + <option name="rotate_to_3_key" type="key"> + <_short>Rotate To Face 3</_short> + <_long>Rotate to face 3</_long> + </option> + <option name="rotate_to_4_key" type="key"> + <_short>Rotate To Face 4</_short> + <_long>Rotate to face 4</_long> + </option> + <option name="rotate_to_5_key" type="key"> + <_short>Rotate To Face 5</_short> + <_long>Rotate to face 5</_long> + </option> + <option name="rotate_to_6_key" type="key"> + <_short>Rotate To Face 6</_short> + <_long>Rotate to face 6</_long> + </option> + <option name="rotate_to_7_key" type="key"> + <_short>Rotate To Face 7</_short> + <_long>Rotate to face 7</_long> + </option> + <option name="rotate_to_8_key" type="key"> + <_short>Rotate To Face 8</_short> + <_long>Rotate to face 8</_long> + </option> + <option name="rotate_to_9_key" type="key"> + <_short>Rotate To Face 9</_short> + <_long>Rotate to face 9</_long> + </option> + <option name="rotate_to_10_key" type="key"> + <_short>Rotate To Face 10</_short> + <_long>Rotate to face 10</_long> + </option> + <option name="rotate_to_11_key" type="key"> + <_short>Rotate To Face 11</_short> + <_long>Rotate to face 11</_long> + </option> + <option name="rotate_to_12_key" type="key"> + <_short>Rotate To Face 12</_short> + <_long>Rotate to face 12</_long> + </option> + </subgroup> + <subgroup> + <_short>Rotate to cube face with window</_short> + <option name="rotate_to_1_window_key" type="key"> + <_short>Rotate To Face 1 with Window</_short> + <_long>Rotate to face 1 and bring active window along</_long> + </option> + <option name="rotate_to_2_window_key" type="key"> + <_short>Rotate To Face 2 with Window</_short> + <_long>Rotate to face 2 and bring active window along</_long> + </option> + <option name="rotate_to_3_window_key" type="key"> + <_short>Rotate To Face 3 with Window</_short> + <_long>Rotate to face 3 and bring active window along</_long> + </option> + <option name="rotate_to_4_window_key" type="key"> + <_short>Rotate To Face 4 with Window</_short> + <_long>Rotate to face 4 and bring active window along</_long> + </option> + <option name="rotate_to_5_window_key" type="key"> + <_short>Rotate To Face 5 with Window</_short> + <_long>Rotate to face 5 and bring active window along</_long> + </option> + <option name="rotate_to_6_window_key" type="key"> + <_short>Rotate To Face 6 with Window</_short> + <_long>Rotate to face 6 and bring active window along</_long> + </option> + <option name="rotate_to_7_window_key" type="key"> + <_short>Rotate To Face 7 with Window</_short> + <_long>Rotate to face 7 and bring active window along</_long> + </option> + <option name="rotate_to_8_window_key" type="key"> + <_short>Rotate To Face 8 with Window</_short> + <_long>Rotate to face 8 and bring active window along</_long> + </option> + <option name="rotate_to_9_window_key" type="key"> + <_short>Rotate To Face 9 with Window</_short> + <_long>Rotate to face 9 and bring active window along</_long> + </option> + <option name="rotate_to_10_window_key" type="key"> + <_short>Rotate To Face 10 with Window</_short> + <_long>Rotate to face 10 and bring active window along</_long> + </option> + <option name="rotate_to_11_window_key" type="key"> + <_short>Rotate To Face 11 with Window</_short> + <_long>Rotate to face 11 and bring active window along</_long> + </option> + <option name="rotate_to_12_window_key" type="key"> + <_short>Rotate To Face 12 with Window</_short> + <_long>Rotate to face 12 and bring active window along</_long> + </option> + </subgroup> + </group> </options> </plugin> </compiz> diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp index d29c426..feb1573 100644 --- a/plugins/scale/src/scale.cpp +++ b/plugins/scale/src/scale.cpp @@ -1328,7 +1328,7 @@ PrivateScaleScreen::windowRemove (Window id) if (!w) return; - if (state != ScaleScreen::Idle && state != ScaleScreen::In) + if (state == ScaleScreen::Idle || state == ScaleScreen::In) return; foreach (ScaleWindow *lw, windows) diff --git a/plugins/wobbly/src/wobbly.cpp b/plugins/wobbly/src/wobbly.cpp index a2d98c1..2af85cc 100644 --- a/plugins/wobbly/src/wobbly.cpp +++ b/plugins/wobbly/src/wobbly.cpp @@ -1510,7 +1510,9 @@ WobblyWindow::glDrawGeometry () void WobblyWindow::glAddGeometry (const GLTexture::MatrixList &matrix, const CompRegion ®ion, - const CompRegion &clip) + const CompRegion &clip, + unsigned int maxGridWidth, + unsigned int maxGridHeight) { GLWindow::Geometry &geom = gWindow->geometry (); @@ -1551,6 +1553,12 @@ WobblyWindow::glAddGeometry (const GLTexture::MatrixList &matrix, if (gridH < wScreen->optionGetMinGridSize ()) gridH = wScreen->optionGetMinGridSize (); + if (gridW > (int) maxGridWidth) + gridW = (int) maxGridWidth; + + if (gridH > (int) maxGridHeight) + gridH = (int) maxGridHeight; + geom.texUnits = (int) nMatrix; vSize = 3 + (int) nMatrix * 2; diff --git a/plugins/wobbly/src/wobbly.h b/plugins/wobbly/src/wobbly.h index fb4cc3e..f639b73 100644 --- a/plugins/wobbly/src/wobbly.h +++ b/plugins/wobbly/src/wobbly.h @@ -283,7 +283,8 @@ public: bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &, const CompRegion &, unsigned int); void glAddGeometry (const GLTexture::MatrixList &, - const CompRegion &, const CompRegion &); + const CompRegion &, const CompRegion &, + unsigned int = MAXSHORT, unsigned int = MAXSHORT); void glDrawGeometry (); WobblyScreen *wScreen; diff --git a/src/region.cpp b/src/region.cpp index 9cd4e33..44bee8c 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -399,7 +399,7 @@ CompRegion::operator^= (const CompRegion &r) const CompRegion CompRegion::operator| (const CompRegion &r) const { - united (r); + return united (r); } CompRegion & |