S3D_MCP_FOCUS(3) s3d Manual S3D_MCP_FOCUS(3)NAME
s3d_mcp_focus - focus mcp object
SYNOPSIS
#include <s3d.h>
int s3d_mcp_focus(int object);
DESCRIPTION
This is an mcp-only function. It gives focus (for receiving key-strokes etc.) to an app referenced by it's mcp-object-id.
AUTHOR
Simon Wunderlich
Author of s3d
s3dS3D_MCP_FOCUS(3)
Check Out this Related Man Page
XSetInputFocus() XSetInputFocus()
Name
XSetInputFocus - set the keyboard focus window.
Synopsis
XSetInputFocus(display, focus, revert_to, time)
Display *display;
Window focus;
int revert_to;
Time time;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
focus Specifies the ID of the window you want to be the keyboard focus. Pass the window ID, PointerRoot, or None.
revert_to
Specifies which window the keyboard focus reverts to if the focus window becomes not viewable. Pass one of these constants:
RevertToParent, RevertToPointerRoot, or RevertToNone. Must not be a window ID.
time Specifies the time when the focus change should take place. Pass either a timestamp, expressed in milliseconds, or the constant
CurrentTime. Also returns the time of the focus change when CurrentTime is specified.
Description
XSetInputFocus() changes the keyboard focus and the last-focus-change time. The function has no effect if time is earlier than the current
last-focus-change time or later than the current X server time. Otherwise, the last-focus-change time is set to the specified time, with
CurrentTime replaced by the current X server time.
XSetInputFocus() generates FocusIn and FocusOut events if focus is different from the current focus.
XSetInputFocus() executes as follows, depending on what value you assign to the focus argument:
o If you assign None, all keyboard events are discarded until you set a new focus window. In this case, revert_to is ignored.
o If you assign a window ID, it becomes the main keyboard's focus window. If a generated keyboard event would normally be reported to
this window or one of its inferiors, the event is reported normally; otherwise, the event is reported to the focus window. The speci-
fied focus window must be viewable at the time of the request (else a BadMatch error). If the focus window later becomes not viewable,
the focus window will change to the revert_to argument.
o If you assign PointerRoot, the focus window is dynamically taken to be the root window of whatever screen the pointer is on at each key-
board event. In this case, revert_to is ignored. This is the default keyboard focus setting.
If the focus window later becomes not viewable, XSetInputFocus() evaluates the revert_to argument to determine the new focus window:
o If you assign RevertToParent, the focus reverts to the parent (or the closest viewable ancestor) automatically with a new revert_to
argument of RevertToName.
o If you assign RevertToPointerRoot or RevertToNone, the focus reverts to that value automatically. FocusIn and FocusOut events are gen-
erated when the focus reverts, but the last focus change time is not affected.
Errors
BadMatch focus window not viewable when XSetInputFocus() called.
BadValue
BadWindow
See Also
XQLength(), XAllowEvents(), XCheckIfEvent(), XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(),
XEventsQueued(), XGetInputFocus(), XGetMotionEvents(), XIfEvent(), XMaskEvent(), XNextEvent(), XPeekEvent(), XPeekIfEvent(), XPending(),
XPutBackEvent(), XSelectInput(), XSendEvent(), XSynchronize(), XWindowEvent().
Xlib - Input Handling XSetInputFocus()
I have a huge matrix file containing some 1.5 million rows and 6000 columns. The matrix looks something like this:
1 2 3
4 5 6
7 8 9
3 4 5
I want to add all the numbers in the columns of this matrix and display the result to my stdout. This means that the numbers in the first column are:
... (2 Replies)
Hi,
Just trying to get to grips with sed and awk for some reporting for work and I need some assistance:
I have a file that lists policy names on the first line and then on the second line whether the policy is active or not.
Policy Name: Policy1
Active: yes
Policy... (8 Replies)
version info :
vi availabe with RHEL 5.4
I have a text file with 10,000 lines. I want to copy lines from 5000th line to 7000th and redirect to a file. Any idea how I can do this?
Note:
The above scenario is just an example. In my actual requirement, the file has 14 million lines and I want... (9 Replies)
Hi everyone,
I know the following questions are noobish questions but I am asking them because I am confused about the basics of history behind UNIX and LINUX.
Ok onto business, my questions are-:
Was/Is UNIX ever an open source operating system ?
If UNIX was... (21 Replies)
Hello,
I couldn't find an actual introduction thread, so I decided to just put this here.
I go by d0wngrade online. I have been programming in multiple languages for about 15+ years. I started with standard web design languages like HTML and CSS, but I then advanced from design to development... (2 Replies)
Hi guys...
The first active code line in AudioScope.sh is set -u .
This causes a complete exit if a variable is used/found but has not been allocated at the start of the program.
However, apart from writing code to do the task, is there a switch to to check which variables have been... (17 Replies)
Hi.
In thread https://www.unix.com/shell-programming-and-scripting/267833-grouping-counting.html rovf and I had a mini-discussion on grep and awk.
Here is a demo script that compares the awk and grep approaches for this single problem:
#!/usr/bin/env bash
# @(#) s2 Demonstrate group... (1 Reply)
Hello,
I have to fish out some specific columns from a file based on the header value. I have the list of columns I need in a different file. I thought I could read in the list of headers I need,
# file with header names of required columns in required order
headers_file=$2
# read contents... (11 Replies)
For those interested in installing dash shell on OSX Lion to help test POSIX compliancy of shell scripts, it is quite easy. I did it like this:
If you don't have gcc on your system:
0. Download and install the Command Line Tools for Xcode package from Sign In - Apple *
1. Download the dash... (2 Replies)
Hello and thanks in advance for any help anyone can offer me
I'm trying to learn the find command and thought I was understanding it... Apparently I was wrong. I was doing compound searches and I started getting weird results with the -size test. I was trying to do a search on a 1G file owned by... (14 Replies)
I have data of an excel files as given below,
file1
org1_1 1 1 2.5 100
org1_2 1 2 5.5 98
org1_3 1 3 7.2 88
file2
org2_1 1 1 2.5 100
org2_2 1 2 5.5 56
org2_3 1 3 7.2 70
I have multiple excel files as above shown.
I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Dear All,
Taking a break from Vue.js coding for the site, SEO and YT videos; and hopefully addressing some well deserved criticism from some here that I have been too focused on the visual aspects of the forums versus the substance and the community....
While the "current generation... (9 Replies)
Hi all...
Well guys and gals, I jumped in at the deep end and found things that PERL cannot do by default.
Many tricky terminal escape codes are not catered for so I had to create workarounds.
One thing I searched for was this:
Passing perl variable to shell command
AND, @Neo this was... (15 Replies)