#include <libweston/config-parser.h>
#include <libweston/libweston.h>
-#include <libweston-desktop/libweston-desktop.h>
+#include <libweston/desktop.h>
#include "agl-shell-desktop-server-protocol.h"
return;
}
- if (surf->sticky && surf->role == IVI_SURFACE_ROLE_TILE) {
+ if (surf->sticky && surf->role == IVI_SURFACE_ROLE_TILE && output->active == surf) {
weston_log("Application %s is already active on output %s (split role)\n",
app_id, output->output->name);
return;
/* the background surface is already "maximized" so we don't need to
* add to the hidden layer */
- if (surf->role == IVI_SURFACE_ROLE_BACKGROUND) {
+ if (surf->role == IVI_SURFACE_ROLE_BACKGROUND &&
+ output->active->role != IVI_SURFACE_ROLE_TILE) {
ivi_layout_activate_complete(output, surf);
return;
}