bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graphical issue with ulauncher and albert

los95 opened this issue · comments

commented

Hello, I recently updated dwm to 6.4 and for the most part everything went smooth but for some reason there is a graphical issue with ulauncher and albert. When it first launches, both of them show the list of applications fine but when I launch any of the two again, the list gets cut off. I will include screenshots of this. I am not sure if there is a rule for floating windows that can help fix this issue but any help is appreciated!

Ulauncher:
1687746788_Jun25_21:08

Albert:
1687746768_Jun25_21:48

One thing to add, albert tends to move to the right a bit when the search list changes size, that is a different issue that is not as important but just pointing it out there.

Hi @los95,

do you use a compositor? If so is the window still cut off if you turn the compositor off?

I tried both applications and I can't replicate that behaviour.

Both Ulauncher and Albert jumps to the far right for me in dwm because:

  • the programs are managed by dwm and
  • I use a multi-monitor system and
  • the program sends a configure request indicating the absolute position and size of the launcher window and
  • dwm treats the top left corner of each monitor as the starting point for configure requests

If I open Albert and I type a character, hit backspace, type a character, hit backspace, and repeat then the the box will move down and right by the size of the border pixel, which by default is 1 pixel, but you can increase this to see the effect more clearly.

This has also to do with that Albert does not expect to have a basic border and does not take the border into account when sending configure requests specifying the new position.

You can enable the DECORATION_HINTS_PATCH which will allow windows that ask for it to be drawn without a border. This has no effect on Albert, but Ulauncher will be drawn without a border.

In both cases the window ends up being managed by dwm, which is ultimately not what the program is designed for.

Both of the programs work a lot better if they are not managed by dwm. I have a patch called unmanaged but this is not integrated in dwm-flexipatch. Additionally you would need an option to allow the unmanaged window to get input focus.

I can probably integrate something like that into dwm-flexipatch.

commented

I have picom running and killed all the processes but it still causes the problem. I am not sure if one of the patches is causing this issue. One thing that I noticed in my 6.2 config is that I had ulauncher rule with the following:

RULE(.instance = "ulauncher", .tags = SPTAG(3), .isfloating = 1)

On 6.4, it does not let me have SPTAG() as it gives me this error when I compile it:

   ` config.h:372:47: error: initializer element is not constant
    372 |         RULE(.instance = "ulauncher", .tags = SPTAG(0), .isfloating = 1)`

I am not sure if this has anything to do with it but it was working on 6.2.

Another thing that I noticed if I set up this rule:

RULE(.instance = "ulauncher", .scratchkey = 'u', .isfloating = 1)

The first time ulauncher opens it will pop up with a border and will work normally but after launching it again the border does not appear again and the graphical error will happen.

Could you show me your patches.h and config.h files?

commented

Sure I was messing with the umanaged patch but it was crashing dwm on opening an application.

The patches.h: (I had to use another site for some reason pastebin is thinking its spam?)
https://hastebin.com/share/onayubezuw.less

The config.h:
https://pastebin.com/dtYB0F5i

I also tried to resize ulauncher with modkey and right click and it seems to bring back the list but goes back after reopening it. Perhaps something is causing it to shrink?

So these are the patches that are enabled.

