Skip to content

Commit

Permalink
windowing: Remove window mapper class since we don't need it on Wayla…
Browse files Browse the repository at this point in the history
…nd (#640)

* windowing: Remove window mapper class since we don't need it on Wayland

Fixes the issue where opening a pinned app wouldn't properly group it because it was trying to query X11 properties.

Signed-off-by: Evan Maddock <[email protected]>

* icon-tasklist: Simplify getting an icon for a button

Signed-off-by: Evan Maddock <[email protected]>

---------

Signed-off-by: Evan Maddock <[email protected]>
  • Loading branch information
EbonJaeger authored Dec 7, 2024
1 parent b78142c commit 8a25ad4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 369 deletions.
12 changes: 3 additions & 9 deletions src/panel/applets/icon-tasklist/widgets/IconButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -641,17 +641,11 @@ public class IconButton : Gtk.ToggleButton {
icon.waiting = false;
}

Gdk.Pixbuf? pixbuf_icon = null;

if (window_group != null) {
var size = target_icon_size == 0 ? DEFAULT_ICON_SIZE : target_icon_size;
pixbuf_icon = window_group.get_icon(size, 1);
}

if (app?.icon != null) {
unowned var gicon = window_group.application.get_gicon();
icon.set_from_gicon(gicon, Gtk.IconSize.INVALID);
} else if (app?.icon != null) {
icon.set_from_gicon(app?.icon, Gtk.IconSize.INVALID);
} else if (pixbuf_icon != null) {
icon.set_from_pixbuf(pixbuf_icon);
} else {
icon.set_from_icon_name("image-missing", Gtk.IconSize.INVALID);
}
Expand Down
45 changes: 22 additions & 23 deletions src/windowing/meson.build
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
libwindowing_sources = [
'dbus.vala',
'windowing.vala',
'window_group.vala',
'window_mapper.vala',
'dbus.vala',
'windowing.vala',
'window_group.vala',
]

libwindowing_deps = [
dep_xfce4windowing,
dep_wnck,
dep_xfce4windowing,
dep_wnck,
]

libwindowing = static_library(
'windowing',
libwindowing_sources,
dependencies: libwindowing_deps,
c_args: [
'-DWNCK_I_KNOW_THIS_IS_UNSTABLE',
],
vala_args: [
'--pkg', 'gio-unix-2.0',
'--pkg', 'gtk+-3.0',
'--pkg', 'gdk-x11-3.0',
'--pkg', 'libxfce4windowing-0',
'--vapidir', join_paths(meson.source_root(), 'vapi'),
]
'windowing',
libwindowing_sources,
dependencies: libwindowing_deps,
c_args: [
'-DWNCK_I_KNOW_THIS_IS_UNSTABLE',
],
vala_args: [
'--pkg', 'gio-unix-2.0',
'--pkg', 'gtk+-3.0',
'--pkg', 'gdk-x11-3.0',
'--pkg', 'libxfce4windowing-0',
'--vapidir', join_paths(meson.source_root(), 'vapi'),
],
)

link_libwindowing = declare_dependency(
link_with: libwindowing,
include_directories: [
include_directories('.'),
],
link_with: libwindowing,
include_directories: [
include_directories('.'),
],
)

# Expose the current directory so that we can use vapidir
Expand Down
Loading

0 comments on commit 8a25ad4

Please sign in to comment.