djpohly / dwl

dwm for Wayland - ARCHIVE: development has moved to Codeberg
https://codeberg.org/dwl/dwl
Other
1.93k stars 284 forks source link

misc fixes/changes in wlroots-next #513

Closed sevz17 closed 9 months ago

sevz17 commented 9 months ago

Just a few fixes/changes which I'm too lazy to separate and do a proper PR

some of these can be a applied to main, but... meh, who cares?

sevz17 commented 9 months ago

Sadly this does not fix the wrong initial size of some clients (I only experienced issues with some GTK apps)

sevz17 commented 9 months ago

The gamma bits were separated into #516

sevz17 commented 9 months ago

If nobody has a complain, I'll merge this tomorrow around this time.

fictitiousexistence commented 9 months ago

I got this when trying to build:

In file included from dwl.c:396:
client.h: In function ‘client_activate_surface’:
client.h:103:25: error: implicit declaration of function ‘wlr_xdg_toplevel_try_from_wlr_surface’; did you mean ‘wlr_xdg_surface_try_from_wlr_surface’? [-Werror=implicit-function-declaration]
  103 |         if ((toplevel = wlr_xdg_toplevel_try_from_wlr_surface(s)))
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         wlr_xdg_surface_try_from_wlr_surface
client.h:103:23: warning: assignment to ‘struct wlr_xdg_toplevel *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  103 |         if ((toplevel = wlr_xdg_toplevel_try_from_wlr_surface(s)))
      |                       ^
dwl.c: In function ‘resize’:
dwl.c:1952:9: error: implicit declaration of function ‘wlr_scene_subsurface_tree_set_clip’; did you mean ‘wlr_scene_subsurface_tree_create’? [-Werror=implicit-function-declaration]
 1952 |         wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         wlr_scene_subsurface_tree_create
dwl.c: In function ‘createmon’:
dwl.c:932:9: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
  932 |         strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dwl.c: In function ‘arrange’:
dwl.c:460:9: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
  460 |         strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dwl.c: In function ‘setlayout’:
dwl.c:2094:9: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
 2094 |         strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:66: dwl.o] Error 1
sevz17 commented 9 months ago

Did you update wlroots?

fictitiousexistence commented 9 months ago

Yeah. Tried building before and then after updating.

Was on wlroots commit f750c744 due to an issue related to dwl/bemenu/wlroots? https://github.com/Cloudef/bemenu/issues/370

I'm on gentoo, using the 9999 package, rebuilt that and then tried making dwl again.

Nov 19, 2023 11:53:12 PM Leonardo Hernández @.***>:

Did you update wlroots?

— Reply to this email directly, view it on GitHub[https://github.com/djpohly/dwl/pull/513#issuecomment-1818226375], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AEZIV3LI7KYJM7N7652V5HDYFLO3LAVCNFSM6AAAAAA7PFZXVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJYGIZDMMZXGU]. You are receiving this because you commented. [Tracking image][https://github.com/notifications/beacon/AEZIV3ISLF3NVM3L5QC5BXTYFLO3LA5CNFSM6AAAAAA7PFZXVCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTML7XMO.gif]

sevz17 commented 9 months ago

Are you sure you updated it? wlr_scene_subsurface_tree_set_clip was added in this commit and wlr_xdg_toplevel_try_from_wlr_surface in this one, I'm also on gentoo, I use dwl-9999-r1 and wlroots-9999 and no problems here.

fictitiousexistence commented 9 months ago

@sevz17 I was sure till you asked haha

I re-emerged wlroots, wayland, and wayland-protocols. Also installed using the specific commit: export EGIT_COMMIT="3d3cca91" && emerge --ask --verbose wlroots

I have to run export EGIT_COMMIT="f750c744" && emerge --ask --verbose wlroots Cause anything past that commit makes both bemenu and swaybg crash even when run inside sway.

I don't use the gentoo dwl package I just git clone https://github.com/djpohly/dwl.git --branch wlroots-next and build.

fictitiousexistence commented 9 months ago

@sevz17 oy vey......

I searched my system for wlr_scene.h

Found 2, ./usr/local/include/wlr/types/wlr_scene.h & /usr/include/wlr/types/wlr_scene.h

I removed /usr/local/include/wlr & /usr/local/include/hyprland and then I was able to build no issue.

Whoops....