Commit Graph

291 Commits

Author SHA1 Message Date
Mike Blumenkrantz 63b7111a1f make client placement eval not dependent on new_client flag
this should just run if placed is not set for a valid window
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 2f6f31f2a7 add client hook for UNIGNORE
UNIGNORE is the hook to watch for wl clients as they are added; the
ignore mechanism prevents most of the compositor from processing
clients. this is a stupid method from an api perspective since it's
different in x11 and wl, so it should probably be improved on in the future
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 25240fb86d future-proof client hook inlist initialization
manually initializing this meant it needed to be kept in sync with the
header, something that I'm unlikely to check every time client hooks are
added/removed
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 51782fd5ee Revert "e - wayland - fix double-resize if e wants a different initial size"
This reverts commit e1c3120689.

this commit revealed a number of issues with the xdg6 implementation related
to unconfigured buffer management: see subsequent patches for a less
sledgehammer-y solution

ref 5497fadce4
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 12655becaa ref clients during exe_inst deletion to avoid invalid access after free
in the case where clients are deleted during the same loop that they are
added to an exe_inst, the client will be destroyed before the instance's
delete event returns

ref T4963
2017-02-10 17:24:13 -05:00
Carsten Haitzler e1c3120689 e - wayland - fix double-resize if e wants a different initial size
let's say you sue tiling or some module and it wants a window by
default to maximize or fill the screen or be size XxY ... this stops
the client first having a buffer smaller (or larger) and then sizing
down rendering 2 times (one of the renders is pointless). this makes
initial buffer render/show seamless as it should be in wayland.
2017-02-10 19:23:43 +09:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Carsten Haitzler 3f2ea65112 e window stakcs - fix bugs with stacks by doing stack stuff in idle eval
this moves ensuring windows are centered on their parent even when
moved etc. for stack (and move the whole stack not just the specific
window) in the idle enterer int he pahse before all the client evals
take place. much cleaner!
2017-01-18 18:51:30 +09:00
Mike Blumenkrantz df414cef65 do not perform frame coord adjustments for re_manage wayland clients
prevent mismatch of positions between restarts
2017-01-13 11:35:20 -05:00
Mike Blumenkrantz d1bb23954f break out code to set clients as transients for a parent 2017-01-13 11:33:36 -05:00
Mike Blumenkrantz ec96143327 resolve client float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:34 -05:00
Carsten Haitzler e9de31249a stacks - fix crash for pointer warp when client is null 2016-12-16 19:03:21 +09:00
Carsten Haitzler c6fa2f6457 tasks - add stack "hiding" support and only show top stack item
this makes tasks behave like you'd expect with a stack - only show the
top one and track properly. tasks was simple and easiest to do first
as it has little fluff other than the tasks logic itself. other
elements of e next...
2016-12-16 18:59:56 +09:00
Carsten Haitzler 5c38609e0e client handling - add support for window stacks needed for views/manager
this adds core basic handling for window stacks where windows behave
correctly as a single unified stack something like what naviframe does
but out-of-window so you can including multiple processes. only on x11
right now as it's being supported/worked on.

as we dont plan to kepe naviframe in future, this is the way to go.
naviframe "pages" will be windows in a stack. the wm should do the
nice thing. in e this will be very nice. for now elsewhere we use
transient_for so a wm would treat this like a bunch of dialogs with a
single parent window. i guess in a desktop thats probably what you
might expect. e will be a little more "finesse" filled.

need to make ibar, tasks,m win menu and winlist (alt-tab) respect this
and only show the top member of a stack.

need to send messages to clients when they are "top" or "middle" or
"bottom" or "alone" in the stack or something so decorations can change.

should add soem new border signals in theme (for both SSD and CSD) to
make this look nice. will need some config additions for that and
ability for e comp to do the right thing

but this is a solid start
2016-12-16 16:17:10 +09:00
Mike Blumenkrantz e62423603a correctly set E_POINTER_RESIZE_BR mode for client keyboard resizing
typo from when this was refactored

fix T2452, T2579
2016-12-13 11:10:13 -05:00
Mike Blumenkrantz 647e998b72 do not pop pointer types on client hide events if the client is pass_events
these clients cannot receive events and thus have no pointer to pop
2016-12-02 10:54:06 -05:00
Mike Blumenkrantz 8f8b25ae7d make fake mouse-out upon focus-out conditional on pending pointer warp
in the case where warping would not occur and a mouse-based focus policy was
not in use, this would break mouse eventing on wayland when a window lost focus
but the cursor remained inside the window

