Commit Graph

83 Commits

Author SHA1 Message Date
Sebastian Dransfeld 35fea59e2d conf_randr: redo randr dialog to trust e_randr_cfg
Prevously conf_randr worked directly against ecore_x_randr. Now we
rather modify e_randr_cfg, and use e_randr to apply changes against
ecore_x_randr.
2014-03-06 15:18:15 +01:00
Sebastian Dransfeld 77ea4d2256 conf_randr: remove clone support
Clone isn't well supported in base randr config. Remove until it is.
2014-03-06 15:18:15 +01:00
Chris Michael 6d3751a620 Remove duplicated local variable.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-02 11:36:52 +01:00
Chris Michael c48e7d21ce When we have finished creating all monitors, if there is only One
monitor existing, then disable the ability to toggle the indicator.

NB: This is for silly people who (for whatever reason) decide that
it's a good idea to try and turn off their Only monitor.

NB: Fixes Phab Ticket T257

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-02 11:07:52 +01:00
Chris Michael e2cf7d3485 Handle case of snapping for monitor being moved.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-01 08:58:37 +01:00
Chris Michael 3f2e850259 Big giant Monitor Snapping Fix when we resize or move !! ;)
- Add previous monitor geometry to smart data structure.
- When we set the crtc, also set the monitor current geometry.
- Add function to return the previous monitor geometry.
- On a mouse up, check for monitor location difference versus previous
geometry, if nothing changed then we have no 'move' to do.
- When we start a resize, record the previous geometry and raise the
monitor.
- When a monitor is moved/resized we call the position_update function
which already loops all monitors, so no need to loop them twice.
- Fix position_update function to allow some Snapping Fuzziness so
that on a move/resize any adjoining monitors (within tolerance) will
more reliably snap to each other.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-01 08:25:09 +01:00
Chris Michael b0e360599b Implement rudamentary monitor snapping after move.
After a monitor has been moved, snap it to the closest monitor.

NB: This should fix cases where a monitor could not be positioned next
to another monitor which had a resolution of 1368. Previously, the
second monitor could only move to 1366 due to a rounding issue when
converting coordinates to virtual. Now, the second monitor (when
finished moving) will Snap to the proper position.

NB: (Currently) In order for the snapping to work, either the
monitors' X axis or Y axis must be equal. Ideally, this should be
fixed to allow for some percentage of position flexibility.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-31 10:52:06 +01:00
Chris Michael fa9104b305 bugfix T86: If an output does not have a crtc, find a possible one. If
it has no mode set yet, then we try to get the preferred mode. If that
fails we will try the crtc size, if That fails we will fallback to a
safe 640x480. When getting preferred size, if the output does not
specifiy a preferred mode (but does list availabe modes), then we will
assume the largest size.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-27 10:57:36 +01:00
Chris Michael 1b76632915 Add suport for setting the Primary Output in the randr dialog....for
my German friend ;)

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-24 13:05:41 +01:00
Chris Michael a019ffb7ac Fix another memleak reported by klockwork.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-20 10:31:01 +01:00
Chris Michael 10acf59475 Fix potential memleaks reported by klockwork.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-20 10:31:01 +01:00
Chris Michael 2babd46029 printf--
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-19 12:48:54 +01:00
Chris Michael dc3c16c4a5 Fix randr dialog to display monitors that are disabled.
Add function to get a monitor's preferred mode size.
Add function to find any clones of a monitor.
Add function to find a valid crtc for an output

