Undecorated window loses native events - gtk

I use Decorated = false to make a frameless, borderless window with gtk#. This means adding my own drag logic and events for minimizing and closing the window, fine. However in Windows (at least), the window loses its native minimize/restore/close animations and I'm unable to minimize the window by clicking in the taskbar as you usually can.
Is there a way to have an undecorated window in gtk and still get the native minimize/restore animations or at least being able to minimize it from the taskbar?

I've experienced this as well. It is my understanding (maybe incorrect) that such features are a part of the windowing for the application. With it undecorated they simply don't exist in the taskbar. You might be able to create "Tasks" that are available when you right-click on the taskbar icon, but I have no experience with doing so. I believe those are technically called "JumpLists" or something like that.

Related

Widget sensitive/gray look change with window focus causes too much delay

I like to adjust or disable a feature of gtk3 (or gnome-shell?) because it causes a delay or at least need to remove the delay when bringing a window in/out of focus. My multi window application suffers from this delay:
I see is that all widgets like buttons, entries, etc. are set to in-sensitive/gray look at time the window they are contained is loosing focus and they return to normal when the window focus returns. I tried to turn off animations, but that does not disable this behavior.
My old program version based on gtk2 based does not have this feature (same gnome shell). So I conclude gtk3 is some how managing this.
I so far was not able to find out how to disable this.
This is part of the default (Adwaita) desktop theme, and as such you can't disable it for one application. Each window's widgets get the :backdrop CSS pseudo-class when it is not the active window, and the Adwaita theme styles them that way.
Your best bet is to pick another desktop theme.

Fix pgadmin SQL editor screen after resizing

