Bug 325432 - Cube
Summary: Cube
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 4.11.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: http://www.4shared.com/photo/jCmbm9By...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-29 15:28 UTC by Marcos de Brito Carvalho
Modified: 2013-11-17 05:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.3


Attachments
Cube (79.40 KB, patch)
2013-09-29 15:52 UTC, Marcos de Brito Carvalho
Details
Cube (79.40 KB, image/jpeg)
2013-09-29 15:56 UTC, Marcos de Brito Carvalho
Details
fixing patch (942 bytes, patch)
2013-09-29 19:05 UTC, Thomas Lübking
Details
If you select: "The windows are on top of the cube" (86.88 KB, image/jpeg)
2013-09-30 21:55 UTC, Marcos de Brito Carvalho
Details
Cubo bug kde 4.11.3 (96.57 KB, image/jpeg)
2013-11-16 12:41 UTC, Marcos de Brito Carvalho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos de Brito Carvalho 2013-09-29 15:28:11 UTC
After updating kde 4:11 the windows do not fold the cube from a work area and another when placed in the corner of the monitor. This effect with playing videos is very beautiful, because the window bent between two areas of work in the cube. It's my favorite effect, I am waiting for a response.

Original text in Portuguese:
"Apos atualizar kde 4.11 as janelas no cubo não dobram entre uma area de trabalho e outra quando as colocamos no canto do monitor. Este efeito com videos tocando fica muito bonito , pois a janela dobrava entre duas areas de trabalho no cubo. É o meu efeito favorito, fico em espera a uma resposta."

Reproducible: Always
Comment 1 Thomas Lübking 2013-09-29 15:46:13 UTC
Can you please attach the screenshot/s to the bug - 4shared requires registration.

Also please attach the output of "qdbus org.kde.kwin /KWin supportInformation"
Comment 2 Marcos de Brito Carvalho 2013-09-29 15:49:35 UTC
Print: http://www.4shared.com/photo/jCmbm9By/Bug.html
Comment 3 Marcos de Brito Carvalho 2013-09-29 15:52:12 UTC
Created attachment 82545 [details]
Cube

Windows, Cube
Comment 4 Marcos de Brito Carvalho 2013-09-29 15:56:08 UTC
Created attachment 82546 [details]
Cube

Windows on Cube
Comment 5 Marcos de Brito Carvalho 2013-09-29 16:00:31 UTC
I struggled but managed to post correctly. Thanks, Address:
http://bugsfiles.kde.org/attachment.cgi?id=82546


2013/9/29 Thomas Lübking <thomas.luebking@gmail.com>

> https://bugs.kde.org/show_bug.cgi?id=325432
>
> Thomas Lübking <thomas.luebking@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>            Severity|critical                    |normal
>
> --- Comment #1 from Thomas Lübking <thomas.luebking@gmail.com> ---
> Can you please attach the screenshot/s to the bug - 4shared requires
> registration.
>
> Also please attach the output of "qdbus org.kde.kwin /KWin
> supportInformation"
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 6 Thomas Lübking 2013-09-29 19:05:52 UTC
Created attachment 82550 [details]
fixing patch

Clipping, though it's strange since window painting apparently was unconditionally clipped ever. Clipping probably didn't take place on lower level painting?

Anyway it seems reasonable to not clip window painting on a transformed screen (though i smell relation to the desktop grid multiscreen clipping?)
Comment 7 Marcos de Brito Carvalho 2013-09-29 21:53:26 UTC
Until 4:10 kde windows are always as shown. 4:11 When updating the effect no longer works right. Its fix? It was my favorite effect. He loved to show my friends. And after update got this error.


Original Portuguese text:

Até kde 4.10 as janelas sempre ficam como na figura. Ao atualizar 4.11 o efeito não dá mais certo. Tem como concertar? Era meu efeito favorito. Adorava mostrar para meus amigos. E após atualizar ficou com este erro.
Comment 8 Thomas Lübking 2013-09-30 14:12:21 UTC
The attached patch will fix the issue that windows don't extend to other virtual desktops on the cube. ("Your" issue)

