Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
void ChatDlg::doFlash(bool yes) { XWMHints *hints = XGetWMHints(qt_xdisplay(), this->winId()); if (yes) { if (!(hints->flags & UrgencyHint)) hints->flags |= UrgencyHint; } else { if (hints->flags & UrgencyHint) hints->flags &= ~UrgencyHint; } XSetWMHints(qt_xdisplay(), this->winId(), hints); XFree(hints); } |
This post has been edited 2 times, last edit by "myak" (Jun 23rd 2005, 4:35pm)
Source code |
|
1 2 |
NETWinInfo info( qt_xdisplay(), winId, qt_xrootwin(), 0 ); info.setState( NET::DemandsAttention ); |
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
Display *xdisplay = qt_xdisplay(); Window rootwin = qt_xrootwin(), winId = this->winId(); static Atom demandsAttention = XInternAtom(xdisplay, "_NET_WM_STATE_DEMANDS_ATTENTION", true); static Atom wmState = XInternAtom(xdisplay, "_NET_WM_STATE", true); XEvent e; e.xclient.type = ClientMessage; e.xclient.message_type = wmState; e.xclient.display = xdisplay; e.xclient.window = winId; e.xclient.format = 32; e.xclient.data.l[1] = demandsAttention; e.xclient.data.l[2] = 0l; e.xclient.data.l[3] = 0l; e.xclient.data.l[4] = 0l; if (yes) { e.xclient.data.l[0] = 1; } else { e.xclient.data.l[0] = 0; } XSendEvent(xdisplay, rootwin, False, (SubstructureRedirectMask | SubstructureNotifyMask), &e); |
Quoted
Originally posted by anda_skoa
As you need that on X11 and Windows, it would be nice if you could post both parts, maybe using #ifdef in one function, on qtforum in the tutorisl, tips&tricks section.
Quoted
Originally posted by anda_skoa
And/or on the Qt wiki.
Forum Software: Burning Board®, developed by WoltLab® GmbH
Linux Computer - Linux Forum -
Linux Computer und Notebooks - Lastminute - Wasserbetten & Whirlpools