LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-19-2014, 05:34 PM   #1
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Rep: Reputation: Disabled
Question Switch windows from script without setting _NET_WM_STATE_DEMANDS_ATTENTION


I'm trying to write a script to help me switch between windows. I have tried wmctrl, and xdotool. Both successfully switches between windows. But the window I switch away from starts blinking in the taskbar. Even worse, when a windows has started blinking, it is automatically shown on all desktops.

I've tracked it down to the ewmh hint _NET_WM_STATE_DEMANDS_ATTENTION. The window starts blinking because this hint is set. I have tried to disable it by saving the active window at the beginning of the script and then running:
Code:
wmctrl -i -r $active_window -b remove,demands_attention
at the end.

This works most of the time, but not always. Is there any way to switch windows without ever activating this hint.

Alternatively, is there any way to make kde (im running 4.10.5) ignore this hint. By that I mean don't blink the window in the taskbar, and dont make the window appear on all desktops.

Thanks.
 
Old 06-22-2014, 08:29 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I'm not sure that this is current information or how much (if any of it) is implemented in the current iteration of KDE however there are a couple of atom level controls grouped with _NET_WM_STATE_DEMANDS_ATTENTION under "freedesktop.org standards" that might be useful
Quote:
_NET_WM_STATE_SKIP_TASKBAR, ATOM
_NET_WM_STATE_SKIP_PAGER, ATOM
 
Old 06-30-2014, 10:19 AM   #3
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
KDE has a very cool javascript scripting API. If you cannot solve your problem with DE-agnostic methods, you could use that:

http://techbase.kde.org/Development/...ipting/API_4.9

If you have your to-be-activated window in the variable "client", you can activate it with

Code:
workspace.activeClient = client;
This will activate the window, switch desktop if it is on another desktop, but not set the "seeks attention"-state.
 
  


Reply

Tags
kde4.10.5, wmctrl, x11


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble setting up VLAN between linux and L3 switch nicolasdiogo Linux - Networking 3 04-16-2013 03:04 PM
[SOLVED] Duplex setting of switch port rahul_dubeyin Programming 8 06-03-2011 04:41 AM
Setting Default State for Wireless RF Switch Lokdonan Slackware 2 10-17-2009 12:58 PM
Setting up vLAN Switch kool_kid Linux - Networking 8 02-28-2008 02:37 PM
Problems with setting up 3com switch on RH 9.0 Dunedain Linux - Networking 23 01-28-2004 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration