Skip to content

Commit

Permalink
'适配Windows编译'
Browse files Browse the repository at this point in the history
  • Loading branch information
打补丁的狮子 committed Dec 15, 2015
1 parent 74996fb commit a28b137
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion QQStars.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TARGET = QQStars
QT += widgets network webkit svg qml quick concurrent sql quick-private#widgets-private core-private gui-private
QT += webkitwidgets

LIBS += -lXext
linux:LIBS += -lXext

INCLUDEPATH += \
src \
Expand Down
2 changes: 2 additions & 0 deletions src/mywidgets/mywindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void MyWindow::setWindowActive(bool arg)

void MyWindow::setMousePenetrateArea(QRect rect)
{
#ifdef Q_OS_LINUX
XRectangle* myrect = new XRectangle;
myrect->x = rect.x();
myrect->y = rect.y();
Expand All @@ -166,6 +167,7 @@ void MyWindow::setMousePenetrateArea(QRect rect)
qDebug() << myrect->x << myrect->y << myrect->width << myrect->height;
XShapeCombineRectangles(QX11Info::display(), winId(), ShapeInput, 0,
0, myrect, 1, ShapeSet, YXBanded);
#endif
}

void MyWindow::focusInEvent(QFocusEvent *ev)
Expand Down

0 comments on commit a28b137

Please sign in to comment.