The Linux mouse penetrates and cancels through the--linux small white, the great God ignores

Source: Internet
Author: User

I recently used QT to write a cross-platform software, because the settings are borderless, and I put a shadow on the program window myself, the shadow range is larger

So you have to add mouse penetration to the shadow area to have a better experience.

Check the Internet, use SetWindowLong under Windows.

I've found a way to search for Linux for a long time.

is xshapecombinerectangles (qx11info::d isplay (), WinId (), Shapeinput,

0, 0, NULL, 0, Shapeset, yxbanded); ( #include <X11/extensions/shape.h>required)
I tried it, and it worked, but the question came, how do I cancel it after setting it through?
This question I searched again for a long time, but this time not so fortunate, in Baidu and Google did not search for related issues
For me, this Linux little white is a bad thing.
But the time is not negative, try a night, finally to this function has a little understanding, cancel the mouse penetration method also tried out.
Let's share it with you.

Forwarding please specify the source (after the Rain Star):http://www.cnblogs.com/AfterTheRainOfStars/p/4030042.html

1 New  20; 3 0 ; 4 myrect->width = width (); 5 myrect->height = height (); 6 0 0, Myrect,1, shapeset,yxbanded);

The sixth parameter passed to the function is null when the mouse is set to pass through

View the definition of the function found that this parameter is of type xrectangle*

The following direct conclusion, when set mouse penetration, if this parameter is NULL, then the entire window will be penetrated

Then the seventh argument is that the control is set to Pierce and cancel through (Cancel to 1)

However, you must set the zone when you cancel the penetration. Otherwise the program will perform an error when the seventh parameter is set to 1

My previous misunderstanding is that after setting the seventh parameter after the program Flash, just one of the parameters can not move, the following has been experimental other parameters, but not all

Later, when I read a blog, brainwave tried to change the null of the sixth parameter to a Xrectangle* object, and then change the seventh parameter to 1 without a problem.

This is my problem-solving process, I hope to help everyone.

The Linux mouse penetrates and cancels through the--linux small white, the great God ignores

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.