window-management

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 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

How do I get a list of all windows on my gnome2 desktop using pygtk?

核能气质少年 提交于 2019-11-30 20:58:20
I'm a bit confused with some gtk and gnome concepts. I'm trying to get list of non minimized windows on my gnome2 desktop, but after reading the pygtk documentation and inspecting the results, I can't understand the results. Neither of the two snippets below appears to work. First I tried this.. >>> gtk.gdk.window_get_toplevels() [<gtk.gdk.Window object at 0xb74339b4 (GdkWindow at 0x8a4c170)>] >>> gtk.gdk.window_get_toplevels()[0].get_children() [] then this >>> d = gtk.gdk.DisplayManager() >>> d.get_default_display().get_screen(0).get_root_window().get_children() [<gtk.gdk.Window object at

Creating a window manager for Linux

南笙酒味 提交于 2019-11-29 20:42:52
I want to create a simple stacking window manager (in C ) for private use, mainly for the purpose of learning and challenging myself. I've looked through twm 's source code which has relatively few bells and whistles but it seems very low level since it's not based on a widget toolkit. 1 Would using a toolkit such as GTK+ be preferable? I'm afraid that some of the code and libraries in twm might be too antiquated ( edit: deprecated) and I want the window manager to use relatively modern libraries. For the sake of understanding I would also be interested in suggestions how to start a window

How to get list opened windows in PyGTK or GTK in Ubuntu?

偶尔善良 提交于 2019-11-29 14:21:03
问题 How to get list opened windows in PyGTK or GTK or other programming language? in Ubuntu? edit: i want get list paths opened directories on desktop! 回答1: You probably want to use libwnck: http://library.gnome.org/devel/libwnck/stable/ I believe there are python bindings in python-gnome or some similar package. Once you have the GTK+ mainloop running, you can do the following: import wnck window_list = wnck.screen_get_default().get_windows() Some interesting methods on a window from that list

Turtle graphics - How do I control when the window closes?

試著忘記壹切 提交于 2019-11-28 19:13:30
I have a small python script which draws some turtle graphics. When my script has finished running, the turtle screen automatically closes, so to be able to see the graphics for a while I have to use time.sleep(5) at the end of the script to delay the closing. Is there any way I can make this more dynamic, i.e. tell python that I want to control the closing of the window myself? I don't mind if the script can't do anything else while waiting for my command, but I'd prefer if I didn't have to go to the console for a read() or something. Ideally, the canvas should stay open even after the script

Show window in Qt without stealing focus

放肆的年华 提交于 2019-11-28 18:12:19
I'm using the Qt library to show a slideshow on the second monitor when the user isn't using the second monitor. An example is the user playing a game in the first monitor and showing the slideshow in the second monitor. The problem is that when I open a new window in Qt, it automatically steals the focus from the previous application. Is there any way to prevent this from happening? dutchmega It took me a while to find it but I found it: setAttribute(Qt::WA_ShowWithoutActivating); This forces the window not to activate. Even with the Qt::WindowStaysOnTopHint flag If you want to make floating

Accessing dock icon right-click menu items with AppleScript

早过忘川 提交于 2019-11-27 22:23:48
问题 Is there any way to get an AppleScript to access the menu items that come up when you right click on a dock icon? Specifically, here's what I want to do: I use Google Chrome as my web browser on MacOS X Snow Leopard. I am a keyboard shortcut addict, and I use QuickSilver to create keyboard shortcuts for anything I can. One of the most common things that I do is to open a new web browser window. But I use Spaces frequently to partition my tasks that I am currently working on, and when I open a

Inhibit Matlab Window Focus Stealing

£可爱£侵袭症+ 提交于 2019-11-27 18:41:59
Is there a way to tell Matlab not to steal window focus (from an external editor) such as Emacs) upon graphical commands such as figure and plot . This would increase my productivity a lot because I often want to continue code development during data (re-)processing. It is possible, the trick is to not use the figure statement, but to change the current figure directly. This will change the active plot without changing the focus. Typically I do something like this: function change_current_figure(h) set(0,'CurrentFigure',h) Then, all of the figure(h) statements need to be changed to change

Turtle graphics - How do I control when the window closes?

末鹿安然 提交于 2019-11-27 12:01:09
问题 I have a small python script which draws some turtle graphics. When my script has finished running, the turtle screen automatically closes, so to be able to see the graphics for a while I have to use time.sleep(5) at the end of the script to delay the closing. Is there any way I can make this more dynamic, i.e. tell python that I want to control the closing of the window myself? I don't mind if the script can't do anything else while waiting for my command, but I'd prefer if I didn't have to