Comments (11)
The window properties may differ. Please change:
(is (window_class) "explorer.exe")
To:
(is (window_class) "Wine")
from supermemo-wine.
Yep. This is a lack of support for the minimize operation in the window manager + Wine interaction.
The Wine windows lack the _NET_WM_ACTION_MINIMIZE
operation in the _NET_WM_ALLOWED_ACTIONS
property. The following is the relevant output from xprop
, formatted for readability:
_NET_WM_ALLOWED_ACTIONS(ATOM) =
_NET_WM_ACTION_CLOSE,
_NET_WM_ACTION_ABOVE,
_NET_WM_ACTION_BELOW,
_NET_WM_ACTION_FULLSCREEN,
_NET_WM_ACTION_MOVE,
_NET_WM_ACTION_RESIZE,
_NET_WM_ACTION_MAXIMIZE_HORZ,
_NET_WM_ACTION_MAXIMIZE_VERT,
_NET_WM_ACTION_SHADE,
_NET_WM_ACTION_CHANGE_DESKTOP,
_NET_WM_ACTION_STICK
While it is possible to add the _NET_WM_ACTION_MINIMIZE
action (possibly, with wmctrl
or other utilities), you would have to do it to every mapped window (Contents, Browser, Dock, Status bar, Element), and minimizing one window would not minimize the rest.
For a proof of this limitation, force-minimize one of the SuperMemo windows with:
xdotool selectwindow windowminimize
and click on a SuperMemo window. You will notice that only that window will be minimized. EDIT: actually, if you have enabled and minimized the Dock window that way, all other windows will be minimized on xfwm, the XFCE window manager.
I seem to remember that kwm (the window manager from KDE Plasma) does minimize all windows, but it is implementation specific. To my knowledge, it has a lot of heuristics that try to do the right thing, at the expense of more complexity.
In order not to have to detect and forcefully minimize the dock window to achieve the purpose every time, here are two suggestions:
- Use the
Shift+Ctrl+G
shortcut to send SuperMemo windows to the system tray. - Use a Wine virtual desktop window. Example:
Lutris
SuperMemo 17
Configure
Runner options
[X] Windowed (virtual desktop)
Virtual desktop resolution: (choose desired resolution)
from supermemo-wine.
Additional suggestion: define a keyboard shortcut at the window manager level; say, with xfce4-keyboard-settings
, that would minimize the dock window upon click:
A refinement would be to detect the dock window instead of clicking on it , but it isn't simple.
from supermemo-wine.
The logical solution to minimize the dock window would be something like:
xdotool search --name " \(SuperMemo [0-9]+:" windowminimize
but it doesn't have a good hiding behavior on my system (freezes)
from supermemo-wine.
I'll research into existing tools and/or Xlib to add minimize capability through _NET_WM_ACTION_MINIMIZE
after a Wine SuperMemo window has been created.
from supermemo-wine.
Thank you again. :-)
Here is a feedback:
Use the Shift+Ctrl+G shortcut to send SuperMemo windows to the system tray.
Minimize SM this way works great, but there is no change to maximize it after. The only way to get the window back, is to close SM and open it again, to have it maximized again.
Use a Wine virtual desktop window. Example
This works great. But I don't like the title bar of "wine desktop" on the top. Is there a way to hide it?
xdotool search --name " (SuperMemo [0-9]+:" windowminimize
I have added this command entry in this App (Xfce settings):
Result: Works not better than CTRL+ALT+D (same behaviour)
So my favourite until now is "Use a Wine virtual desktop window".
from supermemo-wine.
Use the Shift+Ctrl+G shortcut to send SuperMemo windows to the system tray.
Minimize SM this way works great, but there is no change to maximize it after. The only way to get the window back, is to close SM and open it again, to have it maximized again.
All I have to do is click on the tray icon to have the floating (not Wine virtual desktop) SuperMemo windows back (as in "restore windows"), but yes, this doesn't come automatically with Ctrl+Alt+D; it is an additional operation.
Use a Wine virtual desktop window. Example
This works great. But I don't like the title bar of "wine desktop" on the top. Is there a way to hide it?
The "wine desktop window" is how I deal with the multiple floating SuperMemo windows on incompatible window managers as well as tiling window managers. And yes to your question; you want to undecorate the window. XFCE doesn't have such option built-in, but you can do it with a third-party app.
Install devilspie
using your package manager, then create the following file:
~/.devilspie/supermemo-wine-desktop.ds
:
;; -*- scheme -*-
(if (and (contains (application_name) " - Wine desktop")
;; Unfortunately, when running a Wine virtual desktop, the SuperMemo
;; window class changes from "sm17.exe" (easier to identify) to
;; "explorer.exe"
(is (window_class) "explorer.exe"))
(undecorate)) ;remove title bar
Run the following command in a terminal to test: devilspie -a
. The SuperMemo Wine desktop window should be undecorated. You can Ctrl+C
to stop the test.
To persist this configuration, add the devilspie
command to your desktop environment's startup. (Here, xfce4-session-settings
)
xdotool search --name " (SuperMemo [0-9]+:" windowminimize
I have added this command entry in this App (Xfce settings)... Works not better than CTRL+ALT+D (same behaviour)
I was also far from happy with the window freezing!
Conclusion
Use either:
- A Wine desktop window. You can undecorate it automatically with Devilspie. A "desktop window" avoids bugs from interacting with not-so-collaborating window managers.
- Regular floating SuperMemo windows. The experience isn't the best, which is why I will come up with an alternative to enable minimization for floating windows (likely a script running in the background, analog to
devilspie
).
from supermemo-wine.
Here is another solution:
Right click onto the title bar and change Lutris window into full-screen mode:
What's the hook?
When I start SM again, Lutris window is again not in Full-screen mode.
from supermemo-wine.
1. The Window manager always has the final say on how to display a window.
2. There is a Window state named _NET_WM_STATE_FULLSCREEN
, that the window
manager can choose to implement.
2a. Apparently, Lutris is concerned with configuring Wine apps to use
exclusive full screen not through this window state, but through OpenGL
and other methods more commonly used in games.
3. To set this full screen state on the Wine desktop window upon starting,
you can use a devilspie script (see above instructions).
;; -*- scheme -*-
(if (and (contains (application_name) " - Wine desktop")
(is (window_class) "explorer.exe"))
(fullscreen))
from supermemo-wine.
Thank you.
My "Lutris window full-screen method" is not a good idea. When full screen is active, I can't click on any icons in the taskbar. I can see them, but when I click on them, they don't react.
So I tried now the devilspie method. With
~/.devilspie/supermemo-wine-desktop.ds
and
devilspie -a
But the test was not working:
Golddouble@mx:~
$devilspie -a
^C
Golddouble@mx:~
$
No effect.
My expectation was, that now the title bar wine Lutris goes away. But as you can see it remains. Or do I miss anything?
from supermemo-wine.
Thank you.
This works great. 👍
from supermemo-wine.
Related Issues (20)
- Goldendict <-> Supermem HOT 2
- /usr/bin/winetricks: 7: ./supermemo17.verb: Syntax error: newline unexpected HOT 4
- sh: 0: Can't open winetricks HOT 8
- Can you help guide me through the installation process of SM18 on linux? HOT 2
- Stuck on check out lates version when installing sm18inst.exe
- Font size too small on HiDPI HOT 2
- command wine regedit C:/windows/Temp/set-tabprocgrowth.reg returned status 53. Aborting. HOT 14
- Update all installers
- Internet Explorer and windows managing HOT 2
- Incremental Video and PDF functionality HOT 5
- Screen-size problems/AHK scripts/problems with the toolbar HOT 3
- HTTPS image issue with SuperMemo 18 HOT 1
- Is it possible to use win7 or higher version of wine? xp + ie8 is very slow. HOT 2
- [Bug] changing default stylesheet: SM17 freezes HOT 2
- [Bug] Windows system Error, when trying to edit the default stylesheet HOT 3
- SM18: Error: "Cannot open player device" HOT 8
- URL of file needed for install returns 404 error -> Install fails HOT 3
- SM freezes when using a particular function
- Bug with Toolkit -> Options -> Fonts "use question and answer fonts in HTML" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supermemo-wine.