This has happened to me a few times and it's annoying, whenever I take my laptop home my pgadmin editor stops working after resizing (I have more screens at work):
I have tried everything possible and the editor does not regain its correct shape and the "edit" area is impossible to get.
If you don't know the answer, do you have any suggestions for a good free SQL editor, now that we all know pgadmin is horrible...
Yes, it does get frustrating at times, especially when the monitor configurations are different at different places (say office vs home). So although one configuration works in office, when you take the laptop home, the Edit area is effectively missing, and the output window is at 100%.
You didn't mention the OS, but on windows I used to first Un-maximize the window, and then use to Right-Click on the Window (blue?) bar, that gave me the default MS Windows options (Move, Minimize, Maximize, Restore etc.). (These have been life-savers also when a window is completely out of the visible scope).
Once the menu is selected (nowadays using special keyboard combinations, i.e. a mouse isn't required), you could take the window further up and start to see a very small Query box open up. That way, you can now select the section divider and slide it down to reduce the Output Window size.
Painful, but worked most of the times.

Eclipse: Separate window for Console and Outline, which don't come up when main Window gets Focus

I'm using Eclipse Indigo Service Release 1 on two screens. I have the main window with editor and navigator on the main screen, while outline and console are in two separate windows on the second screen.
When I focus the main window, the two separate also come up. And this is the point: I want to focus the two separate windows manually, when I need them.
Is there a way to do this?
You can't do it with simple "detached" views like you're describing. But you can use Window > New Window to open a second Eclipse Workbench window, drag that to your second monitor, then configure it with whatever Views as you please. The two windows are focused independently (at least on OS X they are, I don't have Windows or Linux to test with).
No. Those are dependent palette windows, their focus is tied to the main window.
What you can do: Copy your perspective, close the two views in the copy and switch between the perspectives when you need or want to hide the separate views.
That's how I do it. Two perspectives, one compact when I need the second screen completely, one verbose when I concentrate on the code alone.

GTK window hints

I'm trying to get a window to cover the whole screen. Its positioning and dimensions is fine but it gets covered by the Gnome panel. To complicate things I have two monitors and this app needs to support people with multiple screens.
WINDOW_TYPE_HINT_SPLASHSCREEN is a good start. It covers both screens but not the panel. It's still there, just behind the panel.
WINDOW_TYPE_HINT_DOCK looked ideal but I need this window to take focus to listen to a keyboard event. _DOCK seems like it purposely ignores keyboard events (which kind of makes sense). Can I force it to take keyboard focus?
Is there some way I can force a hinted window to cover the panel?
There's window.fullscreen() which you can call on a normal "un-hinted" window. I assume this lets the window manager decide whether the window should cover the panel or not.
If you use the WINDOW_TYPE_HINT_MENU, you can give the focus to the window by calling the gtk_window_present() function.
However, I don't know if you will be able to cover the panel.
Another hint: the panel probably change its _NET_WM_STRUT property so that other windows cannot cover it. Maybe you will have to play with this property (or another) in your window.

Any tips on how to organize Eclipse environment on multiple monitors?

I can't find a good way of putting Eclipse windows on two monitors. Currently I just detached (clicked on a header and dragged) a few windows to a secondary monitor (package explorer, console, and outline) while leaving primary monitor with maximized source editing window.
It works pretty well except few annoying issues. Detached windows are not in focus while you are editing your code. Which means that, for example, last build shortcut (Alt-Shift-X, Q) doesn't work because it can't find build file (because package explorer is not in focus). Also "Selected resources" option in a file search menu is not picking up current package selection.
So I was wondering is detaching windows a right way to go? Do you have any better solutions so at least package explorer stays in focus?
Thanks.
PS. Btw "unable to find build" error started showing up only in 3.4 ver for some reason.
In the Eclipse Helios (currently 3.6.2) I found very useful the use of another window to bring up multiple documents in different screens.
in the main menu, go:
Window > New window,
and drag it to the screen you prefer. Double click in the filename on the editor and will maximize the editor's window.
I hope i helped.
Kyr.
PS: If you want to maintain both windows when you closing Eclipse, don't close them one by one. Instead go: File > Exit.
I use Ultramon to spread my Eclipse across two monitors.
I have the left hand side devoted to the code and the right hand side to the Project Explorer, Search, Console, Ant and Outline views.
This way I get focus to all of my Eclipse stuff when I click on it in the taskbar or alt-tab. I can also overlay another window (usually my browser or a trace viewer) on the right hand monitor. I use SemTop to pin the overlayed window if I want to code and read some reference at the same time (This is where shortcuts keys come in handy).
So I can look at code and StackOverflow at the same time ;)
Ultramon
I split the eclipse environment over two monitors (both running at 1600*1200)
on the left I have the main coding window maximised with the outline down the right hand side.
On the second monitor I have the Junit window, Problems, Console and the package explorer
I have the same layout duplicated for all the perspectives that I use.
I have never used the Alt-Shift-Q short cut but I have found the Alt-Shift-X, T shortcut for running junit works fine when I am focussed in the main coding window .
Possibly have the package explorer on the same monitor as the coding window?
I have a widescreen primary monitor and a non-widescreen secondary monitor. The layout on my primary monitor is broken into three columns: column 1 contains the package explorer in the top half and the outline, hierarchy and search results views in tabs on the lower half. Column two is code, and is about two and a half times wider than the other two columns. (Since everybody has widescreen monitors at my office, we've standardized on 100-character lines instead of 80.) The third column has the debug view at the top, somewhat small; the variables, expressions and JUnit views in tabs below that, taking most of the vertical space; and a small breakpoints view below that. My secondary monitor has two torn off windows: the console takes up most of the screen, and below it I have a smaller window containging the problems and history views in tabs.
My only gripe is when I remote desktop in from my single-monitor setup at home: the two windows on the secondary monitor move over to the primary one. I have a "One Screen" perspective which I use in this scenario to rectify that, but when I'm back at work and switch to the dual-monitor perspective, I have to manually move the windows back over to the other monitor. I wish Eclipse would just leave them over there, but I can't see any way to make it do that.
I have my Package Explorer and Code on my primary monitor and the Console on my secondary monitor. I do this by right clicking over console tab and selecting Move.. then View.
This way I am able to drag, drop and resize the console window.
Hope this helps!
I did this by extending my eclipse to both monitors, in windows you can make your screens extended by holding win key and tapping P,
Then, selecting my left monitor as the main one I dragged the right side of the eclipse window to cover the other screen all the way. then made eclipse into three columns. Now my main monitor is dedicated to code editor and console and package explorer are on the other one! when you have a whole monitor for your code it always helps to use cntrl+{ and have a second vertical column for viewing the same file, or dragging the tab of another file to the side of screen to view both in the same time.
Finally I just saved my work from window > save Perspective As
I can switch between my normal and dual monitor perspective whenever I'm not in the office
I've reduced (but not eliminated) the need for the package explorer to always be showing by using Ctrl+Shift+R in eclipse, this pops up a filter-as-you type window that makes switching between files which you remember the name of easy, as well as accepting wildcards to make it easy to find files you partially remember the name of.
I keep source on my main screen and outline tasks and LogCat (android) on my secondary screen, if I find i'm reading a lot of web content i fire up my laptop via synergy as an independent third screen, it's not ideal but it works.