window-management

Show window in Qt without stealing focus

£可爱£侵袭症+ 提交于 2019-12-17 22:18:08
问题 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? 回答1: It took me a while to find it but I found it: setAttribute(Qt::WA_ShowWithoutActivating); This forces the

Various issues using SetParent to embed window into external process [duplicate]

半腔热情 提交于 2019-12-08 09:32:04
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Embedding HWND into external process using SetParent I'm trying to embed a window from my process into the window of an external process using the SetParent function and have encountered a few problems that I'm hoping someone can help me out with. First off, here is an outline of what I am currently doing to embed my window into the application: WND myWindow; //Handle to my application window HWND externalWindow

How to set foreground Window from Powershell event subscriber action

有些话、适合烂在心里 提交于 2019-12-07 15:20:28
问题 I have a FileSystemWatcher instance running in the background of my PoSh session watching for changes to text files. A PoSh event subscriber is attached to this event and, when fired, it launches a console program by calling Start-Process . This program steals de focus from the current foreground window (my PoSh console). Calling SetForegroundWindow from the PoSh event subscriber to return the focus to my PoSh console doesn't work. SwitchToThisWindow does work most of the time , but according

reactivate exiting window using WindowManager

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 06:05:38
问题 I am using WPF with the currently latest and greatest version of Caliburn.Micro (1.4.1). I use IWindowManager.ShowWindow(...) to open an new modeless window: private void OpenOrReactivateInfoView() { if(this.infoViewModel == null) { this.infoViewModel = new InfoViewModel(); } this.windowManager.ShowWindow(this.infoViewModel); } Instead of opening a new window each time when OpenOrReactivateInfoView() is called, I would like to check whether the window ist still open and if it is, the existing

Various issues using SetParent to embed window into external process [duplicate]

佐手、 提交于 2019-12-06 15:14:57
This question already has answers here : Closed 7 years ago . Possible Duplicate: Embedding HWND into external process using SetParent I'm trying to embed a window from my process into the window of an external process using the SetParent function and have encountered a few problems that I'm hoping someone can help me out with. First off, here is an outline of what I am currently doing to embed my window into the application: WND myWindow; //Handle to my application window HWND externalWindow; //Handle to external application window SetParent(myWindow,externalWindow); //Remove WS_POPUP style

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

How does OS X load a storyboard based app, and how does it do window management?

て烟熏妆下的殇ゞ 提交于 2019-12-03 12:42:39
问题 I'm working on a brand new OS X app, and I've taken the daring route of working with a few technologies I haven't used much before. (I'm an iOS developer.) I'm using Storyboards, Swift, and Core Data in my app, all from the Xcode template. When my app starts, it creates an NSWindowController from a Storyboard. In another OS X app I made in Objective-C, I use the delegate method applicationShouldHandleReopen:hasVisibleWindows: to tell the window controller to bring up the window controller's

How does OS X load a storyboard based app, and how does it do window management?

点点圈 提交于 2019-12-03 03:46:08
I'm working on a brand new OS X app, and I've taken the daring route of working with a few technologies I haven't used much before. (I'm an iOS developer.) I'm using Storyboards, Swift, and Core Data in my app, all from the Xcode template. When my app starts, it creates an NSWindowController from a Storyboard. In another OS X app I made in Objective-C, I use the delegate method applicationShouldHandleReopen:hasVisibleWindows: to tell the window controller to bring up the window controller's window. I know that the language semantics remain the same in Swift, but Core Data and Storyboards leave

How do I bring a processes window to the foreground on OS X?

十年热恋 提交于 2019-12-02 01:45:56
问题 I have a simple shell/python script that opens up other windows. I'd like to bring the terminal where the script is running to the foreground when the script has finished. I know the process ID of my parent window. How can I bring a given window to the foreground? I imagine I have to find out the window name from the PID along the way. 回答1: Not sure if there's a proper way, but this works for me: osascript<<EOF tell application "System Events" set processList to every process whose unix id is

How do I bring a processes window to the foreground on OS X?

巧了我就是萌 提交于 2019-12-02 01:29:33
I have a simple shell/python script that opens up other windows. I'd like to bring the terminal where the script is running to the foreground when the script has finished. I know the process ID of my parent window. How can I bring a given window to the foreground? I imagine I have to find out the window name from the PID along the way. Not sure if there's a proper way, but this works for me: osascript<<EOF tell application "System Events" set processList to every process whose unix id is 350 repeat with proc in processList set the frontmost of proc to true end repeat end tell EOF You can do it