Status: | Work in progress |
---|---|
Proposed branch: | lp:~ricotz/plank/wayland |
Merge into: | lp:plank |
Diff against target: |
275 lines (+65/-22) 9 files modified
lib/DockController.vala (+5/-0) lib/Factories/AbstractMain.vala (+2/-8) lib/HideManager.vala (+18/-8) lib/Items/ApplicationDockItem.vala (+17/-5) lib/Items/ApplicationDockItemProvider.vala (+3/-0) lib/Items/DefaultApplicationDockItemProvider.vala (+7/-1) lib/Items/TransientDockItem.vala (+3/-0) lib/Widgets/CompositedWindow.vala (+4/-0) lib/Widgets/DockWindow.vala (+6/-0) |
To merge this branch: | bzr merge lp:~ricotz/plank/wayland |
Related bugs: | |
Related blueprints: |
Wayland Support
(Medium)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Docky Core | Pending | ||
Review via email: mp+277344@code.launchpad.net |
Commit message
Description of the change
Just make it run under Wayland nothing more.
* No window management
* Unable to position dock-window
* Broken DND
Wayland doesn't provide a common interface to interact or query information needed for a standalone dock to work, it requires support by the running compositor or even being integrated in it.
- 1443. By Rico Tzschichholz
-
Add methods to check some desktop environment types
- 1444. By Rico Tzschichholz
-
trash: Implement perform_
empty_trash( ) Only try using Nautilus on "GNOME" and "Unity" enviroments
- 1445. By Rico Tzschichholz
-
theme: Add "CascadeHide" option
If true it will cause background and icons to unhide/hide with different
speeds so they will leave/hit the screen-edge at the same time. - 1446. By Rico Tzschichholz
-
po: Update translations
- 1447. By Rico Tzschichholz
-
dragmanager: Don't grab input and abort this drag if DragItem is null
- 1448. By Rico Tzschichholz
-
dockwindow: Be more persuasive to get the window where is should be
- 1449. By Rico Tzschichholz
-
po: Update translations
- 1450. By Rico Tzschichholz
-
Use fixed ObjectClass.
list_properties () of valac 0.31/32 if available - 1451. By Rico Tzschichholz
-
dockitem: Actually use internal constant ITEM_INVALID_
DURATION - 1452. By Rico Tzschichholz
-
po: Make use of "translator-
credits" for Gtk.AboutDialog - 1453. By Rico Tzschichholz
-
po: Update translations
- 1454. By Rico Tzschichholz
-
lib: Add internal compatibility wrapper for gtk+ 3.19.1+
- 1455. By Rico Tzschichholz
-
widgets: Adjust custom widgets for gtk+ 3.19.1+
- 1456. By Rico Tzschichholz
-
theme: Create and use custom Gtk.StyleContext
- 1457. By Rico Tzschichholz
-
dragmanager: Better handling if the actual selection-data is null
- 1458. By Rico Tzschichholz
-
dockitem: Only use file-monitor for "file:/
/"-icon- files - 1459. By Rico Tzschichholz
-
build: Add "run-debug" target for running plank uninstalled within gdb
- 1460. By Rico Tzschichholz
-
lib: Move HoverWindow instance into DockController
- 1461. By Rico Tzschichholz
-
dragmanager: Show descriptive tooltip on external-dnd actions
- 1462. By Rico Tzschichholz
-
dragmanager: desktop-files are special and deserve the drop-to-dock text
- 1463. By Rico Tzschichholz
-
po: Update translations
- 1464. By Rico Tzschichholz
-
po: Update translations
- 1465. By Rico Tzschichholz
-
data: Update appdata to 0.6+ format
- 1466. By Rico Tzschichholz
-
appdata: Make "summary" translatable, re-use tweaked desktop-file comment
- 1467. By Rico Tzschichholz
-
po: Update translations
- 1468. By Rico Tzschichholz
-
Welcome to 2016
- 1469. By Rico Tzschichholz
-
Use clamp() instead of min(max())
- 1470. By Rico Tzschichholz
-
dockpreferences: No need to notify about external changes of DockItems
- 1471. By Rico Tzschichholz
-
dockcontroller: Serialize possible DockItems change on start-up
- 1472. By Rico Tzschichholz
-
dockcontroller: Fix r1471 and actually save DockItems change on start-up
- 1473. By Rico Tzschichholz
-
color: Fix mess-up of r1469
- 1474. By Rico Tzschichholz
-
filedockitem: Hide "Keep in Dock" wile LockItems is enabled
- 1475. By Rico Tzschichholz
-
po: Update translations
- 1476. By Rico Tzschichholz
-
dockrenderer: Don't apply window-scale-factor twice on foreground-
icon-size Regression of r1343
- 1477. By Rico Tzschichholz
-
applicationdock
item: Check LauncherEntry values for actual changes Also restrict the precision of "progress".
- 1478. By Rico Tzschichholz
-
items: Reduce redraw requests on LauncherEntry updates
- 1479. By Rico Tzschichholz
-
items: Fix build without dbusmenu-glib
- 1480. By Rico Tzschichholz
-
unity: Handle bad LauncherAPI clients which have an insane update-rate
Skip/hold requests if they are arriving within a defined threshold of
32ms after the previous one.This avoids plank to freeze while not being able to handle all requests.
- 1481. By Rico Tzschichholz
-
positionmanager: Expand dock on external-drag without enabled zoom too
Also try harder to insert dropped elements at the actually desired spot.
- 1482. By Rico Tzschichholz
-
unity: Allow a specific amount of fast-updates before skipping/delaying
Cope with applications which are firing update-requests for multiple
application-uris at the same time. - 1483. By Rico Tzschichholz
-
Revert "dockpreferences: No need to notify about external changes of DockItems"
This breaks GLib.Settings.
bind() so that DockItems never get saved. - 1484. By Rico Tzschichholz
-
Allow and handle uris with "docklet" scheme
- 1485. By Rico Tzschichholz
-
tests: Drop PreferencesWindow test
- 1486. By Rico Tzschichholz
-
Add some functionality to docklets GUI
Drag'n'drop or double-click a docklet to add it.
- 1487. By Rico Tzschichholz
-
settings: Must take reference of matched ParamSpec
Not doing so results in an undefined behaviour while things ran out of
scope when calling GSettings.bind().This reverts r1430
- 1488. By Rico Tzschichholz
-
build: Fix gtk+-3.0 < 3.10 (non-HiDPI)
- 1489. By Rico Tzschichholz
-
preferenceswindow: Allow changing the backing DockController
- 1490. By Rico Tzschichholz
-
unity: Expose API to handle LauncherEntry DBus clients
- 1491. By Rico Tzschichholz
-
po: Update translations
- 1492. By Rico Tzschichholz
-
Cast callbacks to GLib.SourceFunc where possible
- 1493. By Rico Tzschichholz
-
unity: Use the real sender-name given by NameOwnerChanged
- 1494. By Rico Tzschichholz
-
build: Add autogen.sh to tarball
Conveniently rebuild/update the autotools downstream.
- 1495. By Rico Tzschichholz
-
po: Update translations
- 1496. By Rico Tzschichholz
-
examples: Add UnityClient example
- 1497. By Rico Tzschichholz
-
abstractmain: Use new GLib.Application commandline handling API
Require glib >= 2.40
- 1498. By Rico Tzschichholz
-
build: Drop support for gee-1.0
- 1499. By Rico Tzschichholz
-
build: Drop obsololete glib conditionals and bump vala's target-glib
- 1500. By Rico Tzschichholz
-
build: Drop support for gtk+ < 3.10
- 1501. By Rico Tzschichholz
-
ui: Use valac's gtktemplate support
- 1502. By Rico Tzschichholz
-
po: Update translations
- 1503. By Rico Tzschichholz
-
lib: Update symbols
- 1504. By Rico Tzschichholz
-
build: Only cairo >= 1.13 is required for HiDPI
- 1505. By Rico Tzschichholz
-
tests: Make sure to quit "dock" test application
- 1506. By Rico Tzschichholz
-
preferenceswindow: Keep translated "Preferences" string around for now
- 1507. By Rico Tzschichholz
-
docktheme: Adjust draw-position item-badge to avoid cropped shadow
- 1508. By Rico Tzschichholz
-
positionmanager: Partly restore original icon-zoom
- 1509. By Rico Tzschichholz
-
dockitem: Handle file-monitor event where current launcher was target
If "other" of FileMonitorEven
t.MOVED matches our current launcher-file
than it got replaced by a new file, so avoid doing anything other than
loading possible new information. - 1510. By Rico Tzschichholz
-
items: Handle "PinnedOnly" in DefaultApplicat
ionDockItemProv ider This is more efficient than doing this in the DockController. Only the
actually effected items are created/purged on a settings change. - 1511. By Rico Tzschichholz
-
factories: Generalize "dockitem-file" loader
- 1512. By Rico Tzschichholz
-
items: Add LauncherEntry's transient-items only if allowed
Regression of r1510
- 1513. By Rico Tzschichholz
-
Add "simple and experimental" multi-dock support
Running multiple concurrent instances while using "-n|--name"
is still possible.There are no exposed GUI controls, therefore the newly added
"enabled-docks" settings-key should be used. - 1514. By Rico Tzschichholz
-
items: Add transient-items only if allowed
- 1515. By Rico Tzschichholz
-
Update NEWS
- 1516. By Rico Tzschichholz
-
po: Update translations
- 1517. By Rico Tzschichholz
-
utils: Add internal create_settings() and try_create_
settings( ) ... and make use of them where possible.
- 1518. By Rico Tzschichholz
-
utils: Add internal string_
split_combine( ) - 1519. By Rico Tzschichholz
-
utils: Add internal file_is_dockitem()
- 1520. By Rico Tzschichholz
-
settings: Allow to specify gsetting's bind-flags
- 1521. By Rico Tzschichholz
-
Follow the environment's setting whether to show notifications or not
If false, urgent-bounce and urgent-glow animations are disabled.
- 1522. By Rico Tzschichholz
-
lib: Move DockItemDrawValue and its dependencies to top-level namespace
- 1523. By Rico Tzschichholz
-
docs: Fix build
- 1524. By Rico Tzschichholz
-
controller: If the item-count has changed do a more thorough size-update
- 1525. By Rico Tzschichholz
-
positionmanager: Drop redundant call of update_regions()
- 1526. By Rico Tzschichholz
-
surfacecache: Force allow-downscale if drawing-time is insanely high
If drawing-time of a single surface exceeds a certains limit (30ms) and
"flags" is NONE then set ALLOW_DOWNSCALE to make it less demanding.Also mark the created surface, so the DockRenderer can try to ease things
out for later draw requests. - 1527. By Rico Tzschichholz
-
services: Rename internal Offsettings to EnvironmentSettings
- 1528. By Rico Tzschichholz
-
Check existence of keys in 3rd-party GSchemas before using them
Accessing a non-existing key is a fatal error for GSettings.
- 1529. By Rico Tzschichholz
-
po: Update translations
- 1530. By Rico Tzschichholz
-
prefs: Add TooltipsEnabled setting
This controls whether to show tooltips on hovering items with the cursor.
Tooltips showing up to descibe ongoing DnD-actions are not impacted.It is enabled by default.
- 1531. By Rico Tzschichholz
-
hidemanager: TOUCHPAD devices are able to perform pressure on a barrier
- 1532. By Rico Tzschichholz
-
preferenceswindow: Hide "auto-pinning" setting
- 1533. By Rico Tzschichholz
-
preferenceswindow: Hide "show-dock-item" setting
Make "show-dock-item" default to false
- 1534. By Rico Tzschichholz
-
data: Some tweaking of the default themes
- 1535. By Rico Tzschichholz
-
Update README
- 1536. By Rico Tzschichholz
-
Update NEWS
- 1537. By Rico Tzschichholz
-
Prepare 0.11.0 release
- 1538. By Rico Tzschichholz
-
Back to development
- 1539. By Rico Tzschichholz
-
system: Use DesktopAppInfo.
from_filename( ) to set desktop-filename If the filename property is not set then an empty string will be send out
via org.gtk.gio.DesktopAppI nfo rather than the proper desktop-filename
that we actually have. This is used for startup-notifications by Bamf. - 1540. By Rico Tzschichholz
-
po: Update translations
- 1541. By Rico Tzschichholz
-
dockletmanager: Only handle properly named docklet-libraries
- 1542. By Rico Tzschichholz
-
controller: Actually emmit elements_changed() to make DBusClient work
- 1543. By Rico Tzschichholz
-
vapi: Sync libbamf3.vapi with 0.5.3~bzr0+
16.04.20160322. 1-0ubuntu1 - 1544. By Rico Tzschichholz
-
applicationdock
item: Force indicator-update if running-state changed - 1545. By Rico Tzschichholz
-
applicationdock
item: Use child-* signals of Bamf.View The window-* signals are emitted too early and the internal window/xid
caches of Bamf aren't updated yet. - 1546. By Rico Tzschichholz
-
po: Update translations
- 1547. By Rico Tzschichholz
-
Prepare 0.11.1 release
- 1548. By Rico Tzschichholz
-
Back to development
- 1549. By Rico Tzschichholz
-
lib: Update symbols
- 1550. By Rico Tzschichholz
-
surface: Some minor cleaning
- 1551. By Rico Tzschichholz
-
drawing/color: Add support for HSL and some convenience functions
- 1552. By Rico Tzschichholz
-
clippy: Pass correct index in menu-item-callback
- 1553. By Rico Tzschichholz
-
clippy: text parameter of ClipboardTextRe
ceivedFunc is allowed to be null - 1554. By Rico Tzschichholz
-
po: Update translations
- 1555. By Rico Tzschichholz
-
clippy: Need to own the clipboard's content before allowed to clear it
- 1556. By Rico Tzschichholz
-
po: Update translations
- 1557. By Rico Tzschichholz
-
build: Require valac >= 0.26.0 and drop obsolete conditionals
- 1558. By Rico Tzschichholz
-
lib: Use vala's Cairo.Surface.
get/set_ device_ scale() bindings - 1559. By Rico Tzschichholz
-
vapi: Drop internal copy of x11.vapi
- 1560. By Rico Tzschichholz
-
lib: Add and enforce some file-count limits
This is just a safe-guard to prevent plank from "blowing up" if we are
about to handle an unreasonable amount of files. - 1561. By Rico Tzschichholz
-
docklets: Fill in some descriptions and not leave them blank
- 1562. By Rico Tzschichholz
-
Prepare 0.11.2 release
- 1563. By Rico Tzschichholz
-
Back to development
- 1564. By Rico Tzschichholz
-
po: Update translations
- 1565. By Rico Tzschichholz
-
Add CPUMonitor docklet
- 1566. By Rico Tzschichholz
-
po: Update translations
- 1567. By Rico Tzschichholz
-
appdata: Add some keywords and translate-url
- 1568. By Rico Tzschichholz
-
tests: Fix type mismatch
- 1569. By Rico Tzschichholz
-
clippy: Move generic-typed field initializer to construct
- 1570. By Rico Tzschichholz
-
po: Update translations
- 1571. By Rico Tzschichholz
-
surfacecache: Never clear the cache completely
- 1572. By Rico Tzschichholz
-
po: Update translations
- 1573. By Rico Tzschichholz
-
Make use of vala's native Regex support where possible
- 1574. By Rico Tzschichholz
-
WIP Wayland
Unmerged revisions
- 1574. By Rico Tzschichholz
-
WIP Wayland
Preview Diff
1 | === modified file 'lib/DockController.vala' | |||
2 | --- lib/DockController.vala 2016-03-23 19:51:11 +0000 | |||
3 | +++ lib/DockController.vala 2016-11-03 14:10:56 +0000 | |||
4 | @@ -83,6 +83,11 @@ | |||
5 | 83 | 83 | ||
6 | 84 | construct | 84 | construct |
7 | 85 | { | 85 | { |
8 | 86 | //FIXME Use some fixed settings for wayland session | ||
9 | 87 | if (environment_is_session_type (XdgSessionType.WAYLAND)) { | ||
10 | 88 | prefs.Position = Gtk.PositionType.LEFT; | ||
11 | 89 | } | ||
12 | 90 | |||
13 | 86 | launchers_folder = config_folder.get_child ("launchers"); | 91 | launchers_folder = config_folder.get_child ("launchers"); |
14 | 87 | Factory.item_factory.launchers_dir = launchers_folder; | 92 | Factory.item_factory.launchers_dir = launchers_folder; |
15 | 88 | 93 | ||
16 | 89 | 94 | ||
17 | === modified file 'lib/Factories/AbstractMain.vala' | |||
18 | --- lib/Factories/AbstractMain.vala 2016-02-25 14:17:32 +0000 | |||
19 | +++ lib/Factories/AbstractMain.vala 2016-11-03 14:10:56 +0000 | |||
20 | @@ -252,15 +252,9 @@ | |||
21 | 252 | internal_quarks_initialize (); | 252 | internal_quarks_initialize (); |
22 | 253 | environment_initialize (); | 253 | environment_initialize (); |
23 | 254 | 254 | ||
24 | 255 | // Make sure we are not doing silly things like trying to run in a wayland-session! | ||
25 | 256 | if (!environment_is_session_type (XdgSessionType.X11)) { | ||
26 | 257 | critical ("Only X11 environments are supported."); | ||
27 | 258 | quit (); | ||
28 | 259 | return; | ||
29 | 260 | } | ||
30 | 261 | |||
31 | 262 | Paths.initialize (exec_name, build_pkg_data_dir); | 255 | Paths.initialize (exec_name, build_pkg_data_dir); |
33 | 263 | WindowControl.initialize (); | 256 | if (environment_is_session_type (XdgSessionType.X11)) |
34 | 257 | WindowControl.initialize (); | ||
35 | 264 | DockletManager.get_default ().load_docklets (); | 258 | DockletManager.get_default ().load_docklets (); |
36 | 265 | 259 | ||
37 | 266 | initialize (); | 260 | initialize (); |
38 | 267 | 261 | ||
39 | === modified file 'lib/HideManager.vala' | |||
40 | --- lib/HideManager.vala 2016-03-08 22:15:30 +0000 | |||
41 | +++ lib/HideManager.vala 2016-11-03 14:10:56 +0000 | |||
42 | @@ -135,15 +135,22 @@ | |||
43 | 135 | requires (controller.window != null) | 135 | requires (controller.window != null) |
44 | 136 | { | 136 | { |
45 | 137 | unowned DockWindow window = controller.window; | 137 | unowned DockWindow window = controller.window; |
46 | 138 | unowned Wnck.Screen wnck_screen = Wnck.Screen.get_default (); | ||
47 | 139 | |||
48 | 140 | #if HAVE_BARRIERS | ||
49 | 141 | initialize_barriers_support (); | ||
50 | 142 | #endif | ||
51 | 143 | 138 | ||
52 | 144 | window.enter_notify_event.connect (handle_enter_notify_event); | 139 | window.enter_notify_event.connect (handle_enter_notify_event); |
53 | 145 | window.leave_notify_event.connect (handle_leave_notify_event); | 140 | window.leave_notify_event.connect (handle_leave_notify_event); |
54 | 146 | 141 | ||
55 | 142 | //FIXME Startup fixes for wayland session | ||
56 | 143 | if (environment_is_session_type (XdgSessionType.WAYLAND)) { | ||
57 | 144 | Hidden = false; | ||
58 | 145 | Hovered = true; | ||
59 | 146 | return; | ||
60 | 147 | } | ||
61 | 148 | |||
62 | 149 | #if HAVE_BARRIERS | ||
63 | 150 | initialize_barriers_support (); | ||
64 | 151 | #endif | ||
65 | 152 | |||
66 | 153 | unowned Wnck.Screen wnck_screen = Wnck.Screen.get_default (); | ||
67 | 147 | wnck_screen.window_opened.connect_after (schedule_update); | 154 | wnck_screen.window_opened.connect_after (schedule_update); |
68 | 148 | wnck_screen.window_closed.connect_after (schedule_update); | 155 | wnck_screen.window_closed.connect_after (schedule_update); |
69 | 149 | wnck_screen.active_window_changed.connect_after (handle_active_window_changed); | 156 | wnck_screen.active_window_changed.connect_after (handle_active_window_changed); |
70 | @@ -156,20 +163,23 @@ | |||
71 | 156 | { | 163 | { |
72 | 157 | unowned DockWindow window = controller.window; | 164 | unowned DockWindow window = controller.window; |
73 | 158 | unowned DragManager drag_manager = controller.drag_manager; | 165 | unowned DragManager drag_manager = controller.drag_manager; |
74 | 159 | unowned Wnck.Screen wnck_screen = Wnck.Screen.get_default (); | ||
75 | 160 | 166 | ||
76 | 161 | controller.prefs.notify.disconnect (prefs_changed); | 167 | controller.prefs.notify.disconnect (prefs_changed); |
77 | 162 | 168 | ||
78 | 163 | window.enter_notify_event.disconnect (handle_enter_notify_event); | 169 | window.enter_notify_event.disconnect (handle_enter_notify_event); |
79 | 164 | window.leave_notify_event.disconnect (handle_leave_notify_event); | 170 | window.leave_notify_event.disconnect (handle_leave_notify_event); |
80 | 165 | 171 | ||
81 | 172 | stop_timers (); | ||
82 | 173 | |||
83 | 174 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
84 | 175 | return; | ||
85 | 176 | |||
86 | 177 | unowned Wnck.Screen wnck_screen = Wnck.Screen.get_default (); | ||
87 | 166 | wnck_screen.window_opened.disconnect (schedule_update); | 178 | wnck_screen.window_opened.disconnect (schedule_update); |
88 | 167 | wnck_screen.window_closed.disconnect (schedule_update); | 179 | wnck_screen.window_closed.disconnect (schedule_update); |
89 | 168 | wnck_screen.active_window_changed.disconnect (handle_active_window_changed); | 180 | wnck_screen.active_window_changed.disconnect (handle_active_window_changed); |
90 | 169 | wnck_screen.active_workspace_changed.disconnect (handle_workspace_changed); | 181 | wnck_screen.active_workspace_changed.disconnect (handle_workspace_changed); |
91 | 170 | 182 | ||
92 | 171 | stop_timers (); | ||
93 | 172 | |||
94 | 173 | #if HAVE_BARRIERS | 183 | #if HAVE_BARRIERS |
95 | 174 | gdk_window_remove_filter (null, (Gdk.FilterFunc)xevent_filter); | 184 | gdk_window_remove_filter (null, (Gdk.FilterFunc)xevent_filter); |
96 | 175 | 185 | ||
97 | 176 | 186 | ||
98 | === modified file 'lib/Items/ApplicationDockItem.vala' | |||
99 | --- lib/Items/ApplicationDockItem.vala 2016-03-29 13:36:06 +0000 | |||
100 | +++ lib/Items/ApplicationDockItem.vala 2016-11-03 14:10:56 +0000 | |||
101 | @@ -294,6 +294,9 @@ | |||
102 | 294 | return; | 294 | return; |
103 | 295 | } | 295 | } |
104 | 296 | 296 | ||
105 | 297 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
106 | 298 | return; | ||
107 | 299 | |||
108 | 297 | var window_count = WindowControl.get_num_windows (App); | 300 | var window_count = WindowControl.get_num_windows (App); |
109 | 298 | 301 | ||
110 | 299 | if (window_count <= 1) { | 302 | if (window_count <= 1) { |
111 | @@ -326,12 +329,15 @@ | |||
112 | 326 | { | 329 | { |
113 | 327 | if (!is_window ()) | 330 | if (!is_window ()) |
114 | 328 | if (button == PopupButton.MIDDLE | 331 | if (button == PopupButton.MIDDLE |
116 | 329 | || (button == PopupButton.LEFT && (App == null || WindowControl.get_num_windows (App) == 0 | 332 | || (button == PopupButton.LEFT && (!is_running () |
117 | 330 | || (mod & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK))) { | 333 | || (mod & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK))) { |
118 | 331 | launch (); | 334 | launch (); |
119 | 332 | return AnimationType.BOUNCE; | 335 | return AnimationType.BOUNCE; |
120 | 333 | } | 336 | } |
121 | 334 | 337 | ||
122 | 338 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
123 | 339 | return AnimationType.NONE; | ||
124 | 340 | |||
125 | 335 | if (button == PopupButton.LEFT && App != null && WindowControl.get_num_windows (App) > 0) { | 341 | if (button == PopupButton.LEFT && App != null && WindowControl.get_num_windows (App) > 0) { |
126 | 336 | WindowControl.smart_focus (App, event_time); | 342 | WindowControl.smart_focus (App, event_time); |
127 | 337 | return AnimationType.DARKEN; | 343 | return AnimationType.DARKEN; |
128 | @@ -345,7 +351,7 @@ | |||
129 | 345 | */ | 351 | */ |
130 | 346 | protected override AnimationType on_scrolled (Gdk.ScrollDirection direction, Gdk.ModifierType mod, uint32 event_time) | 352 | protected override AnimationType on_scrolled (Gdk.ScrollDirection direction, Gdk.ModifierType mod, uint32 event_time) |
131 | 347 | { | 353 | { |
133 | 348 | if (App == null || WindowControl.get_num_windows (App) == 0) | 354 | if (!is_running ()) |
134 | 349 | return AnimationType.NONE; | 355 | return AnimationType.NONE; |
135 | 350 | 356 | ||
136 | 351 | if (GLib.get_monotonic_time () - LastScrolled < ITEM_SCROLL_DURATION * 1000) | 357 | if (GLib.get_monotonic_time () - LastScrolled < ITEM_SCROLL_DURATION * 1000) |
137 | @@ -353,6 +359,9 @@ | |||
138 | 353 | 359 | ||
139 | 354 | LastScrolled = GLib.get_monotonic_time (); | 360 | LastScrolled = GLib.get_monotonic_time (); |
140 | 355 | 361 | ||
141 | 362 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
142 | 363 | return AnimationType.NONE; | ||
143 | 364 | |||
144 | 356 | if (direction == Gdk.ScrollDirection.UP || direction == Gdk.ScrollDirection.LEFT) | 365 | if (direction == Gdk.ScrollDirection.UP || direction == Gdk.ScrollDirection.LEFT) |
145 | 357 | WindowControl.focus_previous (App, event_time); | 366 | WindowControl.focus_previous (App, event_time); |
146 | 358 | else | 367 | else |
147 | @@ -421,7 +430,8 @@ | |||
148 | 421 | } | 430 | } |
149 | 422 | 431 | ||
150 | 423 | var event_time = Gtk.get_current_event_time (); | 432 | var event_time = Gtk.get_current_event_time (); |
152 | 424 | if (is_running () && window_count > 0) { | 433 | if (is_running () && window_count > 0 |
153 | 434 | && environment_is_session_type (XdgSessionType.X11)) { | ||
154 | 425 | var item = create_menu_item ((window_count > 1 ? _("_Close All") : _("_Close")), "window-close-symbolic;;window-close"); | 435 | var item = create_menu_item ((window_count > 1 ? _("_Close All") : _("_Close")), "window-close-symbolic;;window-close"); |
155 | 426 | item.activate.connect (() => WindowControl.close_all (App, event_time)); | 436 | item.activate.connect (() => WindowControl.close_all (App, event_time)); |
156 | 427 | items.add (item); | 437 | items.add (item); |
157 | @@ -468,7 +478,9 @@ | |||
158 | 468 | continue; | 478 | continue; |
159 | 469 | 479 | ||
160 | 470 | Gtk.MenuItem window_item; | 480 | Gtk.MenuItem window_item; |
162 | 471 | var pbuf = WindowControl.get_window_icon (window); | 481 | Gdk.Pixbuf? pbuf = null; |
163 | 482 | if (environment_is_session_type (XdgSessionType.X11)) | ||
164 | 483 | pbuf = WindowControl.get_window_icon (window); | ||
165 | 472 | var window_name = window.get_name (); | 484 | var window_name = window.get_name (); |
166 | 473 | window_name = shorten_window_name (window_name); | 485 | window_name = shorten_window_name (window_name); |
167 | 474 | 486 | ||
168 | @@ -479,7 +491,7 @@ | |||
169 | 479 | 491 | ||
170 | 480 | if (window.is_active ()) | 492 | if (window.is_active ()) |
171 | 481 | window_item.set_sensitive (false); | 493 | window_item.set_sensitive (false); |
173 | 482 | else | 494 | else if (environment_is_session_type (XdgSessionType.X11)) |
174 | 483 | window_item.activate.connect (() => WindowControl.focus_window (window, event_time)); | 495 | window_item.activate.connect (() => WindowControl.focus_window (window, event_time)); |
175 | 484 | 496 | ||
176 | 485 | items.add (window_item); | 497 | items.add (window_item); |
177 | 486 | 498 | ||
178 | === modified file 'lib/Items/ApplicationDockItemProvider.vala' | |||
179 | --- lib/Items/ApplicationDockItemProvider.vala 2016-02-22 18:53:22 +0000 | |||
180 | +++ lib/Items/ApplicationDockItemProvider.vala 2016-11-03 14:10:56 +0000 | |||
181 | @@ -195,6 +195,9 @@ | |||
182 | 195 | 195 | ||
183 | 196 | protected virtual void app_opened (Bamf.Application app) | 196 | protected virtual void app_opened (Bamf.Application app) |
184 | 197 | { | 197 | { |
185 | 198 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
186 | 199 | return; | ||
187 | 200 | |||
188 | 198 | // Make sure internal window-list of Wnck is most up to date | 201 | // Make sure internal window-list of Wnck is most up to date |
189 | 199 | Wnck.Screen.get_default ().force_update (); | 202 | Wnck.Screen.get_default ().force_update (); |
190 | 200 | 203 | ||
191 | 201 | 204 | ||
192 | === modified file 'lib/Items/DefaultApplicationDockItemProvider.vala' | |||
193 | --- lib/Items/DefaultApplicationDockItemProvider.vala 2016-02-22 10:55:51 +0000 | |||
194 | +++ lib/Items/DefaultApplicationDockItemProvider.vala 2016-11-03 14:10:56 +0000 | |||
195 | @@ -62,7 +62,7 @@ | |||
196 | 62 | { | 62 | { |
197 | 63 | Logger.verbose ("DefaultDockItemProvider.update_visible_items ()"); | 63 | Logger.verbose ("DefaultDockItemProvider.update_visible_items ()"); |
198 | 64 | 64 | ||
200 | 65 | if (Prefs.CurrentWorkspaceOnly) { | 65 | if (environment_is_session_type (XdgSessionType.X11) && Prefs.CurrentWorkspaceOnly) { |
201 | 66 | unowned Wnck.Workspace? active_workspace = Wnck.Screen.get_default ().get_active_workspace (); | 66 | unowned Wnck.Workspace? active_workspace = Wnck.Screen.get_default ().get_active_workspace (); |
202 | 67 | foreach (var item in internal_elements) { | 67 | foreach (var item in internal_elements) { |
203 | 68 | unowned TransientDockItem? transient = (item as TransientDockItem); | 68 | unowned TransientDockItem? transient = (item as TransientDockItem); |
204 | @@ -121,6 +121,9 @@ | |||
205 | 121 | 121 | ||
206 | 122 | void connect_wnck () | 122 | void connect_wnck () |
207 | 123 | { | 123 | { |
208 | 124 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
209 | 125 | return; | ||
210 | 126 | |||
211 | 124 | unowned Wnck.Screen screen = Wnck.Screen.get_default (); | 127 | unowned Wnck.Screen screen = Wnck.Screen.get_default (); |
212 | 125 | 128 | ||
213 | 126 | screen.active_window_changed.connect_after (handle_window_changed); | 129 | screen.active_window_changed.connect_after (handle_window_changed); |
214 | @@ -130,6 +133,9 @@ | |||
215 | 130 | 133 | ||
216 | 131 | void disconnect_wnck () | 134 | void disconnect_wnck () |
217 | 132 | { | 135 | { |
218 | 136 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
219 | 137 | return; | ||
220 | 138 | |||
221 | 133 | unowned Wnck.Screen screen = Wnck.Screen.get_default (); | 139 | unowned Wnck.Screen screen = Wnck.Screen.get_default (); |
222 | 134 | 140 | ||
223 | 135 | screen.active_window_changed.disconnect (handle_window_changed); | 141 | screen.active_window_changed.disconnect (handle_window_changed); |
224 | 136 | 142 | ||
225 | === modified file 'lib/Items/TransientDockItem.vala' | |||
226 | --- lib/Items/TransientDockItem.vala 2015-11-03 10:37:19 +0000 | |||
227 | +++ lib/Items/TransientDockItem.vala 2016-11-03 14:10:56 +0000 | |||
228 | @@ -69,6 +69,9 @@ | |||
229 | 69 | 69 | ||
230 | 70 | void update_forced_pixbuf () | 70 | void update_forced_pixbuf () |
231 | 71 | { | 71 | { |
232 | 72 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
233 | 73 | return; | ||
234 | 74 | |||
235 | 72 | if (delayed_update_timer_id > 0U) | 75 | if (delayed_update_timer_id > 0U) |
236 | 73 | return; | 76 | return; |
237 | 74 | 77 | ||
238 | 75 | 78 | ||
239 | === modified file 'lib/Widgets/CompositedWindow.vala' | |||
240 | --- lib/Widgets/CompositedWindow.vala 2015-11-03 10:37:19 +0000 | |||
241 | +++ lib/Widgets/CompositedWindow.vala 2016-11-03 14:10:56 +0000 | |||
242 | @@ -40,6 +40,10 @@ | |||
243 | 40 | app_paintable = true; | 40 | app_paintable = true; |
244 | 41 | decorated = false; | 41 | decorated = false; |
245 | 42 | resizable = false; | 42 | resizable = false; |
246 | 43 | |||
247 | 44 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
248 | 45 | return; | ||
249 | 46 | |||
250 | 43 | double_buffered = false; | 47 | double_buffered = false; |
251 | 44 | 48 | ||
252 | 45 | unowned Gdk.Screen screen = get_screen (); | 49 | unowned Gdk.Screen screen = get_screen (); |
253 | 46 | 50 | ||
254 | === modified file 'lib/Widgets/DockWindow.vala' | |||
255 | --- lib/Widgets/DockWindow.vala 2016-03-04 15:54:48 +0000 | |||
256 | +++ lib/Widgets/DockWindow.vala 2016-11-03 14:10:56 +0000 | |||
257 | @@ -536,6 +536,9 @@ | |||
258 | 536 | */ | 536 | */ |
259 | 537 | public void update_icon_regions () | 537 | public void update_icon_regions () |
260 | 538 | { | 538 | { |
261 | 539 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
262 | 540 | return; | ||
263 | 541 | |||
264 | 539 | Logger.verbose ("DockWindow.update_icon_regions ()"); | 542 | Logger.verbose ("DockWindow.update_icon_regions ()"); |
265 | 540 | 543 | ||
266 | 541 | var use_hidden_region = (menu_is_visible () || controller.hide_manager.Hidden); | 544 | var use_hidden_region = (menu_is_visible () || controller.hide_manager.Hidden); |
267 | @@ -557,6 +560,9 @@ | |||
268 | 557 | */ | 560 | */ |
269 | 558 | public void update_icon_region (ApplicationDockItem appitem) | 561 | public void update_icon_region (ApplicationDockItem appitem) |
270 | 559 | { | 562 | { |
271 | 563 | if (!environment_is_session_type (XdgSessionType.X11)) | ||
272 | 564 | return; | ||
273 | 565 | |||
274 | 560 | if (!appitem.is_running ()) | 566 | if (!appitem.is_running ()) |
275 | 561 | return; | 567 | return; |
276 | 562 | 568 |