当前位置: 首页 > news >正文

做公司英文网站房产信息查询官网

做公司英文网站,房产信息查询官网,公司建设网站需要固定ip吗,一学一做专题网站X11是Linux发行系统中广泛采用的显示协议,各个系统基本上都支持XLib库,作为底层接口,XReparentWindow接口的功能就是重新设置父窗口,注意这个可以跨进程设置父窗口,例如将已经运行的进程的父窗口设置自己的程序Wid&…

        X11是Linux发行系统中广泛采用的显示协议,各个系统基本上都支持XLib库,作为底层接口,XReparentWindow接口的功能就是重新设置父窗口,注意这个可以跨进程设置父窗口,例如将已经运行的进程的父窗口设置自己的程序Wid,即可将第三方进程嵌入到自己的程序窗口中,自己用这个接口写了一段代码,在UOS上运行的正常,后面跑在Kylin 4.0.2和V10上,程序出现了一些难以琢磨的情况,嵌入的程序无法focus,查阅到qt的container容器可以完成这个功能,查阅了qt4和qt5的源码,发先程序嵌入确实不是简简单单的XReparentWindow调用,后续还涉及到各种消息转发操作,后续学习。

bool QX11EmbedContainer::eventFilter(QObject *o, QEvent *event)
{Q_D(QX11EmbedContainer);switch (event->type()) {case QEvent::KeyPress:// Forward any keypresses to our client.if (o == this && d->client) {lastKeyEvent.window = d->client;XSendEvent(x11Info().display(), d->client, false, KeyPressMask, (XEvent *) &lastKeyEvent);return true;}break;case QEvent::KeyRelease:// Forward any keyreleases to our client.if (o == this && d->client) {lastKeyEvent.window = d->client;XSendEvent(x11Info().display(), d->client, false, KeyReleaseMask, (XEvent *) &lastKeyEvent);return true;}break;case QEvent::WindowActivate:// When our container window is activated, we pass the// activation message on to our client. Note that X input// focus is set to our focus proxy. We want to intercept all// keypresses.if (o == window() && d->client) {if (d->clientIsXEmbed) {sendXEmbedMessage(d->client, x11Info().display(), XEMBED_WINDOW_ACTIVATE);} else {d->checkGrab();if (hasFocus())XSetInputFocus(x11Info().display(), d->client, XRevertToParent, x11Time());}if (!d->isEmbedded())d->moveInputToProxy();}break;case QEvent::WindowDeactivate:// When our container window is deactivated, we pass the// deactivation message to our client.if (o == window() && d->client) {if (d->clientIsXEmbed)sendXEmbedMessage(d->client, x11Info().display(), XEMBED_WINDOW_DEACTIVATE);elsed->checkGrab();}break;case QEvent::FocusIn:// When receiving FocusIn events generated by Tab or Backtab,// we pass focus on to our client. Any mouse activity is sent// directly to the client, and it will ask us for focus with// XEMBED_REQUEST_FOCUS.if (o == this && d->client) {if (!d->isEmbedded())d->activeContainer = this;if (d->clientIsXEmbed) {if (!d->isEmbedded())d->moveInputToProxy();QFocusEvent *fe = (QFocusEvent *)event;switch (fe->reason()) {case Qt::TabFocusReason:sendXEmbedMessage(d->client, x11Info().display(), XEMBED_FOCUS_IN, XEMBED_FOCUS_FIRST);break;case Qt::BacktabFocusReason:sendXEmbedMessage(d->client, x11Info().display(), XEMBED_FOCUS_IN, XEMBED_FOCUS_LAST);break;default:sendXEmbedMessage(d->client, x11Info().display(), XEMBED_FOCUS_IN, XEMBED_FOCUS_CURRENT);break;}} else {d->checkGrab();XSetInputFocus(x11Info().display(), d->client, XRevertToParent, x11Time());}}break;case QEvent::FocusOut: {// When receiving a FocusOut, we ask our client to remove its// focus.if (o == this && d->client) {if (!d->isEmbedded()) {d->activeContainer = 0;if (isActiveWindow())d->moveInputToProxy();}if (d->clientIsXEmbed) {QFocusEvent *fe = (QFocusEvent *)event;if (o == this && d->client && fe->reason() != Qt::ActiveWindowFocusReason)sendXEmbedMessage(d->client, x11Info().display(), XEMBED_FOCUS_OUT);} else {d->checkGrab();}}}break;case QEvent::Close: {if (o == this && d->client) {// Unmap the client and reparent it to the root window.// Wait until the messages have been processed. Then ask// the window manager to delete the window.XUnmapWindow(x11Info().display(), d->client);XReparentWindow(x11Info().display(), d->client, x11Info().appRootWindow(x11Info().screen()), 0, 0);XSync(x11Info().display(), false);XEvent ev;memset(&ev, 0, sizeof(ev));ev.xclient.type = ClientMessage;ev.xclient.window = d->client;ev.xclient.message_type = ATOM(WM_PROTOCOLS);ev.xclient.format = 32;ev.xclient.data.s[0] = ATOM(WM_DELETE_WINDOW);XSendEvent(x11Info().display(), d->client, false, NoEventMask, &ev);XFlush(x11Info().display());d->client = 0;d->clientIsXEmbed = false;d->wmMinimumSizeHint = QSize();updateGeometry();setEnabled(false);update();emit clientClosed();}}default:break;}return QWidget::eventFilter(o, event);
}

        麒麟系统和WPS软件,qt4的QXEmbedContainer和qt5 createContainer嵌入wps时显示空白,慢慢研究解决方案去。

http://www.yayakq.cn/news/847418/

相关文章:

  • 重庆做营销网站建设做网站的是什么软件
  • 阿里云创建网站手机网站作用
  • 昆山市网站建设人力资源公司怎么找客户
  • 漳州市建设局网站混凝土公示企业信息年报系统
  • 雅安网站制作管理咨询公司名字大全
  • wordpress 网站积分打赏dede仿站
  • 企业网站会员功能贵阳网站建设三思网络
  • 徐州app定制页面关键词优化
  • 自己创建的网站怎么做流量3. 是网站建设的重点
  • 外贸网站架构娄星区建设局网站
  • 建设隔离变压器移动网站哪个网站做婚礼邀请函好
  • 扬州网站建设文章网站建设岗位能力
  • 山西省城乡住房和建设厅网站html5 响应式网站
  • 做推广用那个网站吗苏州市建设局网站地址
  • 网站优化原理域名到期换个公司做网站
  • 山东做网站三五wordpress 离线更新
  • 个人网站 icp上海seo有哪些公司
  • 南沙做网站织梦做的网站怎样
  • 专业门户网站的规划与建设工作中如何调节自己的情绪
  • 自己做的视频网站如何赚钱网站建设对旅游意义
  • 郑州建设网站报价wordpress 旅行主题
  • 网站开发公司按时交付网站tkd优化
  • 在公司网站投简历该怎么做架设网站 自己购买服务器
  • 北京保障房建设项目网站网站栏目结构包括哪些
  • 网站建设渠道wordpress电子商城模板
  • 顺德营销型网站重庆营销网站建设平台
  • 墙绘网站建设南宁模板建站平台
  • 做网站的成功案例西安长安区建设局网站
  • 手机建设中网站首页张家港保税区建设局网站
  • dede网站维护暂时关闭青岛代理记账公司