[Konsole-devel] Re: Review Request: Add option to blur transparent background (utilizing KWin's new blur support).

Eike Hein hein at kde.org
Thu Jan 27 15:19:02 UTC 2011



> On June 29, 2010, 4:07 a.m., Kurt Hindenburg wrote:
> > BUG 198175 - Fredrikh sent me a patch that enables the Blur w/o an option.  Did we decide if want an option to turn this off?
> > 
> > 
> > Index: MainWindow.cpp
> > ===================================================================
> > --- MainWindow.cpp	(revision 1143496)
> > +++ MainWindow.cpp	(working copy)
> > @@ -57,6 +57,12 @@
> >  #include "ViewManager.h"
> >  #include "ViewSplitter.h"
> >  
> > +#ifdef Q_WS_X11
> > +#include <QX11Info>
> > +#include <X11/Xlib.h>
> > +#include <X11/Xatom.h>
> > +#endif
> > +
> >  using namespace Konsole;
> >  
> >  static bool useTransparency()
> > @@ -76,6 +82,12 @@
> >      if (useTransparency()) {
> >          setAttribute(Qt::WA_TranslucentBackground);
> >          setAttribute(Qt::WA_NoSystemBackground, false);
> > +#ifdef Q_WS_X11
> > +        Atom net_wm_blur_region = XInternAtom(QX11Info::display(), "_KDE_NET_WM_BLUR_BEHIND_REGION", False);
> > +        unsigned long region[] = { 0 };
> > +        XChangeProperty(QX11Info::display(), winId(), net_wm_blur_region, XA_CARDINAL, 32, PropModeReplace,
> > +                        reinterpret_cast<const unsigned char*>(&region), 1);
> > +#endif
> >      }
> >  
> >      // create actions for menus
> > 
> >
> 
> Kurt Hindenburg wrote:
>     I don't have a system that Blur works so I can't verify it works.
> 
> Arno Rehn wrote:
>     There hasn't been a decision yet on whether it should be configurable or not. I'd still go for a configuration option - it would eliminate a possible use-case of konsole's transparency otherwise I think.
>     What do the other Konsole people think then?

That's not good enough.

Consider:
- Konsole offers a KPart component (a fact that is sadly often overlooked, looking at the long, long list of bugs it has).
- The blur region hint is a per-window resource.

That means:
- The terminal has to take care not to overwrite a blur region set by the hosting application (just as the hosting application has to take care not to overwrite the KPart's blur region) but rather add to and remove from it so the two can peacefully coexist.
- The size and placement of the terminal within the window can change at any time and the blur region has to be updated when this happens.


- Eike


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/4292/#review6315
-----------------------------------------------------------


On June 13, 2010, 1:57 p.m., Arno Rehn wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/4292/
> -----------------------------------------------------------
> 
> (Updated June 13, 2010, 1:57 p.m.)
> 
> 
> Review request for Konsole.
> 
> 
> Summary
> -------
> 
> This patch adds an option to Konsole's color scheme editor to enable blurring on transparent backgrounds. It makes use of the new _KDE_NET_WM_BLUR_BEHIND_REGION Atom recognized by KWin.
> When tabs are switched it checks whether the color scheme of the new tab has blurring enabled and enables or disables blurring accordingly.
> 
> I know we're in hard feature freeze and string freeze. But to not have this forgotten, I'll post it here now.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/apps/konsole/src/ColorScheme.h 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/ColorScheme.cpp 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/ColorSchemeEditor.h 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/ColorSchemeEditor.cpp 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/ColorSchemeEditor.ui 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.h 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.cpp 1137325 
>   /trunk/KDE/kdebase/apps/konsole/src/ViewManager.cpp 1137325 
> 
> Diff: http://svn.reviewboard.kde.org/r/4292/diff
> 
> 
> Testing
> -------
> 
> Tested by switching tabs back and forth, enabling and disabling blurring again and again. No crashes so far.
> 
> 
> Screenshots
> -----------
> 
> Konsole with enabled blurring
>   http://svn.reviewboard.kde.org/r/4292/s/430/
> 
> 
> Thanks,
> 
> Arno
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20110127/09c67a47/attachment.html>


More information about the konsole-devel mailing list