window-managers

How to prevent an X Window from receiving user input?

淺唱寂寞╮ 提交于 2019-12-02 03:44:10
问题 I would like to create some windows on a linux desktop for simple layout purposes. I need to avoid user input going to these windows (and I suppose avoiding the windows from gaining focus should suffice for that to happen). I think that I can do this with the xprop command, by setting the WM_HINTS property, but I haven't found specific documentation on how to do it. By the way, for an mplayer window, I can do this by using the option -input nodefault-bindings:conf=/dev/null . I simply need a

How to prevent an X Window from receiving user input?

元气小坏坏 提交于 2019-12-02 01:52:24
I would like to create some windows on a linux desktop for simple layout purposes. I need to avoid user input going to these windows (and I suppose avoiding the windows from gaining focus should suffice for that to happen). I think that I can do this with the xprop command, by setting the WM_HINTS property, but I haven't found specific documentation on how to do it. By the way, for an mplayer window, I can do this by using the option -input nodefault-bindings:conf=/dev/null . I simply need a general solution which I can enforce at a low level on any application's window. Thanks! A window

How to use Java to move Windows windows around on screen?

家住魔仙堡 提交于 2019-12-01 10:29:56
I've been contemplating making a window manager with a GUI, probably in Java. However, I'm struggling to figure out the best way to move windows not owned by my program. So far, it would seem I should use JNI to interface with the Windows API, but I haven't found any helpful examples. Does anyone know how to do this? Thanks! PS. I'm not necessarily tied to Java, if there is a better language to do this in. If the purpose is to have a fast window manager you are certainly better off with C++ or C#, or maybe even Delphi. But if you are most familiar with Java it can be done. If you choose the

How do I find a window at a certain point on the screen for screenshot/screen-recording purposes?

a 夏天 提交于 2019-12-01 09:43:15
问题 I'm looking for a way to do what the equivalent of WindowFromPoint and GetWindowRect do, in Carbon/Cocoa and X11. WindowFromPoint - http://msdn.microsoft.com/en-us/library/ms633558%28VS.85%29.aspx GetWindowRect - http://msdn.microsoft.com/en-us/library/ms633519%28VS.85%29.aspx 回答1: I am developing screenshot and screen recording apps … Use Quartz Window Services. I want to … determine the bounding rectangle of the window, and then use the coordinates of the window to capture a bitmap of that

How to use Java to move Windows windows around on screen?

…衆ロ難τιáo~ 提交于 2019-12-01 07:26:45
问题 I've been contemplating making a window manager with a GUI, probably in Java. However, I'm struggling to figure out the best way to move windows not owned by my program. So far, it would seem I should use JNI to interface with the Windows API, but I haven't found any helpful examples. Does anyone know how to do this? Thanks! PS. I'm not necessarily tied to Java, if there is a better language to do this in. 回答1: If the purpose is to have a fast window manager you are certainly better off with

Setting full screen brightness in an Android activity

 ̄綄美尐妖づ 提交于 2019-11-30 21:04:35
I'm using this method to set the screen to full brightness. @SuppressLint("NewApi") private void setFullBright() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { WindowManager.LayoutParams windowParams = getWindow().getAttributes(); windowParams.screenBrightness = 1.0f; getWindow().setAttributes(windowParams); } } If I want the full brightness to be set on the entire life of the Activity's screen, is the onCreate method the best place to call it? Is there an XML flag that can achieve this? Something like android:keepScreenOn="true" that mirrors the functionality of adding

Setting full screen brightness in an Android activity

倖福魔咒の 提交于 2019-11-30 17:29:43
问题 I'm using this method to set the screen to full brightness. @SuppressLint("NewApi") private void setFullBright() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { WindowManager.LayoutParams windowParams = getWindow().getAttributes(); windowParams.screenBrightness = 1.0f; getWindow().setAttributes(windowParams); } } If I want the full brightness to be set on the entire life of the Activity's screen, is the onCreate method the best place to call it? Is there an XML flag that can

Find the name of the X window manager

夙愿已清 提交于 2019-11-30 15:43:01
How do I find the name of the running X window window manager from a program? If I start another window manager when one is already running, then an error occurs, so there must be a way for the other window manager to detect the first one. How does it work? By the EWMH spec , a compliant window manager will set the _NET_SUPPORTING_WM_CHECK property on the root window to a window ID. If the _NET_SUPPORTING_WM_CHECK property exists and contains the ID of an existing window, then a ICCCM2.0-compliant window manager is running. If the property exists but does not contain the ID of an existing

How do I toggle 'always on top' for a QMainWindow in Qt without causing a flicker or a flash?

痴心易碎 提交于 2019-11-30 12:35:04
问题 void MainWindow::on_actionAlways_on_Top_triggered(bool checked) { Qt::WindowFlags flags = this->windowFlags(); if (checked) { this->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint); this->show(); } else { this->setWindowFlags(flags ^ (Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint)); this->show(); } } The above solution works but because setWindowFlags hides the window, it needs to be re-shown and of course that doesn't look very elegant. So how do I toggle

X11/Xlib: Window always on top

假装没事ソ 提交于 2019-11-30 10:24:13
A window should stay on top of all other windows. Is this somehow possible with plain x11/xlib? Googling for "Always on top" and "x11" / "xlib" didn't return anything useful. I'd avoid toolkits like GTK+, if somehow possible. I'm using Ubuntu with gnome desktop. In the window menu, there's an option "Always On Top". Is this provided by the X server or the window manager? If the second is the case, is there a general function that can be called for nearly any wm? Or how to do this in an "X11-generic" way? Edit: I implemented fizzer's answer, now having following code: XSelectInput(this->display