I'm not sure whether it's the 100% correct way to fix it right now but he bug should be fixed in 4.11.3 (or if you compile from sources, you can just apply the patch immediately)
Comment 9 Martin Flöser 2013-09-30 17:09:40 UTC
I'm more wondering why it broke in the first place. As it's present in all three OpenGL variants I guess it's unrelated to Fredrik's OpenGL changes. Maybe it's a case for bisecting?
Comment 10 Thomas Lübking 2013-09-30 18:49:00 UTC
VADE RETRO! SATANAS!

Keep your bisect orgies ;-P

I bet on commit be96f9000d731fe2a23c740742385c79c8913123

Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Thu Mar 29 20:17:57 2012 +0200

    Adding a DesktopThumbnailItem declarative item
    
    Similar to WindowThumbnailItem for rendering a desktop thumbnail.
    Uses the new paintDesktop hook.


The issue will be the additon of "&& !(mask & PAINT_SCREEN_TRANSFORMED)" to the hardwareClipping which causes it to be false - and us running into the quad clipping branch.

The original condition for the branch was "region != infiniteRegion() && (mask & PAINT_WINDOW_TRANSFORMED)"

Do you recall why you needed to disable hardware clipping here (or to be more precise: enable quad clipping)?
Comment 11 Marcos de Brito Carvalho 2013-09-30 21:49:06 UTC
If you select: "The windows are on top of the cube" (Annex 2). The same problem occurs. Thank you for your attention, I am user kde a long time, I'm not advanced user, use the kde for routine activities in my home. I am grateful to everyone for this incredible environment KDE.


Original Portuguese text:

Se selecionar: " As janelas passam por cima do cubo" ( conforme anexo 2 ).  Ocorre o mesmo problema. Agradeço a todos pela atenção, sou usuário do kde a muito tempo, não sou usuário avançado, uso o kde para atividades de rotina em minha casa. Fico grato a todos por este incrivel ambiente, o KDE.
Comment 12 Marcos de Brito Carvalho 2013-09-30 21:52:15 UTC
If you select: "The windows are on top of the cube" (Annex 2). The same problem occurs. Thank you for your attention, I am user kde a long time, I'm not advanced user, use the kde for routine activities in my home. I am grateful to everyone for this incredible environment KDE.
Comment 13 Marcos de Brito Carvalho 2013-09-30 21:55:50 UTC
Created attachment 82568 [details]
If you select: "The windows are on top of the cube"

If you select: "The windows are on top of the cube" (Annex 2). The same problem occurs. Thank you for your attention, I am user kde a long time, I'm not advanced user, use the kde for routine activities in my home. I am grateful to everyone for this incredible environment KDE.

Português:

Se selecionar: " As janelas passam por cima do cubo" ( conforme anexo 2 ).  Ocorre o mesmo problema. Agradeço a todos pela atenção, sou usuário do kde a muito tempo, não sou usuário avançado, uso o kde para atividades de rotina em minha casa. Fico grato a todos por este incrivel ambiente, o KDE.
Comment 14 Thomas Lübking 2013-10-01 04:54:04 UTC
Marcos, we can reproduce the issue, we know what will fix it and (probably) also what broke it in the first place.
The bug is not in the cube effect itself - no setting there will have any impact on the problem.

