QT Window Top/true transparent/background blur/non-rectangular/skip taskbar pager/Borderless/No focus click/focus penetration

Source: Internet
Author: User

QT Window Top/true transparent/background blur/non-rectangular/skip taskbar pager/Borderless/No focus click/focus penetration


window pinned
QT is Setwindowflags (qt::windowstaysontophint)
KDE is Kwindowsystem::setstate (WinId (), Net::keepabove)
Such a sticky window will not be above the full-screen window, if you need a real top, setwindowflags (qt::x11bypasswindowmanagerhint) can ignore this rule, but this will not appear on the taskbar, etc. kimtoy Pre-editing window is the real top.

True transparency

QT is SetAttribute (Qt::wa_translucentbackground, True)
True transparency requires the window manager to turn on compositing, otherwise the transparent area will appear black, which can be keyed to the black area with non-rectangles.


Background Blur

KDE extension Plasma::windoweffects::enableblurbehind (WinId (), True,/* Here is a parameter specifying the blur area */)
Background blur requires the window manager to turn on the blur effect, otherwise it is not valid. The KDE KWin has an extended logo that may not have a blur effect on other desktops.


Non-rectangular

QT is setmask (/* Here is a parameter to specify a non-rectangular area */)
There is no black area when the desktop is mixed, the shape of the complex is very resource-intensive, the use of non-transparent area as a shape will produce edge aliasing.


Skipping the taskbar page splitter
KDE is Kwindowsystem::setstate (WinId (), Net::skiptaskbar | Net::skippager)
Such a window is hidden and then displayed, if the Program other dialog box pops up, the original settings to skip the Taskbar pager window will be invalidated. The workaround is to implement Showevent (Qshowevent* event) to call again. The Kimtoy status bar window cannot skip the taskbar page after it pops up about the Kimtoy dialog box or the Settings dialog box, which is how krunner is resolved by this method.


No Border
QT is Setwindowflags (qt::framelesswindowhint)
In fact, as long as you can get the focus, CTRL+F3 open KWin menu can also restore the oh, such as Krunner, a lot of plasmiod.


No Focus click

QT is SetAttribute (Qt::wa_x11donotacceptfocus, True)
A no-focus click means using the mouse to manipulate the window without moving the focus of the keyboard input into the window. The Kimtoy status bar window is like this, the mouse can switch functions, but the input method of the various states is still the focus window instead of the Kimtoy status bar window, so that the real Dock can be achieved.


Focus Penetration
Unfortunately QT does not have this function to be used directly with X11shape's Xshapecombinerectangles (qx11info::d isplay (), WinId (), shapeinput, 0, 0, NULL, 0, Shapeset, yxbanded)

Focus penetration means that all mouse keyboard operations will penetrate the window to the bottom window. There is a qt::wa_transparentformouseevents that can be implemented on a child part, and the window itself is not. Kimtoy useless to this, but a lot of OSD Desktop lyrics program often used, online to find the next only GDK implementation, so the QT is written here.

This article was transferred from http://blog.csdn.net/outmanlee/article/details/7451097

QT Window Top/true transparent/background blur/non-rectangular/skip taskbar pager/Borderless/No focus click/focus penetration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.