x11 simple-wm-hints

2024-08-22 12:08
文章标签 x11 simple wm hints

本文主要是介绍x11 simple-wm-hints,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

窗口的标识设置样例。

  1. 得到 icon 的图片
    /* load the given bitmap data and create an X pixmap contianing it. */icon_pixmap = XCreateBitmapFromData(display,win,icon_bitmap_bits,icon_bitmap_width,icon_bitmap_height);if (!icon_pixmap) {fprintf(stderr, "XCreateBitmapFromData - error creating pixmap\n");exit(1);}
  1. 初始化 标识 内存
    /* allocate a WM hints structure. */win_hints = XAllocWMHints();if (!win_hints) {fprintf(stderr, "XAllocWMHints - out of memory\n");exit(1);}/* initialize the structure appropriatly. *//* first, specify which size hints we want to fill in.  *//* in our case - setting the icon's pixmap, setting the *//* state hint as well as the icon position hint.        */win_hints->flags = IconPixmapHint | StateHint | IconPositionHint;/* next, specify the desired ihnts data.           *//* in our case - supply the icon's desired pixmap. *//* make the window's initial state be iconized,    *//* and set the icon position to the top-left part  *//* of the screen.                                  */win_hints->icon_pixmap = icon_pixmap;win_hints->initial_state = IconicState;win_hints->icon_x = 0;win_hints->icon_y = 0;
  1. 在窗口中设置窗口标识
    /* pass the hints to the window manager. */XSetWMHints(display, win, win_hints);
  1. 将标识的内存释放
    /* finally, we can free the WM hints structure. */XFree(win_hints);

这篇关于x11 simple-wm-hints的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1096226

相关文章

uva 10014 Simple calculations(数学推导)

直接按照题意来推导最后的结果就行了。 开始的时候只做到了第一个推导,第二次没有继续下去。 代码: #include<stdio.h>int main(){int T, n, i;double a, aa, sum, temp, ans;scanf("%d", &T);while(T--){scanf("%d", &n);scanf("%lf", &first);scanf

MFC 控件重绘(2) NM_CUSTOMDRAW, WM_DRAWITEM, 虚函数DrawItem

控件重绘有三种方法: 1 设定界面属性 2 利用Windows的消息机制,通过Windows消息映射(Message Mapping)和反映射(Message Reflecting),在合适的时机修改控件的状态和行为。此方式涉及NM_CUSTOMDRAW和WM_DRAWITEM 3 利用虚函数机制,重载虚函数。即DrawItem虚函数。 对于NM_CUSTOMDRAW,某些支持此消息的控件

linux下查看您当前是 Xorg(X11) 还是 Wayland方法

linux下查看您当前是 Xorg(X11) 还是 Wayland方法 方法如下(都是终端执行): echo $XDG_SESSION_TYPE 如果输出为wayland,则当前在 Wayland 环境中。 如果输出为x11,则当前在 X11 环境中。 或者 systemctl status display-manager 或者 loginctl show-session $(lo

使用django-simple-captcha遇到的坑

使用django-simple-captcha遇到的坑 一站点gongshare.com在做注册功能时验证码采用的django-simple-captcha,因为笔者开发环境采用的Windows 64bit系统,结果安装使用的时候接二连三遇到好几个坑。 django-simple-captcha需要依赖django1.3+、PIL1.1.7+或者Pillow2.0+,根据文档安装后开始使用时,

HYPERCASUAL - Simple Characters(卡通游戏火柴人物模型)

介绍HyperCasual - 简单角色! 一套低多边形角色资源,用于创建超休闲风格的游戏。 包含演示场景 角色(x10) 生化人、小丑、Flaty_Boss、女孩、守门员、英雄、亚马逊女战士、男人、红衣男人、修理工 每个网格大约有700-2000个顶点 角色设置与Mecanim兼容(本包中不包含动画) 着色器适用于可编写脚本的渲染管线(HD + LW) 下载:​​Unity资源商店链接资源

【HDU】4975 A simple Gaussian elimination problem. 网络流——行列建边

传送门:【HDU】4975 A simple Gaussian elimination problem. 题目分析:这题和某一场的多校的题目出奇的像啊!重要的是我一开始还以为不可能会出一样的题。。结果迟迟没写啊。。。后来觉得实在想不出什么对策了,虽然觉得给的是0~9很特殊,但是利用不起来,果断还是敲了网络流了。。首先建图很简单,源点向行建边,容量为行和,列向汇点建边,容量为列和,然后所有的

Splay树(区间更新)—— POJ 3468 A Simple Problem with Integers

对应POJ 题目:点击打开链接 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 72765 Accepted: 22465Case Time Limit: 2000MS Description You have N integers, A1

x11转发远程图形界面

1、 开一个有vnc的节点 2、 开放所有用户的Xserver权限 xhost + 3、X11转发 ssh hlzhang@192.168.3.156 -X 4、打开远程窗口 paraview 在227的界面打开156的图形窗口

大文件上传vue插件vue-simple-uploader

https://www.cnblogs.com/xiahj/p/vue-simple-uploader.html

SendMessage和 PostMessage; 使用PostMessage(WM_QUIT)退出程序时导致的内存泄漏问题

引言:我们要使用代码关闭程序的话,应该向窗口发送WM_CLOSE或者直接调DestroyWindow(HWND)函数   (默认情况下WM_CLOSE的消息响应就是调用DestroyWindow(HWND)   函数,所以我们直接调用也达到一样的效果).这样可以令操作系统回收窗口占用着的内存资源后再退出程序. 千万不要直接用PostMessage(WM_QUIT);令程序退出,这样程序是可以退出