Show/Hide window from process handle on Mono - linux

I am writing an application in VB.Net to be run on Mono.
I can close a window from a process like so:
Dim procs = System.Diagnostics.Process.GetProcessesByName("Firefox")
procs(0).CloseMainWindow()
However I want to be able to show/hide this window as well, but I have to do so in a way that is compatible with Mono running on linux, so the common way I have seen of doing so through P/Invoke will not work
Is there a way to do this? Thanks.

Related

How to bring an application to the front with picoe/Eto on Mac OSX?

I want to minimize the main window of a C#/Eto app and switch to another program. But when a timer in the Eto app fires it opens a new window, which I want to see. It should be displayed on top of all other windows currently open. The focus may switch to that window, but it's ok if not.
Using BringToFront() of the Form class does not work.
What else could I do?
Due to the way Apple made OS X, you are unable to make a window go to the top with programming. On Windows it is different.
Good luck!

touch events in linux using Qt

I am trying to program touch events in linux using Qt. My touch screen works, however when I touch the screen I get mouse events rather than touch events. The mouse cursor moves to where I touch the screen. I don't know if it is a Qt problem or something that happens at the OS level.
I am using Qt 5.4.0 on Debian Jessie.
Since you did not share any source code, its hard to know what happens wrong on your side. Take a look at this documentation:
Detailed Description of QTouchEvent Class
Touch Input Examples
All that examples works well, and you need to test it on your side. If it will not work for you, it means that there are some problems on your side, otherwise, it mean that you forgot something in your application (like Qt::WA_AcceptTouchEvents attribute set, or not set to true the acceptTouchEvents attribute at graphics items...).

Tool to identify items in Qt interface

I'm trying to automate Skype on Ubuntu using LDTP which has a GUI that is written with Qt. LDTP requires that I know the names of the frames I'm interacting with and their objects. I don't have the Skype source code, but I was hoping there was some tool that might exist for extracting information about a Qt window or that it might at least confirm for me that automation is impossible for the window I'm trying to play with.
The reason I think this exists in the first place is that AutoIT had a similar application on Windows.
To find out if a window is able to be automated using LDTP, you can use the getapplist() and getwindowlist() functions as shown in the tutorial which can be found under doc on the github. To list the objects of this window, you can use getobjectlist().

How to create a mapped but not visible window with XLib?

I'm working on a I/O verification tool based on Linux in a game project. It is written in C++, and,since using the same I/O module as our game, it's based on OIS 1.2. Thus, though all I need is to print users' inputs on the console, I still need to create a window for OIS.
So here comes my question: How can I create a mapped window while it is still invisible and processes keyboard events?
I can't unmapped the window in that it won't process any keyboard event anymore. I also can't find function for show/hide a window.(maybe I search through a wrong diretion...)
My little tool works fine now except there is a stupid top-level empty window which needs to be focused for processing keyboard events...
Any advise is welcomed.
Thanks!!!
After reading this post: Linux/X11 input library without creating a window,
I realized my problem was that I misunderstood the philosophy of X11. All I need to do is simply pass the root window handle to OIS, and set the x11_grabkeyboard flag as true. The only drawback is maybe I can hardly debug my program with gdb since the keyboard is grabbed...
Though my situation is solved, there is one thing left.
Every article I read said an InputOnly window won't be visible and is capable for handling input events, while my InputOnly window is absolutely visible after mapped...
Maybe it's my Linux, or again, a misunderstanding...

How to change focus in X-Windows?

I am working on old Motif-based application for Linux. I want to be able to programmatically change the active window of our application. I can redirect the input by using XSetInputFocus() function and the keyboard input start to go there, but XReconfigureWMWindow() and XRaiseWindow() functions just don't work.
I've read that Window Managers try to stop this behaviour, so tried to disable configure redirection, but this doesn't work either. Any ideas how to make one of my own windows on top of the window stack?
There is a tiny program called wmctrl available (at least in Debian/Ubuntu it is in standard distribution) which is able to perform many operations on windows and desktops, and handles plenty of window managers. I'd suggest testing whether it works in your environment, and if so, peeking at its sources.
You may find the answer to this is dependent on the Window Manager the user is using, or even what settings they've given to the Window Manager. I like to set my Window Managers to do "focus follows mouse", which means you can't send the focus to a window that I haven't put my mouse on, unless you also warp the mouse there (is that function called XWarpMouse?).

Resources