NB: Raster, this should fix your reported problem ;)

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-19 12:44:26 +01:00
Chris Michael 723825e49e If a crtc has no outputs, then skip it.
This fixes an issue where "monitors" would be created with only a stand.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-03-20 13:41:48 +00:00
Christopher Michael ce6ed08611 Hook into monitor_resized callback and update adjacent monitor positions.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84234
2013-02-19 11:01:31 +00:00
Christopher Michael 1860beba5a Add monitor_moved callback and update position (if needed).
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84230
2013-02-19 11:01:21 +00:00
Christopher Michael 1f51f97259 Add randr_changed function.
Add function to apply changes.
Add callback hook for monitor(s) changed.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84216
2013-02-19 10:59:55 +00:00
Christopher Michael eec7305dfc Update some comments.
Add code to create any clones on initial startup.
Add function to find a monitor object based on crtc.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84211
2013-02-19 10:59:41 +00:00
Christopher Michael 132719c2b6 Correctly calculate disabled monitor position(s).
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84202
2013-02-19 10:59:17 +00:00
Christopher Michael a9cd2aaa02 Remove unused variable and some dead printfs.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84199
2013-02-19 10:59:08 +00:00
Christopher Michael a9f1783e5f When calculating virtual size, also account for 'possible' outputs.
When we are creating the monitors, account for 'possible' outputs also.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84198
2013-02-19 10:59:06 +00:00
Christopher Michael 87ef25f21b When calculating virtual size, we only need to fetch
"screen_current_size_get" if both vw & vh are 0.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84192
2013-02-19 10:58:48 +00:00
Christopher Michael 1f63b0f062 Remove dead comments about layout object.
Add grid object to structure.
Add callbacks to handle when grid gets moved or resized so we can
update the monitor's copy of the grid geometry.
Update calls to monitor_grid_set to pass in geometry now.
Add monitor_virtual_size_set call.
Add code to deal with grid getting moved & resized.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84171
2013-02-19 10:57:47 +00:00
Christopher Michael b5f6ae6d0d Fix comment.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84163
2013-02-19 10:57:24 +00:00
Christopher Michael 353df08f07 Also pass in crtc geometry to the monitor when we set crtc (because we
have previously fetched this geometry anyway).

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84160
2013-02-19 10:57:14 +00:00
Christopher Michael ad6d6914bc Pack the monitor into the grid first, then do setup.
Add function call to setup initial background preview.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84155
2013-02-19 10:57:01 +00:00
Christopher Michael 6ca0528ef0 Remove function call to monitor_virtual_size_set.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84152
2013-02-19 10:56:51 +00:00
Christopher Michael 70380b6125 Add base & grid object to randr widget.
Use ecore_x_randr functions to get crtcs & outputs (Fixes problem of
running Screen Setup dialog in Xephyr)
Add code for min_size_get function.
Remove code which used e_layout widget.
Add code to create new randr widget based on evas_object_grid.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84150
2013-02-19 10:56:45 +00:00
Christopher Michael c508e28128 Add LOGFN to functions.
Append newly created monitor(s) to our list.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84142
2013-02-19 10:56:24 +00:00
Christopher Michael db406167dc Add prototype and code for virtual_size_calc function.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84139
2013-02-19 10:56:14 +00:00
Christopher Michael 8fecfa5054 Use proper width/height variables from crtc_config.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84136
2013-02-19 10:56:05 +00:00
Christopher Michael 87a3d1da9b Move and resize the monitor after packing to it's proper position.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84135
2013-02-19 10:56:02 +00:00
Christopher Michael 6747badc99 Pack the created monitor into the layout widget.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84134
2013-02-19 10:55:59 +00:00
Christopher Michael 69b12661d5 Start code for monitors create
- Create monitor smart object
 - Set crtc and output config for monitor.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84131
2013-02-19 10:55:50 +00:00
Christopher Michael 6b1168b933 Add list of monitors to smart_data structure.
Add code to delete the monitors when randr gets deleted.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84128
2013-02-19 10:55:39 +00:00
Christopher Michael 468998fca6 Add initial start of code to create monitors.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84127
2013-02-19 10:55:36 +00:00
Christopher Michael 6b96e9c961 Add code to handle the layout object.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84119
2013-02-19 10:55:14 +00:00
Christopher Michael fbb5baea84 Initial rewrite of randr widget.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84116
2013-02-19 10:55:04 +00:00
Christopher Michael 0410b43549 Remove old randr widget code.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84113
2013-02-19 10:54:55 +00:00
Christopher Michael 39e9f03048 No need to convert frame geometry to virtual...we can just compare
actual canvas geometry when doing collision detection.

Port the previous "JackDanielz" fix (using frame geometry vs using
object geometry) to the actual move function also.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 82868
2013-01-16 09:01:30 +00:00
Christopher Michael 4a49bf8b05 When moving monitors around, use the geometry of the monitor frame to
determine collision/intersection for cloning reasons (needed due to
monitor object itself having some padding around the frame which was
causing erroneous intersection calculations).

NB: Calling this one the JackDanielZ fix ;)

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 82867
2013-01-16 08:41:48 +00:00
Christopher Michael 11ab438c80 When we create monitors and are checking for clones, just use x/y
position, not size for comparison.

When we create monitors, assign the proper crtc to the monitor.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 82330
2013-01-07 07:39:57 +00:00
Christopher Michael 4fadc7bf7f When we initially create the monitors, also set the original cloned
value.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 82326
2013-01-07 07:39:47 +00:00
Mike Blumenkrantz 580b884d41 fix uninitialized var in randr config dialog which potentially broke initial monitor layout
SVN revision: 81593
2012-12-21 21:35:17 +00:00
Christopher Michael 829558db50 Fix randr widget applying settings as per discussion with T_UNIX.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81376
2012-12-19 15:39:47 +00:00
Christopher Michael be20b9d15d Add some debugging for disabled monitors.
If we are trying to add a disabled monitor, check for possible outputs.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81368
2012-12-19 14:21:50 +00:00
Christopher Michael 7829e00b45 Comment out some debugging printfs.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81351
2012-12-19 11:04:35 +00:00
Christopher Michael 58ef1a0190 Remove root window as function parameter for apply function (not used
anymore).

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81263
2012-12-18 15:16:49 +00:00
Christopher Michael 817207bad1 Be more proactive when we create monitors:
If during the process of monitor creation, we reach one that is
  cloned into a parent monitor, but the parent monitor has not been
  created yet, then add it to a deferred list so we can create it (and
  swallow it) into the parent monitor.

Make use of the existing e randr serialization to save/restore settings.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81255
2012-12-18 14:16:12 +00:00
Carsten Haitzler 92380c140d nth from eina list returns data. .not list node...
SVN revision: 81153
2012-12-17 15:31:36 +00:00