Commit Graph

75 Commits

Author SHA1 Message Date
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
Christopher Michael 30484c09cf Fix TODO note for recent Enable/Disable commit.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81149
2012-12-17 14:29:02 +00:00
Christopher Michael 507e6a25fb Fetch all current monitor values once (rather than a fetch for each
change).
Add code to apply Disabled/Enabled state.

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

SVN revision: 81140
2012-12-17 13:42:15 +00:00
Christopher Michael 059d1139fe Provide method to compute a proper layout size (needed for case of
blank config).

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

SVN revision: 81135
2012-12-17 12:55:35 +00:00
Christopher Michael e49d7dcad2 Remove blank line.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81132
2012-12-17 12:55:27 +00:00
Christopher Michael 54267c8ad8 Remove dead comment.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81131
2012-12-17 12:55:22 +00:00
Christopher Michael 91ddccec87 Fix monitor clone position for the case of "initial blank setup"
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81114
2012-12-17 10:22:01 +00:00
Christopher Michael 9ec140a681 Add code to start working with no previous config and nothing
specified in xorg (ie: blank setup). We will detect (manually) what is
cloned and setup accordingly. (NB: Still needs work).
Add function to find a monitor based on crtc id (used for blank setup
clones).

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

SVN revision: 81111
2012-12-17 09:21:08 +00:00
Christopher Michael a3cf759911 Add function to randr widget to return the best layout size.
Modify widget creation to use randr layout size function:
  NB: Needed because we cannot rely on E_RANDR_12->current_size to
provide us with something usable.

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

SVN revision: 81108
2012-12-17 09:20:59 +00:00