ref 3e6d6b348f
2016-11-22 11:31:22 -05:00
Mike Blumenkrantz 4e08ad17e8 add bool return for e_exec_phony_del() to return deletion success
CID 1181927
2016-11-02 10:11:02 -04:00
Mike Blumenkrantz 420b54a151 optimize out re-applying of borderless client theme 2016-10-28 10:36:21 -04:00
Mike Blumenkrantz c6b091980a allow client frame changes when switching from frame -> no frame
fix T4358
2016-10-28 10:19:01 -04:00
Michaël Bouchaud (yoz) 06ea6cadbd E_Client: add an abstraction api to control volume by app
This api give the possibility to add sink to an E_Client and control the volume
or the mute state of the sinks associated with this E_Client.

@features
2016-10-27 21:54:39 +02:00
Mike Blumenkrantz e20b439020 handle "unmaximize" smart callback differently depending on fullscreen state
this is a bit hacky, but it seems to provide accurate results to fix more maximize bugs

ref c29157189f
2016-10-04 09:22:05 -04:00
Derek Foreman 494f76b0ab Don't kill self during shutdown
When Xwayland is running we end up with a client with the same pid
as the compositor in the client list.  We need to avoid killing that
client, as it will interrupt the proper shutdown procedure.

fix T4439
2016-09-21 16:45:57 -05:00
Mike Blumenkrantz c29157189f move 'unmaximize' smart callback to after geom calc in client_unmaximize
fixes some cases where geometry wouldn't be accurately calculated, such as when
fullscreening a flash video in a browser
2016-09-14 10:31:02 -04:00
Mike Blumenkrantz 22aa63c4a3 Revert "do not change E_Client->saved values during maximize if need_maximize is set"
This reverts commit 9a9c09f514.

a better solution should be found at some point since this is broken in x11 too
2016-06-22 13:31:50 -04:00
Mike Blumenkrantz 9a9c09f514 do not change E_Client->saved values during maximize if need_maximize is set
this is indicative of a deferred maximize, so don't re-set it and screw up
previously-set values
2016-06-20 16:04:10 -04:00
Mike Blumenkrantz 6b081d1d44 do not mouse-out of clients on focus out when focusing a popup
popups are transient in nature and do not interfere with mouse-based focus
policies

ref 3e6d6b348f
2016-06-16 14:48:51 -04:00
Mike Blumenkrantz 0e416648df optimize e_client_res_change_geometry_restore()
performing the entire unfullscreen/unmaximize routine causes a significant
amount of overhead, and it also breaks window geometries in wayland due to
synchronization
2016-06-07 11:24:27 -04:00
Mike Blumenkrantz 492f9bcf4e unset comp_grabbed flag before action client compositor ungrab
this flag was blocking accurate event propagation in some cases
2016-06-01 13:11:20 -04:00
Mike Blumenkrantz 3e7f8284cd set x11 maximized window hint correctly on resize end
fix T3702
2016-05-27 12:15:26 -04:00
Mike Blumenkrantz ec9a888fcf more tweaks for manual window placement in client eval 2016-05-13 11:38:17 -04:00
Mike Blumenkrantz 685aafcd41 prevent double emission of E_EVENT_CLIENT_SHOW 2016-05-13 11:28:27 -04:00
Mike Blumenkrantz 030d083c73 ensure that client eval correctly handles retries on visibility-pending clients
ref 2854352bc8
fix T3636
2016-05-13 11:24:08 -04:00
Mike Blumenkrantz 2854352bc8 adjust some client eval parts to make manual placement work again
activating the window_move action doesn't require the client to successfully
be shown, and failing this check would cause the window_move action to be
deleted until the next restart
2016-05-12 12:05:59 -04:00
Mike Blumenkrantz 16797009c0 ensure child windows are placed on screen
when centering a child over its parent, checks were not made to ensure that
by centering the child it had not gone offscreen
2016-05-10 12:13:12 -04:00
Mike Blumenkrantz ef1772b8cb implement wl client session recovery
another small feature patch brought to you by insomnia

 #SamsungFeatures
