Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: kcontrol/displayconfig/displayconfig.cpp
- ===================================================================
- --- kcontrol/displayconfig/displayconfig.cpp (revision 1251243)
- +++ kcontrol/displayconfig/displayconfig.cpp (working copy)
- @@ -614,14 +614,18 @@
- void KDisplayConfig::moveMonitor(DraggableMonitor* monitor, int realx, int realy) {
- int i;
- int j;
- + bool primary_found;
- DraggableMonitor *primary_monitor;
- SingleScreenData *screendata;
- // Find the primary monitor
- + primary_found = false;
- for (i=0;i<numberOfScreens;i++) {
- screendata = m_screenInfoArray.at(i);
- - if (screendata->is_primary)
- + if (screendata->is_primary) {
- j=i;
- + primary_found = true;
- + }
- }
- TQObjectList monitors = base->monitorPhyArrange->childrenListObject();
- if ( monitors.count() ) {
- @@ -634,13 +638,15 @@
- }
- }
- - int tx = realx * base->monitorPhyArrange->resize_factor;
- - int ty = realy * base->monitorPhyArrange->resize_factor;
- -
- - if (!monitor->isHidden())
- - monitor->move((base->monitorPhyArrange->width()/2)-(primary_monitor->width()/2)+tx,(base->monitorPhyArrange->height()/2)-(primary_monitor->height()/2)+ty);
- - else
- - monitor->move(base->monitorPhyArrange->width(), base->monitorPhyArrange->height());
- + if (primary_found && primary_monitor) {
- + int tx = realx * base->monitorPhyArrange->resize_factor;
- + int ty = realy * base->monitorPhyArrange->resize_factor;
- +
- + if (!monitor->isHidden())
- + monitor->move((base->monitorPhyArrange->width()/2)-(primary_monitor->width()/2)+tx,(base->monitorPhyArrange->height()/2)-(primary_monitor->height()/2)+ty);
- + else
- + monitor->move(base->monitorPhyArrange->width(), base->monitorPhyArrange->height());
- + }
- }
- // int KDisplayConfig::realResolutionSliderValue() {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement