ch11ng / exwm

Emacs X Window Manager
2.85k stars 134 forks source link

[GNOME Flashback + EXWM + GIMP]: With '(exwm-manage-force-tiling t), trying to open a file in GIMP results in endless flickering. #617

Open emacksnotes opened 5 years ago

emacksnotes commented 5 years ago

[GNOME Flashback + EXWM + GIMP]: With '(exwm-manage-force-tiling t), trying to open a file in GIMP makes my screen flicker endlessly.

Here is the link to screen recording: https://drive.google.com/file/d/1zqwPbZSGzJlVJowZxwdUKa6fW1VPz0SI/view?usp=sharing

In the above screen recording, for some reasons C-x C-b stops the screen flicker and makes my machine usable. With the amount of flicker I was experiencing I was doubting if I could even record a video. Fortunately, I was able to make one.

If you are not able to reproduce this issue on your side, please ping me. I can provide logs or help with additional debugging.

My .emacs has these lines:

(package-initialize)

(require 'exwm)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(exwm-manage-force-tiling t)
 '(package-selected-packages
   '(exwm windresize tablist resize-window poly-R occur-x lsp-clangd ivy ido-select-window flycheck ess elmacro diff-hl company ccls)))

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") 

The packages I am using

I am using debian unstable, emacs and exwm all three of which are no older than 24 hrs.

GNU Emacs 27.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-08-09
$ dpkg -l | grep gimp
ii  gimp                                  2.10.8-2                           amd64        GNU Image Manipulation Program
ii  gimp-data                             2.10.8-2                           all          Data files for GIMP
ii  libgimp2.0                            2.10.8-2                           amd64        Libraries for the GNU Image Manipulation Program
$ dpkg -l | grep gnome-flashback
ii  gnome-flashback                       3.30.0-3                           amd64        helper application for the GNOME Flashback session
ii  gnome-flashback-common                3.30.0-3                           all          GNOME Flashback helper application - common data files
ch11ng commented 5 years ago

Similar issues had been reported before and it appears only affect GIMP. The problem is when GIMP has subwindows visible and finds out its main window is unmapped (hidden), it would map (show) it again. It's not specific to your setup but by setting exwm-manage-force-tiling would surely cause this problem for GIMP. Perhaps you should avoid exwm-manage-force-tiling and turn to exwm-manage-configurations for finer control over this.

emacksnotes commented 5 years ago

Similar issues had been reported before and it appears only affect GIMP. The problem is when GIMP has subwindows visible and finds out its main window is unmapped (hidden), it would map (show) it again. It's not specific to your setup but by setting exwm-manage-force-tiling would surely cause this problem for GIMP.

I don't understand the technicalities.

Perhaps you should avoid exwm-manage-force-tiling and turn to exwm-manage-configurations for finer control over this.

I believe your suggestion here is that I make an exception to GIMP and set exwm-manage-force-tiling to nil on those class of frames.


I don't understand X or the jargon surrounding it.

As a lay user, my experience suggests that if the new dialog window gets opened in a new Emacs Window (i.e., split the GIMP window, and /lend/ the /other/ window to GIMP's file dialog) then everything will be fine.

In the screen-recording above, once I do C-x C-b, the Emacs window displaying the main GIMP window gets split and the 'Buffer List' shows up and once I activate the *Buffer List* with my mouse pointer, the GIMP file dialog shows up just fine. (Note: I need to hit C-x C-b multiple times, implying that my random key strikes /ultimately/ lands in the right display context, and from then on the screen regains it's sanity)

The above description leads me to think that /even/ with exwm-manage-force-tiling set to t, there is exists some 'action list' for GIMP frames which will make it use the /other/ window.

What I am saying is this: If GIMP file dialog were to open in a window different from the main gimp window (i.e., the /other/ window, in emacspeak), then everything should be just fine. The problem is because GIMP file open dialog /fully covers/ the main GIMP window, and for some reason GIMP hates it. When I say I want tiled windows, I only say that I want app windows NOT to /partially/ overlap, but for some reasons exwm takes that setting to mean /fully cover/ the older window.

I hope you get the drift of what I am saying here. Thanks to my ignorance, I cannot do any better.

ch11ng commented 5 years ago

What about making a global and a per-application options to control whether an X window should be displayed in another Emacs window? This basically only requires changing pop-to-buffer-same-window to pop-to-buffer and killing the Emacs window after the X window is destroyed. The options should perhaps accept these values:

Perhaps popup should be made the default. Of course these options are probably only useful when exwm-manage-force-tiling is set. Otherwise the popup X windows are automatically made floating.