The compositor falsely clips the window in this context. No setting will change that. You'll have to wait for a fixed version or apply the patch.
Comment 15 Thomas Lübking 2013-10-01 18:03:54 UTC
@Martin
Yupp, reverting that m_hardwareClipping constraint would "fix" it as well, but i couldn't figure why it was required.
Comment 16 Martin Flöser 2013-10-01 19:16:47 UTC
> @Martin
> Yupp, reverting that m_hardwareClipping constraint would "fix" it as well,
> but i couldn't figure why it was required.
There must be a reason... I plan to spent some time tomorrow on investigating 
why I did it (don't remember) or how we can do it without breaking cube.
Comment 17 Thomas Lübking 2013-10-01 21:16:24 UTC
For the cube only:

diff --git a/kwin/effects/cube/cube.cpp b/kwin/effects/cube/cube.cpp
index 858356d..53e9f1d 100644
--- a/kwin/effects/cube/cube.cpp
+++ b/kwin/effects/cube/cube.cpp
@@ -1323,6 +1323,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
     GLShader *shader = NULL;
     QMatrix4x4 origMatrix;
     if (activated && cube_painting) {
+        region= infiniteRegion();
         shader = shaderManager->pushShader(ShaderManager::GenericShader);
         //kDebug(1212) << w->caption();
         float opacity = cubeOpacity;
Comment 18 Marcos de Brito Carvalho 2013-10-01 21:30:45 UTC
I thank you all for the help. Congratulations for kde, it's amazing. A doubt with correcting the effect of the window remains present on both sides of the cube will also be possible when we select the option: "The windows are on top of the cube"? I'm using Google translator, I'm from Brazil, I am grateful to all, I am a long time fan of KDE.

Original text in Portuguese:

Agradeço a todos pela ajuda. Parabens pelo kde, ele é incrível. Uma dúvida com a correção o efeito da janela ficar presente nas duas faces do cubo será possível também quando selecionarmos a opção: "As janelas passam por cima do cubo"  ?  Estou usando tradutor do Google, sou do Brasil, fico grato a todos, sou a muito tempo fan do KDE.
Comment 19 Thomas Lübking 2013-10-01 21:49:41 UTC
(In reply to comment #18)
> A doubt with correcting the effect of the window remains present on both sides of
> the cube will also be possible when we select the option: "The windows are
> on top of the cube"?
All variants will impact any mode of the cube effect.
Don't worry - you shall have it fixed with 4.11.3 ;-)
Comment 20 Marcos de Brito Carvalho 2013-10-01 22:53:05 UTC
Cool! Liked it! I'll be waiting kde version 4.11.3! Thank you, congratulations for the great work! I am a big fan of the cube effect, find who would one day move windows by cube from a virtual desktop and another? It would be really cool! Again congratulations for KDE, it is amazing.

Original text in Portuguese

Legal! Gostei! Estarei esperando a versão kde 4.11.3! Muito obrigado, parabêns pelo ótimo trabalho! Sou grande fan do efeito cubo, acham quem um dia seria movimentar as janelas pelo cubo, entre uma aréa de trabalho virtual e outra?  Seria muito legal! Mais uma vez parabens pelo KDE, ele é incrível.
Comment 21 Martin Flöser 2013-10-02 15:20:54 UTC
> --- Comment #10
> The issue will be the additon of "&& !(mask & PAINT_SCREEN_TRANSFORMED)" to
> the hardwareClipping which causes it to be false - and us running into the
> quad clipping branch.
> 
> The original condition for the branch was "region != infiniteRegion() &&
> (mask & PAINT_WINDOW_TRANSFORMED)"
> 
> Do you recall why you needed to disable hardware clipping here (or to be
> more precise: enable quad clipping)?
re-read the complete commit and I think I understand why I added it. It 
clipped when rendering the desktop thumbnail in the size of the window the 
thumbnail is rendered to. IIRC we cannot use infiniteRegion() as we want to 
clip to the boundaries of the window. We can also not use quad based clipping 
as we render the complete desktop, so the screen has transformed paint data 
and not each window.

-> ship it to the suggested change in Cube.
Comment 22 Thomas Lübking 2013-10-20 18:02:30 UTC
Git commit 2e63334bf942d45859c292ec89d3a53e48ac554e by Thomas Lübking.
Committed on 02/10/2013 at 19:36.
Pushed by luebking into branch 'KDE/4.11'.

Ensure to not clip windows when painting the cube
FIXED-IN: 4.11.3

M  +1    -0    kwin/effects/cube/cube.cpp

http://commits.kde.org/kde-workspace/2e63334bf942d45859c292ec89d3a53e48ac554e
Comment 23 Marcos de Brito Carvalho 2013-11-16 12:41:42 UTC
Created attachment 83595 [details]
Cubo bug kde 4.11.3

After upgrade to kde 4.11.3 cube still has some bugs, following images to analyze. I want to give congratulations to you guys for kde and kwin are amazing! Some posts on the forum I'm having difficulties to understand, I do not know speak English, I used google translator = (. Kde is great and so beautiful, thank you all for all the attention you've given me, and congratulations!
Comment 24 Thomas Lübking 2013-11-16 14:54:56 UTC
That's not really a bug (the wrapping code is explicitly disabled for this mode)

The problem here is that to transform the z axis on two faces implies to either stretch or move each window part.

It's easy to understand why: the window can now thought to be on a bigger cube, but the window has not grown itself.
Comment 25 Marcos de Brito Carvalho 2013-11-16 21:14:04 UTC
Oks, get it! Again congratulations for working with kde! he is amazing with really cool effects! Thank you!