$ grep -E "^#define .* 1$" patches.h
#define BAR_AWESOMEBAR_PATCH 1
#define BAR_DWMBLOCKS_PATCH 1
#define BAR_DWMBLOCKS_SIGUSR1_PATCH 1
#define BAR_FLEXWINTITLE_PATCH 1
#define BAR_LAYOUTMENU_PATCH 1
#define BAR_LTSYMBOL_PATCH 1
#define BAR_TAGGRID_PATCH 1
#define BAR_TAGPREVIEW_PATCH 1
#define BAR_STATUS_PATCH 1
#define BAR_STATUSBUTTON_PATCH 1
#define BAR_STATUSCMD_PATCH 1
#define BAR_SYSTRAY_PATCH 1
#define BAR_TAGS_PATCH 1
#define BAR_TAGLABELS_PATCH 1
#define BAR_WINICON_PATCH 1
#define BAR_WINTITLE_PATCH 1
#define BAR_ALPHA_PATCH 1
#define BAR_ANYBAR_PATCH 1
#define BAR_ANYBAR_TOP_AND_BOTTOM_BARS_PATCH 1
#define BAR_ANYBAR_MANAGE_WIDTH_PATCH 1
#define BAR_DMENUMATCHTOP_PATCH 1
#define BAR_EWMHTAGS_PATCH 1
#define BAR_HEIGHT_PATCH 1
#define BAR_HIDEVACANTTAGS_PATCH 1
#define BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH 1
#define BAR_NO_COLOR_EMOJI_PATCH 1
#define BAR_PANGO_PATCH 1
#define BAR_STATUSPADDING_PATCH 1
#define BAR_VTCOLORS_PATCH 1
#define ALT_TAB_PATCH 1
#define ATTACHASIDE_PATCH 1
#define AUTOSTART_PATCH 1
#define BIDI_PATCH 1
#define CENTER_TRANSIENT_WINDOWS_BY_PARENT_PATCH 1
#define CFACTS_PATCH 1
#define CMDCUSTOMIZE_PATCH 1
#define COMBO_PATCH 1
#define COOL_AUTOSTART_PATCH 1
#define CYCLELAYOUTS_PATCH 1
#define DECORATION_HINTS_PATCH 1
#define DRAGCFACT_PATCH 1
#define DRAGMFACT_PATCH 1
#define DWMC_PATCH 1
#define EMPTYVIEW_PATCH 1
#define EXRESIZE_PATCH 1
#define FLOATPOS_PATCH 1
#define FLOATPOS_RESPECT_GAPS_PATCH 1
#define FOCUSADJACENTTAG_PATCH 1
#define FOCUSDIR_PATCH 1
#define FOCUSMASTER_PATCH 1
#define FSIGNAL_PATCH 1
#define FULLSCREEN_PATCH 1
#define INPLACEROTATE_PATCH 1
#define INSETS_PATCH 1
#define IPC_PATCH 1
#define ISPERMANENT_PATCH 1
#define KEYMODES_PATCH 1
#define KILLUNSEL_PATCH 1
#define LOSEFULLSCREEN_PATCH 1
#define MAXIMIZE_PATCH 1
#define MPDCONTROL_PATCH 1
#define MOVERESIZE_PATCH 1
#define MOVESTACK_PATCH 1
#define NAMETAG_PATCH 1
#define NAMETAG_PREPEND_PATCH 1
#define NET_CLIENT_LIST_STACKING_PATCH 1
#define NOBORDER_PATCH 1
#define NODMENU_PATCH 1
#define NO_MOD_BUTTONS_PATCH 1
#define PUSH_PATCH 1
#define RENAMED_SCRATCHPADS_PATCH 1
#define RENAMED_SCRATCHPADS_AUTO_HIDE_PATCH 1
#define REORGANIZETAGS_PATCH 1
#define RESIZECORNERS_PATCH 1
#define RESIZEPOINT_PATCH 1
#define RESTARTSIG_PATCH 1
#define ROTATESTACK_PATCH 1
#define ROUNDED_CORNERS_PATCH 1
#define SAVEFLOATS_PATCH 1
#define SEAMLESS_RESTART_PATCH 1
#define SELFRESTART_PATCH 1
#define SETBORDERPX_PATCH 1
#define SHIFTSWAPTAGS_PATCH 1
#define SHIFTVIEW_PATCH 1
#define SHIFTVIEW_CLIENTS_PATCH 1
#define SIZEHINTS_ISFREESIZE_PATCH 1
#define SPAWNCMD_PATCH 1
#define STEAM_PATCH 1
#define STICKY_PATCH 1
#define SWALLOW_PATCH 1
#define SWAPTAGS_PATCH 1
#define SWITCHTAG_PATCH 1
#define TAGALL_PATCH 1
#define TAPRESIZE_PATCH 1
#define TOGGLEFULLSCREEN_PATCH 1
#define TOGGLELAYOUT_PATCH 1
#define TRANSFER_PATCH 1
#define VANITYGAPS_PATCH 1
#define WINDOWROLERULE_PATCH 1
#define WINVIEW_PATCH 1
#define XRDB_PATCH 1
#define BSTACK_LAYOUT 1
#define BSTACKHORIZ_LAYOUT 1
#define CENTEREDMASTER_LAYOUT 1
#define CENTEREDFLOATINGMASTER_LAYOUT 1
#define COLUMNS_LAYOUT 1
#define DECK_LAYOUT 1
#define FIBONACCI_DWINDLE_LAYOUT 1
#define FIBONACCI_SPIRAL_LAYOUT 1
#define FLEXTILE_DELUXE_LAYOUT 1
#define GAPPLESSGRID_LAYOUT 1
#define GRIDMODE_LAYOUT 1
#define HORIZGRID_LAYOUT 1
#define NROWGRID_LAYOUT 1
#define TILE_LAYOUT 1
#define MONOCLE_LAYOUT 1

Just a few.

I tried with that config and the patches and it took quite a while to reproduce some graphical glitches. I had actually given up.

It is a bit strange to have launchers like these as scratchpads given that they come with that functionality built-in, but I didn't find any issues specifically to do with that.

My best guess is that this is caused by the old rounded corners patch, could be that there is a timing issue there resulting in the window being cut with a mask.

After disabling that patch I couldn't reproduce the issue anymore, although I didn't try for very long.

It may be that at the end of the drawroundedcorners function there should be an XSync(dpy, False); call, but not entirely sure if that would address things.

In general though it is better to let the compositor handle the drawing of rounded corners and picom does a great job handling rounded borders.

picom --corner-radius 20

Maybe try and see if that helps.

commented

I included a lot of patches just couldn't help myself. I added the call in the drawroundedcorners function but it didn't seem to change anything. However, setting the line provided to picom as well either not including 'drawroundedcorners` or setting it to 0 in config.h did the trick. Thanks for the help!

I integrated the unmanaged patch (UNMANAGED_PATCH), so you can try with the following rule and see if that works better overall:

RULE(.class = "Ulauncher", .unmanaged = 3)

(assumes that you will be using the keybinding set in Ulauncher of course)