window-managers

How to monitor applications being open or launch in linux/tcl/python?

a 夏天 提交于 2019-12-06 15:02:06
I am trying to build a panel application, alike avant window navigator or ubuntu unity. My question is once I build the panel with the predifined applications, how I can add items to the panel when applications are open or launch? Here is my source code in tcl: package require Tk set items {xterm gvim firefox} wm withdraw . toplevel .panel wm attributes .panel -topmost 1 ; # on top bind .panel <Escape> {exit} wm geometry .panel +0+0 wm overrideredirect .panel yes ; # remove window decorations set counter 0 foreach item $items { incr counter set separator " " label .panel.$counter -text "$item

Opening sockets to the Xserver directly

江枫思渺然 提交于 2019-12-06 13:38:08
I'm looking to understand how Linux Desktop Environments work with Xserver. I was reading that most window managers don't open sockets directly, instead they use either Xlib bindings for which ever language the WM is being written or you can use higher level bindings XCB; but i would like to know What are the advantages to opening a socket directly to the Xserver? The question should rather be "What are the advantages of using Xlib instead of a graphical toolkit like gtk"? Even to master Xlib, you have to spent months or years! It's so intricate that almost every app that has graphical content

Remove border from fullscreen floating windows only (XMonad configuration)

北慕城南 提交于 2019-12-05 15:57:07
问题 I would like to remove borders (only) from floating windows covering the full screen (like mplayer), and use a different border color (normalBorderColor) when there is only one window in a workspace. Currently, I am using smartBorders from XMonad.Layout.NoBorders to remove the border from mplayer, and to remove the border of a window when that window is the only window in a workspace. However, when I switch between two workspaces which both have a single non-floating window (regardless of

requestFocus() returning false

一曲冷凌霜 提交于 2019-12-05 11:55:08
I am inflating a view when a button is pressed. The inflated view is like a dialog box, however when I try to get focus on the dialog box with requestFocus() , requestFocus() returns false means I am not getting focus on the view, but when I manually tap the inflated view, it recieves focus. What am I doing wrong? I clear focus from the button (which is used to inflated the new view) before I call requestFocus on inflated view. Regards A possible reason why the View.requestFocus() method returns false (does not successfully request focus) is because of the following reason: "A view will not

Mono winforms app fullscreen in Ubuntu?

蓝咒 提交于 2019-12-04 10:35:41
问题 Just wondering if there's a known way of getting a Mono System.Windows.Forms application to go fullscreen on Ubuntu/Gnome. Mono is 2.4.2.3 Ubuntu is 9.10 Doing it on Windows requires a pinvoke, clearly not going to work here. This is what I get setting window border to none, window position to centre, and state to maximised: alt text http://dl.dropbox.com/u/116092/misc/permalink/joggler/screenshot01.png Update. Have also tried: this.StartPosition = System.Windows.Forms.FormStartPosition

Why does resuming an activity in android cause BadTokenException?

做~自己de王妃 提交于 2019-12-04 10:21:16
问题 Folks - Can anyone explain this stack? Note that my code is nowhere on it. If you Google for any of these exceptions, everyone who has experiencing this issue was trying to create dialogs after an activity was terminated, which doesn't seem to be the case here. It's just a simple activity resume. I am seeing this exception reported from clients in the field quite frequently and would like to correct it if possible. android.view.WindowManager$BadTokenException: Unable to add window -- token

Discover what window is active on Gnome/Linux/Ubuntu from Python?

…衆ロ難τιáo~ 提交于 2019-12-03 09:12:23
Is there any way to get a list of all windows that are open at present and see what window is at the top (i.e. active?) from Python? This is using Gnome on Ubuntu Linux. wnck looks like it might do this, but it's very lacking in documentation. Josh Lee import wnck screen = wnck.screen_get_default() window_list = screen.get_windows() active_window = screen.get_active_window() See also Get active window title in X , and WnckScreen in the documentation. Other questions containing wnck have useful code samples. Here's the same code using the modern GObject Introspection libraries instead of the

How do I stop/workaround Java apps stealing focus in Linux window managers

狂风中的少年 提交于 2019-12-03 06:23:58
We want to quickly prototype widgets in Java. We overlay them on top of a display written in a proprietary 3rd party graphics package. We find that the Java GUI steals keyboard focus away from the window manager. The window manager is fvwm, I've tried configuring it so the Java app is setup not to get focus, and furthermore if it ever does get focus to take it away and give it to the other GUI. If I run this with the Java app it doesn't work (whenever the mouse is over the Java GUI it has keyboard focus)- if I swap some standard X GUI widget (XEyes) in place of the Java GUI it works like a

Mono winforms app fullscreen in Ubuntu?

℡╲_俬逩灬. 提交于 2019-12-03 06:13:13
Just wondering if there's a known way of getting a Mono System.Windows.Forms application to go fullscreen on Ubuntu/Gnome. Mono is 2.4.2.3 Ubuntu is 9.10 Doing it on Windows requires a pinvoke, clearly not going to work here. This is what I get setting window border to none, window position to centre, and state to maximised: alt text http://dl.dropbox.com/u/116092/misc/permalink/joggler/screenshot01.png Update. Have also tried: this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; CTRL-F11 Text = string

How to programmatically switch to a specific window in compiz?

本小妞迷上赌 提交于 2019-12-03 04:57:35
问题 Is there a command to tell compiz that we want to bring in front and set focus to a specific window? How should we identify the window in that command? The reason behind this question is the following use-case: Suppose we have a wiki to keep notes of anything interesting we find out. It would be very convenient to have a keyboard shortcut to bring the browser window with our Wiki page in front and start typing immediately then with another key combination switch to the application we were