2016-05-05 15:47:55 -04:00
Mike Blumenkrantz 4639062133 uninitialized vars in e_client_maximize_geometry_get()
CID 1354989, 1354990
2016-05-05 09:35:51 -04:00
Mike Blumenkrantz 20f1aa8727 feed mouse up events to internal wins before mouse out during action exec
ref 609276e12d

fix T3347
2016-04-28 12:00:17 -04:00
Eduardo Lima (Etrunko) 8acbf5d013 Fix warnings about uninitialized use of variables
src/bin/e_zone.c: In function ‘_e_zone_useful_geometry_calc’:
src/bin/e_zone.c:1272:14: warning: ‘geom.h’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (h) *h = geom.h;
              ^
src/bin/e_zone.c:1271:14: warning: ‘geom.w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (w) *w = geom.w;
              ^
src/bin/e_zone.c:1270:23: warning: ‘geom.y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (y) *y = geom.y + zy;
                       ^
src/bin/e_zone.c:1269:23: warning: ‘geom.x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (x) *x = geom.x + zx;
                       ^
src/bin/e_client.c: In function ‘e_client_maximize_geometry_get’:
src/bin/e_client.c:3754:16: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (my) *my = y;
                ^
src/bin/e_client.c:3753:16: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (mx) *mx = x;
                ^
src/bin/e_client.c: In function ‘e_client_fullscreen’:
src/bin/e_client.c:4032:21: warning: ‘h’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         ec->saved.h = h;
                     ^
src/bin/e_client.c:4031:21: warning: ‘w’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         ec->saved.w = w;
                     ^
src/bin/e_client.c:4030:21: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         ec->saved.y = y;
                     ^
src/bin/e_client.c:4029:21: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         ec->saved.x = x;
                     ^
Signed-off-by: Eduardo Lima (Etrunko) <eblima@gmail.com>
2016-04-25 19:40:42 -03:00
Mike Blumenkrantz 2014de2fe6 Revert "do not revert client focus except for normal and dialog windows"
This reverts commit 5b119d437a.

I give this solution a B- for working but also totally ruining everything
2016-04-22 14:47:35 -04:00
Mike Blumenkrantz 5b119d437a do not revert client focus except for normal and dialog windows
fix T3432
2016-04-22 13:15:33 -04:00
Mike Blumenkrantz 5c0729221e only set "dialog" border for transient clients if window type is unset
fix T3157

from https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html :
_NET_WM_WINDOW_TYPE_DIALOG indicates that this is a dialog window.
If _NET_WM_WINDOW_TYPE is not set, then managed windows with
WM_TRANSIENT_FOR set MUST be taken as this type
2016-04-22 12:51:12 -04:00
Mike Blumenkrantz 4cbf81b1e8 add E_Client->saved.frame to handle mismatched csd states
if csd exists in only one of (before || after) a maximize/fullscreen,
this provides info so that the right size can be used when restoring
geometry

...again
2016-04-11 14:28:31 -04:00
Mike Blumenkrantz 6df8f5a806 Revert "do not update client saved states during maximize if client is animating"
This reverts commit 227776985e.

impossible case, too much wayland
2016-04-08 17:23:06 -04:00
Mike Blumenkrantz 4c6a4ea4ce track client maximize animation agents, delete upon beginning new animation
fixes an issue where unmaximize+maximize chaining would break client sizing
2016-04-08 16:45:56 -04:00
Mike Blumenkrantz cfca88bc95 simplify maximize animation re:maximize_override unsetting on no-animate 2016-04-08 16:43:46 -04:00
Mike Blumenkrantz 98934fb0e9 make (un)maximize_pre callbacks capable of rejecting the maximize operation
this is useful when subsystems need to know that a client wants to maximize
but need to delay that maximize for a later point
2016-04-08 16:07:40 -04:00
Mike Blumenkrantz a7adf21c88 add E_Client->maximize_anims_disabled to selectively disable maximize anims
for some clients it's impossible to animate resizing due to various race conditions
being created which will break the client
2016-04-08 16:01:55 -04:00
Mike Blumenkrantz b4b682cd6a make a number of client functions take const E_Client* 2016-04-08 15:57:21 -04:00
Mike Blumenkrantz 8d56ff3eec break out client maximize/unmaximize calc functions into preview functions
these enable "previewing" a client's size after toggling the maximize state,
not accounting for any csd or ssd sizing changes
2016-04-08 15:55:27 -04:00