window-managers

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

我怕爱的太早我们不能终老 提交于 2019-11-30 03:06:00
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 "always on top" for a QMainWindow without that "flashing" side effect? Nokia says no : It is not possible to

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

Building a Window Manager [closed]

╄→尐↘猪︶ㄣ 提交于 2019-11-29 18:47:37
One of my new home projects will be a simple Window Manager, but before start I need to know some things: Which is the best language to do this? Where to get some resources to learn? One important decision is how you're going to talk to the X server. You can use the Xlib bindings for your language of choice, or you can use the higher-level XCB bindings. (If you're insane , you might open a socket to the X server directly.) To know how a window manager ought to behave, there are two documents that specify the conventions and policies: EWMH and ICCCM 1 . Conforming to these means your window

X11/Xlib: Window always on top

我怕爱的太早我们不能终老 提交于 2019-11-29 15:28:50
问题 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

Building a Window Manager [closed]

大憨熊 提交于 2019-11-28 13:40:16
问题 One of my new home projects will be a simple Window Manager, but before start I need to know some things: Which is the best language to do this? Where to get some resources to learn? 回答1: One important decision is how you're going to talk to the X server. You can use the Xlib bindings for your language of choice, or you can use the higher-level XCB bindings. (If you're insane, you might open a socket to the X server directly.) To know how a window manager ought to behave, there are two

Xlib How Does This (Removing Window Decoration) Work?

喜欢而已 提交于 2019-11-28 11:13:32
How does the following code remove window borders? //note the struct is declared elsewhere, is here just for clarity. //code is from [http://tonyobryan.com/index.php?article=9][1] typedef struct Hints { unsigned long flags; unsigned long functions; unsigned long decorations; long inputMode; unsigned long status; } Hints; //code to remove decoration Hints hints; Atom property; hints.flags = 2; hints.decorations = 0; property = XInternAtom(display, "_MOTIF_WM_HINTS", true); XChangeProperty(display,window,property,property,32,PropModeReplace,(unsigned char *)&hints,5); XMapWindow(display, window)

How do I properly implement a “minimize to tray” function in Qt?

帅比萌擦擦* 提交于 2019-11-28 05:59:47
How do I properly implement a "minimize to tray" function in Qt? I tried the following code inside QMainWindow::changeEvent(QEvent *e) , but the window simply minimizes to the taskbar and the client area appears blank white when restored. if (Preferences::instance().minimizeToTray()) { e->ignore(); this->setVisible(false); } Attempting to ignore the event doesn't seem to do anything, either. Apparently a small delay is needed to process other events (perhaps someone will post the exact details?). Here's what I ended up doing, which works perfectly: void MainWindow::changeEvent(QEvent* e) {

WindowManager with Animation (is it possible?)

浪子不回头ぞ 提交于 2019-11-28 04:46:11
Is there any way to inflate a view with WindowManager using Animation (at android's project)? I just can't do it even using the examples in sites! I used many examples but none worked! public BannerLayout(Activity activity, final Context context) { super(context); this.context = context; final WindowManager.LayoutParams params = new WindowManager.LayoutParams( WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); wm = (WindowManager) context.getSystemService(Context

Xlib How Does This (Removing Window Decoration) Work?

丶灬走出姿态 提交于 2019-11-27 06:00:01
问题 How does the following code remove window borders? //note the struct is declared elsewhere, is here just for clarity. //code is from [http://tonyobryan.com/index.php?article=9][1] typedef struct Hints { unsigned long flags; unsigned long functions; unsigned long decorations; long inputMode; unsigned long status; } Hints; //code to remove decoration Hints hints; Atom property; hints.flags = 2; hints.decorations = 0; property = XInternAtom(display, "_MOTIF_WM_HINTS", true); XChangeProperty

How do I properly implement a “minimize to tray” function in Qt?

主宰稳场 提交于 2019-11-27 01:08:57
问题 How do I properly implement a "minimize to tray" function in Qt? I tried the following code inside QMainWindow::changeEvent(QEvent *e) , but the window simply minimizes to the taskbar and the client area appears blank white when restored. if (Preferences::instance().minimizeToTray()) { e->ignore(); this->setVisible(false); } Attempting to ignore the event doesn't seem to do anything, either. 回答1: Apparently a small delay is needed to process other events (perhaps someone will post the exact