start x11 application in specified workspace
来源:互联网 发布:网络打工一天一见钱 编辑:程序博客网 时间:2024/06/03 18:53
/**
* cc -o memo memo.c -lXm -lXt -lX11 -I/usr/X11R6/include/
-L/usr/X11R6/lib/
*/
#include <Xm/Xm.h>
#include <X11/X.h>
#include <Xm/Label.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <stdio.h>
void main(int argc, char **argv)
{
Widget shell, msg;
XtAppContext app;
XmString xmstr;
XClientMessageEvent xev;
Display *display;
shell = XtAppInitialize(&app, "Memo", NULL, 0, &argc, argv, NULL,
NULL, 0);
xmstr = XmStringCreateLtoR("move window test",
XmFONTLIST_DEFAULT_TAG);
msg =
XtVaCreateManagedWidget(
"message", xmLabelWidgetClass, shell, XmNlabelString, xmstr,
NULL);
XmStringFree(xmstr);
XtRealizeWidget(shell);
/* Now move the window to a different area */
display = XtDisplay(shell);
xev.type = ClientMessage;
xev.window = XtWindow(shell);
xev.message_type = XInternAtom(display, "_NET_WM_DESKTOP", False);
xev.format = 32;
/* Force into desktop 2 */
xev.data.l[0] = 2;
XSendEvent(
display,
RootWindowOfScreen(XtScreen(shell)),
False,
SubstructureNotifyMask|SubstructureRedirectMask,
(XEvent *) &xev);
XtAppMainLoop(app);
}
* cc -o memo memo.c -lXm -lXt -lX11 -I/usr/X11R6/include/
-L/usr/X11R6/lib/
*/
#include <Xm/Xm.h>
#include <X11/X.h>
#include <Xm/Label.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <stdio.h>
void main(int argc, char **argv)
{
Widget shell, msg;
XtAppContext app;
XmString xmstr;
XClientMessageEvent xev;
Display *display;
shell = XtAppInitialize(&app, "Memo", NULL, 0, &argc, argv, NULL,
NULL, 0);
xmstr = XmStringCreateLtoR("move window test",
XmFONTLIST_DEFAULT_TAG);
msg =
XtVaCreateManagedWidget(
"message", xmLabelWidgetClass, shell, XmNlabelString, xmstr,
NULL);
XmStringFree(xmstr);
XtRealizeWidget(shell);
/* Now move the window to a different area */
display = XtDisplay(shell);
xev.type = ClientMessage;
xev.window = XtWindow(shell);
xev.message_type = XInternAtom(display, "_NET_WM_DESKTOP", False);
xev.format = 32;
/* Force into desktop 2 */
xev.data.l[0] = 2;
XSendEvent(
display,
RootWindowOfScreen(XtScreen(shell)),
False,
SubstructureNotifyMask|SubstructureRedirectMask,
(XEvent *) &xev);
XtAppMainLoop(app);
}
0
上一篇:openvswitch rhel6 rpm build
下一篇:Makefile.am的patch reject问题
相关热门文章
- linux 常见服务端口
- 【ROOTFS搭建】busybox的httpd...
- 什么是shell
- linux socket的bug??
- linux的线程是否受到了保护?...
- 关于enqueue 的dump 文件帮看...
- tar --newer 05/12/2013 这个...
- 请教nginx代理tomcat作为子目...
- LDAP安装 bus error是什么问...
- select语句不修改sql,如何优...
给主人留下些什么吧!~~
评论热议
- start x11 application in specified workspace
- 遇到的问题-----No JREs in workspace compatible with specified execution environment: JavaSE-1.7,java
- No JREs in workspace compatible with specified execution environment: JavaSE-1.8,java
- Eclipse提示:No JREs in workspace compatible with specified execution environment
- Code Quick Start: Capturing diagnostics in your Windows Azure application
- start an application from notification bar in android
- 打开workspace时报错:could not launch the application because the associated workspace is currently in use
- use ssh and vnc to start X11
- The entitlements specified in your application’s Code Signing Entitlements file do not match those
- The entitlements specified in your application’s Code Signing Entitlements file do not match ...
- The entitlements specified in your application’s Code Signing Entitlements file do not match those s
- “The entitlements specified in your application’s Code Signing Entitlements file do not match those
- The entitlements specified in your application’s Code Signing Entitlements file do not match those s
- There was an internal api err.. & The entitlements specified in your application’s Code Signing...
- The entitlements specified in your application’s Code Signing Entitlements file do not match those s
- The entitlements specified in your application’s Code Signing Entitlements file do not match those s
- method to The entitlements specified in your application’s Code Signing Entitlements file do not mat
- The entitlements specified in your application’s Code Signing Entitlements file do not match those s
- rhel 6上查看hba的FC信息
- windbg调试kvm windows虚机
- how to enable kvm trace events
- grub启动windows xp配置
- openvswitch rhel6 rpm build
- start x11 application in specified workspace
- Makefile.am的patch reject问题
- mabatis源码解析之查询流程
- ubuntu编译usbip kernel mod安装包
- configure.ac checks: GOBJECT_INTROSPECTION_CHECK
- alsamixer设置
- RHEL半虚拟化网络性能问题
- ubuntu nautilus can not display smb://
- Using Open vSwitch with libvirt and QEMU/KVM
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
suv海马s5
海马m6报价
新海马s5
海马m5报价
全新海马s5
海马 s5
海马m6价格
海马 m6
海马2丘比特
海马suv s5
海马汽车suv
新款海马s7
海马新款s5
海马2报价
海马s5二手
海马汽车2
海马s5图
海马s5口碑
海马2两厢
海马s5好吗
海马 m3
海马s5贷款
海马323
海马s5评测
海马 suv
海马s5售价
海马 福美来
海马s5轮胎
海马m5汽车
海马s5图片
海马s7新款
海马m3团购
海马体照相馆
海马功效与作用
海马体照相馆价目表
海马田七炖老母鸡
海马体是什么
海马新车报价
海马汽车股吧
海马口碑为什么这么差
海马煲汤为什么要一对