- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- XRaiseWindow XDoesntWork XAsExpected
Operating System - HP-UX
1752675
Members
5700
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2001 11:13 AM
03-19-2001 11:13 AM
XRaiseWindow XDoesntWork XAsExpected
Hello again,
This is a follow up to a closed thread on the subject of shell conltrol of X windows. My original post asked for a way to raise a window from a shell script and Mike Stroyan provided the correct method to do so as follows:
#!/usr/dt/bin/dtksh
XtInitialize TOPLEVEL raise Raise "$0" "$@"
XtDisplay DISPLAY $TOPLEVEL
if [ $# -gt 0 ]
then
for W in "$@"
do
XRaiseWindow $DISPLAY $W
done
else
XRaiseWindow $DISPLAY $WINDOWID
fi
XFlush $DISPLAY
This script performs perfectly and I end up with window from where the script was executed being raised. The problem now is that I also want to have the keyboard input focus set for that same window and I thought I had that solved but I was mistaken. I tried adding the following command to the script:
XRealizeWidget $TOPLEVEL
but it turned out not to work as I expected. Is there a dtksh built-in or another method that will do what I need??
Thanks in advance for your help,
Ken
This is a follow up to a closed thread on the subject of shell conltrol of X windows. My original post asked for a way to raise a window from a shell script and Mike Stroyan provided the correct method to do so as follows:
#!/usr/dt/bin/dtksh
XtInitialize TOPLEVEL raise Raise "$0" "$@"
XtDisplay DISPLAY $TOPLEVEL
if [ $# -gt 0 ]
then
for W in "$@"
do
XRaiseWindow $DISPLAY $W
done
else
XRaiseWindow $DISPLAY $WINDOWID
fi
XFlush $DISPLAY
This script performs perfectly and I end up with window from where the script was executed being raised. The problem now is that I also want to have the keyboard input focus set for that same window and I thought I had that solved but I was mistaken. I tried adding the following command to the script:
XRealizeWidget $TOPLEVEL
but it turned out not to work as I expected. Is there a dtksh built-in or another method that will do what I need??
Thanks in advance for your help,
Ken
Imagine if there were no hypothetical situations
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2001 12:40 PM
03-19-2001 12:40 PM
Re: XRaiseWindow XDoesntWork XAsExpected
The keyboard focus is affected by the window manager used and the settings of several window manager resources. If you are using dtwm with the default resource values keyboardFocusPolicy:explicit and startupKeyFocus:true, then you can cause focus to go to a window by unmapping and then popping up the window. There is no XUnmapWindow in dtksh, but you can do it with xwit.
xwit -unmap -id $WINDOWID
xwit -pop -id $WINDOWID
xwit -unmap -id $WINDOWID
xwit -pop -id $WINDOWID
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP