naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.15k stars 78 forks source link

Apps freeze when copying #236

Closed santilococo closed 2 years ago

santilococo commented 3 years ago

Hi, if I take a screenshot of my dwm desktop (only the root window without any programs) and then try to copy the screenshot to another application, it will freeze until I copy something else. Do you know what could be happening? TY. I have dwm + picom (but without picom it's the same).

foxpy commented 3 years ago

it will freeze until I copy something else

I don't get what exactly gets freezed, could you please elaborate on this?

santilococo commented 3 years ago

Hi! The app I am trying to paste into will freeze. For example, If I take a screenshot (maim -k -s | xclip-clipboard selection -t image/png) and then try to copy its output to Discord, Discord will freeze. Hope I was clearer... TY.

foxpy commented 3 years ago

Hi! The app I am trying to paste into will freeze. For example, If I take a screenshot (maim -k -s | xclip-clipboard selection -t image/png) and then try to copy its output to Discord, Discord will freeze. Hope I was clearer... TY.

The part with xclip-clipboard looks odd for me. Can you try running maim -k -s | xclip -selection clipboard -t image/png? To be honest, I am not sure if it would fix anything for you, it just a first odd thing which looks unnatural for me.

Also, this is not the first clipboard related issue, e.g. try looking at: #211 #180

All these issues are not really related to maim. I advise you to check out if maim works properly like this:

$ maim -k -s | file -
/dev/stdin: PNG image data, 180 x 128, 8-bit/color RGBA, non-interlaced

As you can see, in my case maim generates valid PNG image which can be further piped into other applications or clipboard managers. Any clipboard issues can't be fixed on maim side.

JimPix1 commented 2 years ago

Hi @santilococo Did you find the solution to this bug? I believe I have the same identical problem :)

foxpy commented 2 years ago

I have the same identical problem

Everyone has. This issue is not about maim, but either about xclip, X11 or freezing applications theirselves. To be honest I don't even have an idea of where to start debugging.

foxpy commented 2 years ago

Actually go check out #260, it may help you