Skip to content

Commit

Permalink
Move to wnck-3
Browse files Browse the repository at this point in the history
Fixes mix of GTK2 and GTK3 error. Also contains a fix for the desktop background grab code.
  • Loading branch information
onli committed Dec 4, 2023
1 parent 9fa2956 commit 0d32ab0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SRCDIR ?= src/
SHELL ?= /bin/sh
CC = g++
CCFLAGS ?= -O2
DEPS = $(shell pkg-config --libs --cflags glib-2.0 gconf-2.0 gtk+-3.0 libwnck-1.0 xcb-ewmh librsvg-2.0)
DEPS = $(shell pkg-config --libs --cflags glib-2.0 gconf-2.0 gtk+-3.0 libwnck-3.0 xcb-ewmh librsvg-2.0)
DEPS += $(shell wx-config-gtk3 --cflags --libs)

.PHONY: install uninstall
Expand Down
12 changes: 9 additions & 3 deletions src/background.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@ wxBitmap* getRootWallpaper()
gdk_pixbuf_get_from_window(
gdk_x11_window_foreign_new_for_display(
gdk_display_get_default(),
pm
gdk_x11_get_default_root_xwindow()
),
0,
0,
sz.GetWidth(),
sz.GetHeight()
)
);
);
return backImage;
//wxBitmap* backImage = new wxBitmap(
// gdk_pixbuf_get_from_window(
// gdk_x11_window_foreign_new_for_display(
// GDK_SCREEN_XDISPLAY(screen),
// pm)
// )
// );
return backImage;
} else {
wxSize sz = wxGetDisplaySize();
wxBitmap* backImage = new wxBitmap(sz.GetWidth(), sz.GetHeight());
Expand Down

0 comments on commit 0d32ab0

Please sign in to comment.